summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorThorsten Wagner <thorsten.wagner.4@gmail.com>2020-06-16 00:28:41 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-06-17 14:38:40 +0200
commit4366fdf8cb7b18bfc8f4665aa09f35e20467d3a5 (patch)
treef93dd81cb6883fbf7016e2c80d49d8667ddc04e2 /sc
parent401a24378dab1d06ce305b7b090938a706720957 (diff)
tdf#133692: Spacing within Calc formulabar reworked
Change-Id: I4f590589fdc390bfa11f7db86e65ccab3dd084fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96403 Tested-by: Jenkins Tested-by: Andreas Kainz <kainz.a@gmail.com> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit 45261267964d6fa1e820b0e4a7745e2e10fcb5f7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96503 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputwin.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index cb2b00b51d58..2c19415363ea 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -81,6 +81,7 @@ const long BUTTON_OFFSET = 2; // Space between input line and button
const long MULTILINE_BUTTON_WIDTH = 20; // Width of the button which opens multiline dropdown
const long INPUTWIN_MULTILINES = 6; // Initial number of lines within multiline dropdown
const long TOOLBOX_WINDOW_HEIGHT = 22; // Height of toolbox window in pixels - TODO: The same on all systems?
+const long POSITION_COMBOBOX_WIDTH = 18; // Width of position combobox in characters
using com::sun::star::uno::Reference;
using com::sun::star::uno::UNO_QUERY;
@@ -162,7 +163,7 @@ static VclPtr<ScTextWndBase> lcl_chooseRuntimeImpl( vcl::Window* pParent, const
ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) :
// With WB_CLIPCHILDREN otherwise we get flickering
- ToolBox ( pParent, WinBits(WB_CLIPCHILDREN) ),
+ ToolBox ( pParent, WinBits(WB_CLIPCHILDREN | WB_BORDER | WB_NOSHADOW) ),
aWndPos ( VclPtr<ScPosWnd>::Create(this) ),
pRuntimeWindow ( lcl_chooseRuntimeImpl( this, pBind ) ),
aTextWindow ( *pRuntimeWindow ),
@@ -203,11 +204,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) :
InsertItem (SID_INPUT_OK, Image(StockImage::Yes, RID_BMP_INPUT_OK), ToolBoxItemBits::NONE, 6);
}
- if (!comphelper::LibreOfficeKit::isActive())
- {
- InsertSeparator (7);
- }
- InsertWindow (7, &aTextWindow, ToolBoxItemBits::NONE, 8);
+ InsertWindow (7, &aTextWindow, ToolBoxItemBits::NONE, 7);
SetDropdownClickHdl( LINK( this, ScInputWindow, DropdownClickHdl ));
if (!comphelper::LibreOfficeKit::isActive())
@@ -2115,7 +2112,13 @@ ScPosWnd::ScPosWnd(vcl::Window* pParent)
, nTipVisible(nullptr)
, bFormulaMode(false)
{
- m_xWidget->set_entry_width_chars(15);
+
+ // Use calculation according to tdf#132338 to align combobox width to width of fontname comboxbox within formatting toolbar;
+ // formatting toolbar is placed above formulabar when using multiple toolbars typically
+
+ m_xWidget->set_entry_width_chars(1);
+ Size aSize(LogicToPixel(Size(POSITION_COMBOBOX_WIDTH * 4, 0), MapMode(MapUnit::MapAppFont)));
+ m_xWidget->set_size_request(aSize.Width(), -1);
SetSizePixel(m_xContainer->get_preferred_size());
FillRangeNames();