mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-21 22:51:26 +08:00
Fix tutorial bug
This commit is contained in:
@@ -21322,6 +21322,23 @@ GuiRibbonGroup
|
||||
dropdownMenu->SetControlTemplate(ct->GetSubMenuTemplate());
|
||||
}
|
||||
|
||||
bool GuiRibbonGroup::IsAltAvailable()
|
||||
{
|
||||
return alt != L"";
|
||||
}
|
||||
|
||||
compositions::IGuiAltActionHost* GuiRibbonGroup::GetActivatingAltHost()
|
||||
{
|
||||
if (IsAltAvailable())
|
||||
{
|
||||
return this;
|
||||
}
|
||||
else
|
||||
{
|
||||
return GuiControl::GetActivatingAltHost();
|
||||
}
|
||||
}
|
||||
|
||||
void GuiRibbonGroup::OnBoundsChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments)
|
||||
{
|
||||
dropdownMenu->GetBoundsComposition()->SetPreferredMinSize(Size(0, containerComposition->GetBounds().Height()));
|
||||
@@ -21377,6 +21394,9 @@ GuiRibbonGroup
|
||||
:GuiControl(themeName)
|
||||
, items(this)
|
||||
{
|
||||
SetAltComposition(boundsComposition);
|
||||
SetAltControl(this, false);
|
||||
|
||||
commandExecutor = new CommandExecutor(this);
|
||||
{
|
||||
stack = new GuiStackComposition();
|
||||
|
||||
+3
-1
@@ -18855,7 +18855,7 @@ Ribbon Containers
|
||||
};
|
||||
|
||||
/// <summary>Ribbon group control, adding to the Groups property of a <see cref="GuiRibbonTabPage"/>.</summary>
|
||||
class GuiRibbonGroup : public GuiControl, public Description<GuiRibbonGroup>
|
||||
class GuiRibbonGroup : public GuiControl, protected compositions::GuiAltActionHostBase, public Description<GuiRibbonGroup>
|
||||
{
|
||||
friend class GuiRibbonGroupItemCollection;
|
||||
GUI_SPECIFY_CONTROL_TEMPLATE_TYPE(RibbonGroupTemplate, GuiControl)
|
||||
@@ -18885,6 +18885,8 @@ Ribbon Containers
|
||||
GuiToolstripButton* dropdownButton = nullptr;
|
||||
GuiMenu* dropdownMenu = nullptr;
|
||||
|
||||
bool IsAltAvailable()override;
|
||||
compositions::IGuiAltActionHost* GetActivatingAltHost()override;
|
||||
void OnBoundsChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||
void OnTextChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||
void OnBeforeSwitchingView(compositions::GuiGraphicsComposition* sender, compositions::GuiItemEventArgs& arguments);
|
||||
|
||||
@@ -12,7 +12,6 @@ https://zhuanlan.zhihu.com/p/39369370
|
||||
- **DocumentEditor**: When a document's height is smaller than the control, the lower part cannot click to interact with the last line.
|
||||
- **DocumentEditor**: In default font, the lower part of "g" in the last line is clipped, not rendered properly.
|
||||
- **DocumentEditorRibbon**: The dropdown menu for ribbon gallery cannot be properly resized by dragging the resize bar.
|
||||
- **ALT Sequence** ribbon group needs to behave like menu item to implement `GetActivatingAltHost`.
|
||||
|
||||
- **Github Issues**
|
||||
- https://github.com/vczh-libraries/GacUI/issues/66
|
||||
|
||||
+5
-5
@@ -252,7 +252,7 @@
|
||||
<RibbonTabPage Text="Edit" Alt="E">
|
||||
<att.ContainerComposition-set PreferredMinSize="y:110"/>
|
||||
<att.Groups>
|
||||
<RibbonGroup Text="Alignment" Expandable="true" LargeImage-uri="res://ToolbarImages/EditableLarge">
|
||||
<RibbonGroup Text="Alignment" Expandable="true" LargeImage-uri="res://ToolbarImages/EditableLarge" Alt="A">
|
||||
<ev.ExpandButtonClicked-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
@@ -280,7 +280,7 @@
|
||||
</att.Items>
|
||||
</RibbonGroup>
|
||||
|
||||
<RibbonGroup Text="Edit" LargeImage-uri="res://ToolbarImages/PasteLarge">
|
||||
<RibbonGroup Text="Edit" LargeImage-uri="res://ToolbarImages/PasteLarge" Alt="E">
|
||||
<att.Items>
|
||||
<RibbonButtons MaxSize="Large" MinSize="Icon">
|
||||
<att.Buttons>
|
||||
@@ -301,7 +301,7 @@
|
||||
</att.Items>
|
||||
</RibbonGroup>
|
||||
|
||||
<RibbonGroup Text="Text">
|
||||
<RibbonGroup Text="Text" Alt="T">
|
||||
<att.Items>
|
||||
<RibbonToolstrips>
|
||||
<att.Groups>
|
||||
@@ -327,7 +327,7 @@
|
||||
</att.Items>
|
||||
</RibbonGroup>
|
||||
|
||||
<RibbonGroup Text="Icon Labels">
|
||||
<RibbonGroup Text="Icon Labels" Alt="I">
|
||||
<att.Items>
|
||||
<RibbonButtons MaxSize="Small" MinSize="Icon">
|
||||
<att.Buttons>
|
||||
@@ -371,7 +371,7 @@
|
||||
</att.Items>
|
||||
</RibbonGroup>
|
||||
|
||||
<RibbonGroup Text="Style" LargeImage-uri="res://ToolbarImages/EditableLarge">
|
||||
<RibbonGroup Text="Style" LargeImage-uri="res://ToolbarImages/EditableLarge" Alt="S">
|
||||
<att.Items>
|
||||
<BindableRibbonGalleryList ref.Name="styleGallery" ItemTemplate="demo:StyleItemTemplate" MinCount="2" MaxCount="5" VisibleItemCount="5" env.ItemType="demo::StyleGroup^">
|
||||
<att.ItemSource-bind>self.StyleGroups</att.ItemSource-bind>
|
||||
|
||||
+15
@@ -15266,6 +15266,9 @@ Class (::demo::DocumentEditorRibbonConstructor)
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_12)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_19));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_12)->SetAlt(::vl::WString(L"A", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_12)->SetText(::vl::WString(L"Alignment", false));
|
||||
}
|
||||
@@ -15364,6 +15367,9 @@ Class (::demo::DocumentEditorRibbonConstructor)
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_23)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_33));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_23)->SetAlt(::vl::WString(L"E", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_23)->SetText(::vl::WString(L"Edit", false));
|
||||
}
|
||||
@@ -15490,6 +15496,9 @@ Class (::demo::DocumentEditorRibbonConstructor)
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_34)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_35));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_34)->SetAlt(::vl::WString(L"T", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_34)->SetText(::vl::WString(L"Text", false));
|
||||
}
|
||||
@@ -15677,6 +15686,9 @@ Class (::demo::DocumentEditorRibbonConstructor)
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_49)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_61));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_49)->SetAlt(::vl::WString(L"I", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_49)->SetText(::vl::WString(L"Icon Labels", false));
|
||||
}
|
||||
@@ -15785,6 +15797,9 @@ Class (::demo::DocumentEditorRibbonConstructor)
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_71)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->styleGallery));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_71)->SetAlt(::vl::WString(L"S", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_71)->SetText(::vl::WString(L"Style", false));
|
||||
}
|
||||
|
||||
@@ -1291,6 +1291,9 @@ namespace demo
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_21)->SetExpandable(true);
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_21)->SetAlt(::vl::WString(L"A", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_21)->SetText(::vl::WString(L"Alignment", false));
|
||||
}
|
||||
@@ -1389,6 +1392,9 @@ namespace demo
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_32)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_42));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_32)->SetAlt(::vl::WString(L"E", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_32)->SetText(::vl::WString(L"Edit", false));
|
||||
}
|
||||
@@ -1515,6 +1521,9 @@ namespace demo
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_43)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_44));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_43)->SetAlt(::vl::WString(L"T", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_43)->SetText(::vl::WString(L"Text", false));
|
||||
}
|
||||
@@ -1702,6 +1711,9 @@ namespace demo
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_58)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_70));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_58)->SetAlt(::vl::WString(L"I", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_58)->SetText(::vl::WString(L"Icon Labels", false));
|
||||
}
|
||||
@@ -1810,6 +1822,9 @@ namespace demo
|
||||
auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_80)->GetItems());
|
||||
::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->styleGallery));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_80)->SetAlt(::vl::WString(L"S", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_80)->SetText(::vl::WString(L"Style", false));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user