diff options
Diffstat (limited to 'dbaccess/source/ui/dlg/adminpages.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/adminpages.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 83484c92d..60b1f40d9 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -314,7 +314,6 @@ namespace dbaui SetControlFontWeight(m_pFT_HeaderText); } - //========================================================================= //= LayoutHelper //========================================================================= @@ -332,6 +331,24 @@ namespace dbaui _rControl.SetPosPixel( aControlPos ); } + //------------------------------------------------------------------------- + void LayoutHelper::fitSizeRightAligned( PushButton& io_button ) + { + const Point aOldPos = io_button.GetPosPixel(); + const Size aOldSize = io_button.GetSizePixel(); + const Size aMinSize( io_button.CalcMinimumSize() ); + if ( aMinSize.Width() > aOldSize.Width() ) + { + io_button.SetPosSizePixel( + aOldPos.X() + aOldSize.Width() - aMinSize.Width(), + 0, + aMinSize.Width(), + 0, + WINDOW_POSSIZE_X | WINDOW_POSSIZE_WIDTH + ); + } + } + //......................................................................... } // namespace dbaui //......................................................................... |