diff options
author | Vaclav Vancura <vaclav@vancura.org> | 2014-04-02 00:17:28 +0400 |
---|---|---|
committer | Vaclav Vancura <vaclav@vancura.org> | 2014-04-02 00:17:28 +0400 |
commit | 18bb1d3aa963e104b1ed6f5f8579d693f5db1c3a (patch) | |
tree | fcd67232b7ba4bad274bce0072424a303dcfc07f /main/src/addins/MonoDevelop.DesignerSupport | |
parent | bef4a8656858038bb6f37f6c7cf8bdffc3491605 (diff) |
[Icons] More icon alignment fixes
Diffstat (limited to 'main/src/addins/MonoDevelop.DesignerSupport')
-rw-r--r-- | main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs index 5124b13110..65a771c0ef 100644 --- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs +++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs @@ -269,7 +269,7 @@ namespace MonoDevelop.DesignerSupport.Toolbox int width, height; cr.SetSourceColor (CategoryLabelColor); layout.GetPixelSize (out width, out height); - cr.MoveTo (xpos + CategoryLeftPadding, ypos + (itemDimension.Height - height) / 2); + cr.MoveTo (xpos + CategoryLeftPadding, ypos + (double)(Math.Round ((double)(itemDimension.Height - height) / 2))); Pango.CairoHelper.ShowLayout (cr, headerLayout); var img = category.IsExpanded ? discloseUp : discloseDown; @@ -290,7 +290,7 @@ namespace MonoDevelop.DesignerSupport.Toolbox int width, height; layout.GetPixelSize (out width, out height); cr.SetSourceColor (Style.Text (item != this.SelectedItem ? StateType.Normal : StateType.Selected).ToCairoColor ()); - cr.MoveTo (xpos + ItemLeftPadding + IconSize.Width + ItemIconTextItemSpacing, ypos + (itemDimension.Height - height) / 2); + cr.MoveTo (xpos + ItemLeftPadding + IconSize.Width + ItemIconTextItemSpacing, ypos + (double)(Math.Round ((double)(itemDimension.Height - height) / 2))); Pango.CairoHelper.ShowLayout (cr, layout); } else { cr.DrawImage (this, item.Icon, xpos + Math.Round ((itemDimension.Width - item.Icon.Width) / 2), ypos + Math.Round ((itemDimension.Height - item.Icon.Height) / 2)); |