summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorTomcsik Bence <tomcsikbence@gmail.com>2012-01-14 00:14:45 +0100
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-01-15 22:01:33 +0400
commit1f628c7bf8361086be2044d0d6aa8bbf3f128162 (patch)
tree012db365871b0870d4ce5723160e3f1b7c38747b /framework
parent9d27fe4ae43b57fb144dfd0f57c07b5796637a8e (diff)
The "Open..." button's more room problem solved fdo#33794
By adding a int i_nExtraWidth parameter to the layoutButton function there will be enough space for the open button and its black triangle.
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/backingwindow.cxx20
-rw-r--r--framework/source/services/backingwindow.hxx2
2 files changed, 11 insertions, 11 deletions
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index a28f80f41329..2db5879071bd 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -572,33 +572,33 @@ void BackingWindow::initControls()
}
// layout the buttons
- layoutButton( WRITER_URL, 0, aFileNewAppsAvailable,
+ layoutButton( WRITER_URL, 0, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SWRITER,
maWriterButton, aMnemns );
- layoutButton( DRAW_URL, 1, aFileNewAppsAvailable,
+ layoutButton( DRAW_URL, 1, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SDRAW,
maDrawButton, aMnemns );
nYPos += maButtonImageSize.Height() + 10;
- layoutButton( CALC_URL, 0, aFileNewAppsAvailable,
+ layoutButton( CALC_URL, 0, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SCALC,
maCalcButton, aMnemns );
- layoutButton( BASE_URL, 1, aFileNewAppsAvailable,
+ layoutButton( BASE_URL, 1, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SDATABASE,
maDBButton, aMnemns );
nYPos += maButtonImageSize.Height() + 10;
- layoutButton( IMPRESS_WIZARD_URL, 0, aFileNewAppsAvailable,
+ layoutButton( IMPRESS_WIZARD_URL, 0, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SIMPRESS,
maImpressButton, aMnemns );
- layoutButton( MATH_URL, 1, aFileNewAppsAvailable,
+ layoutButton( MATH_URL, 1, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SMATH,
maMathButton, aMnemns );
nYPos += 3*maButtonImageSize.Height() / 2;
- layoutButton( NULL, 0, aFileNewAppsAvailable,
+ layoutButton( NULL, 0, 18, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SWRITER,
maOpenButton, aMnemns, maOpenString );
- layoutButton( NULL, 1, aFileNewAppsAvailable,
+ layoutButton( NULL, 1, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SWRITER,
maTemplateButton, aMnemns, maTemplateString );
nYPos += 10;
@@ -664,7 +664,7 @@ void BackingWindow::loadImage( const ResId& i_rId, PushButton& i_rButton )
}
void BackingWindow::layoutButton(
- const char* i_pURL, int nColumn,
+ const char* i_pURL, int nColumn, int i_nExtraWidth,
const std::set<rtl::OUString>& i_rURLS,
SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
PushButton& i_rBtn,
@@ -690,7 +690,7 @@ void BackingWindow::layoutButton(
long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() );
- nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the safe side
+ nTextWidth += maButtonImageSize.Width() + 8 + i_nExtraWidth; // add some fuzz to be on the safe side
if( nColumn >= 0 && nColumn < static_cast<int>(SAL_N_ELEMENTS(mnColumnWidth)) )
{
if( nTextWidth > mnColumnWidth[nColumn] )
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 410862f51aaa..179a632d5608 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -144,7 +144,7 @@ namespace framework
void loadImage( const ResId& i_rId, PushButton& i_rButton );
- void layoutButton( const char* i_pURL, int nColumn, const std::set<rtl::OUString>& i_rURLS,
+ void layoutButton( const char* i_pURL, int nColumn, int i_nExtraWidth, const std::set<rtl::OUString>& i_rURLS,
SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
PushButton& i_rBtn,
MnemonicGenerator& i_rMnemonicGen,