Skip to content

Commit 15f9cee

Browse files
committed
RibbonTools: TextPosition Bottom in GalleryControls wrong
1 parent c281470 commit 15f9cee

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
66

77
#### Changed (RibbonTools)
88

9-
- Bugfix: GalleryControls in AppMenuGroup and in other Groups
9+
- Bugfixes: GalleryControls in AppMenuGroup and in other Groups
10+
- Default TextPosition in GalleryControls
1011
### Ribbon V2.11.0, RibbonTools V1.3.5
1112

1213
#### Changed (Ribbon)

RibbonTools/Misc/XMarkupClasses.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2976,7 +2976,7 @@ protected TRibbonGallery(TRibbonDocument owner, TRibbonCommandRefObject parent)
29762976
_hasLargeItems = true;
29772977
_itemHeight = -1;
29782978
_itemWidth = -1;
2979-
_textPosition = RibbonTextPosition.Bottom;
2979+
_textPosition = RibbonTextPosition.Right;
29802980
}
29812981

29822982
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
@@ -2997,16 +2997,16 @@ protected TRibbonGallery(TRibbonDocument owner, XElement E, TRibbonCommandRefObj
29972997
_itemWidth = AttributeAsInt32OrDefault(E, AN_ITEM_WIDTH, -1);
29982998

29992999
s = E.Attribute(AN_TEXT_POSITION)?.Value;
3000-
if ((string.IsNullOrEmpty(s)) || (s == ES_BOTTOM))
3001-
_textPosition = RibbonTextPosition.Bottom;
3000+
if ((string.IsNullOrEmpty(s)) || (s == ES_RIGHT))
3001+
_textPosition = RibbonTextPosition.Right;
30023002
else if (s == ES_HIDE)
30033003
_textPosition = RibbonTextPosition.Hide;
30043004
else if (s == ES_LEFT)
30053005
_textPosition = RibbonTextPosition.Left;
30063006
else if (s == ES_OVERLAP)
30073007
_textPosition = RibbonTextPosition.Overlap;
3008-
else if (s == ES_RIGHT)
3009-
_textPosition = RibbonTextPosition.Right;
3008+
else if (s == ES_BOTTOM)
3009+
_textPosition = RibbonTextPosition.Bottom;
30103010
else if (s == ES_TOP)
30113011
_textPosition = RibbonTextPosition.Top;
30123012
else
@@ -3047,7 +3047,7 @@ protected virtual void SaveAttributes(XmlWriter writer)
30473047
if (_itemWidth != -1)
30483048
writer.WriteAttributeString(AN_ITEM_WIDTH, XmlConvert.ToString(_itemWidth));
30493049

3050-
if (_textPosition != RibbonTextPosition.Bottom)
3050+
if (_textPosition != RibbonTextPosition.Right)
30513051
writer.WriteAttributeString(AN_TEXT_POSITION, TEXT_POSITIONS[(int)_textPosition]);
30523052
}
30533053

0 commit comments

Comments
 (0)