From ffdb7ae4270d11409707615b8366ed7c658250ce Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Tue, 19 Aug 2014 15:23:10 +0200 Subject: [PATCH] add more spacing between menuitem text and accelerator, when any --- kstyle/breeze.h | 1 + kstyle/breezestyle.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kstyle/breeze.h b/kstyle/breeze.h index e4261f8d..328a8314 100644 --- a/kstyle/breeze.h +++ b/kstyle/breeze.h @@ -72,6 +72,7 @@ namespace Breeze // menu items MenuItem_MarginWidth = 4, MenuItem_BoxTextSpace = 4, + MenuItem_AcceleratorSpace = 16, MenuButton_IndicatorWidth = 20, // combobox diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index 0b8baba3..fafaff60 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -2288,7 +2288,7 @@ namespace Breeze ( see QMenuPrivate::calcActionRects() ) */ const bool hasAccelerator( menuItemOption->text.indexOf( QLatin1Char( '\t' ) ) >= 0 ); - if( hasAccelerator ) size.rwidth() += Metrics::MenuItem_BoxTextSpace; + if( hasAccelerator ) size.rwidth() += Metrics::MenuItem_AcceleratorSpace; // right column const int rightColumnWidth = Metrics::MenuButton_IndicatorWidth + Metrics::MenuItem_BoxTextSpace;