[Libreoffice-commits] core.git: include/svx svx/source

Heiko Tietze (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 17 10:54:34 UTC 2019


 include/svx/strings.hrc                     |    1 +
 svx/source/tbxctrls/SvxColorChildWindow.cxx |    2 +-
 svx/source/tbxctrls/colrctrl.cxx            |    6 ++++--
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit bebc2280e43fc381e9085f2a397dad9dd7701fdd
Author:     Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Wed Jul 17 09:05:54 2019 +0200
Commit:     Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Wed Jul 17 12:53:18 2019 +0200

    Resolves tdf#115087 and tdf#121437 - Improvements to color bar
    
    Tooltip for parent with hint on left/right click
    Position of widget right (ideally it would go below the sidebar)
    Automatic color moved to the bottom to preserve arrangement
    
    Change-Id: Ia3cb1c2c7c20dbc6730c7f003c67b0876514c23f
    Reviewed-on: https://gerrit.libreoffice.org/75749
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 7434d1e3f890..351da5886e29 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -552,6 +552,7 @@
 #define RID_SVXSTR_GRAFMODE_GREYS                           NC_("RID_SVXSTR_GRAFMODE_GREYS", "Grayscale")
 #define RID_SVXSTR_GRAFMODE_MONO                            NC_("RID_SVXSTR_GRAFMODE_MONO", "Black/White")
 #define RID_SVXSTR_GRAFMODE_WATERMARK                       NC_("RID_SVXSTR_GRAFMODE_WATERMARK", "Watermark")
+#define RID_SVXSTR_COLORBAR                                 NC_("RID_SVXSTR_COLORBAR", "Left click to apply as background color, right click to set line color")
 // Default colors
 #define RID_SVXSTR_COLOR_DEFAULT_FONT                       NC_("RID_SVXSTR_COLOR_DEFAULT_FONTCOLOR", "Dark Red 2")
 #define RID_SVXSTR_COLOR_DEFAULT_FRAMELINE                  NC_("RID_SVXSTR_COLOR_DEFAULT_FRAMELINE", "Blue")
diff --git a/svx/source/tbxctrls/SvxColorChildWindow.cxx b/svx/source/tbxctrls/SvxColorChildWindow.cxx
index be56d5c0cc26..4de63f9fd42c 100644
--- a/svx/source/tbxctrls/SvxColorChildWindow.cxx
+++ b/svx/source/tbxctrls/SvxColorChildWindow.cxx
@@ -36,7 +36,7 @@ SvxColorChildWindow::SvxColorChildWindow( vcl::Window* _pParent,
 
     SetWindow(pWin);
 
-    SetAlignment(SfxChildAlignment::BOTTOM);
+    SetAlignment(SfxChildAlignment::RIGHT);
 
     pWin->Initialize( pInfo );
 }
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 772cde7797b5..329931809c3a 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -190,6 +190,7 @@ SvxColorDockingWindow::SvxColorDockingWindow
     nCount          ( 0 )
 {
     SetText(SvxResId(STR_COLORTABLE));
+    SetQuickHelpText(SvxResId(RID_SVXSTR_COLORBAR));
     SetSizePixel(LogicToPixel(Size(150, 22), MapMode(MapUnit::MapAppFont)));
     SetHelpId(HID_CTRL_COLOR);
 
@@ -270,7 +271,9 @@ void SvxColorDockingWindow::FillValueSet()
     nCount = pColorList->Count();
     aColorSet->Clear();
 
-    // create the first entry for 'invisible/none'
+    aColorSet->addEntriesForXColorList(*pColorList, 2);
+
+    // create the last entry for 'invisible/none'
     const Size aColorSize(SvxColorValueSet::getEntryEdgeLength(), SvxColorValueSet::getEntryEdgeLength());
     long nPtX = aColorSize.Width() - 1;
     long nPtY = aColorSize.Height() - 1;
@@ -286,7 +289,6 @@ void SvxColorDockingWindow::FillValueSet()
 
     aColorSet->InsertItem( sal_uInt16(1), Image(aBmp), SvxResId( RID_SVXSTR_INVISIBLE ) );
 
-    aColorSet->addEntriesForXColorList(*pColorList, 2);
 }
 
 void SvxColorDockingWindow::SetSize()


More information about the Libreoffice-commits mailing list