[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58476] branches/soc-2013-ui_replay/source /blender/editors/interface/interface_widgets.c: Shortcuts on buttons disappear if the buttons' labels and their shortcuts would overlap.
Vincent Akkermans
vincent at ack-err.net
Sun Jul 21 17:07:23 CEST 2013
Revision: 58476
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58476
Author: ack-err
Date: 2013-07-21 15:07:22 +0000 (Sun, 21 Jul 2013)
Log Message:
-----------
Shortcuts on buttons disappear if the buttons' labels and their shortcuts would overlap.
Modified Paths:
--------------
branches/soc-2013-ui_replay/source/blender/editors/interface/interface_widgets.c
Modified: branches/soc-2013-ui_replay/source/blender/editors/interface/interface_widgets.c
===================================================================
--- branches/soc-2013-ui_replay/source/blender/editors/interface/interface_widgets.c 2013-07-21 14:35:33 UTC (rev 58475)
+++ branches/soc-2013-ui_replay/source/blender/editors/interface/interface_widgets.c 2013-07-21 15:07:22 UTC (rev 58476)
@@ -1258,8 +1258,11 @@
}
}
- /* part text right aligned */
- if (cpoin) {
+ /* part text right aligned
+ * only draw if there's enough space */
+ if (cpoin &&
+ (BLI_rcti_size_x(rect) - BLF_width(fstyle->uifont_id, but->str)) >= 5) {
+
fstyle->align = UI_STYLE_TEXT_RIGHT;
rect->xmax -= ui_but_draw_menu_icon(but) ? UI_DPI_ICON_SIZE : 0.25f * U.widget_unit;
/* If this is not a menu, and therefore a normal button, then change the alpha of the shortcut */
More information about the Bf-blender-cvs
mailing list