[Libreoffice-commits] core.git: icon-themes/breeze icon-themes/elementary icon-themes/galaxy include/sfx2 sfx2/source

Jan Holesovsky kendy at collabora.com
Mon Apr 4 07:46:01 UTC 2016


 dev/null                                |binary
 include/sfx2/sidebar/Sidebar.hrc        |    1 -
 include/sfx2/sidebar/SidebarToolBox.hxx |    4 ----
 include/sfx2/sidebar/Theme.hxx          |    2 --
 sfx2/source/sidebar/Sidebar.src         |    5 -----
 sfx2/source/sidebar/SidebarToolBox.cxx  |   23 -----------------------
 sfx2/source/sidebar/Theme.cxx           |   15 ---------------
 7 files changed, 50 deletions(-)

New commits:
commit f0a8d90525f28f0cc3008abad23bb119bf4c64a8
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Apr 4 09:30:29 2016 +0200

    Bool_UseToolBoxItemSeparator in SidebarToolBox is always false, kill it.
    
    Change-Id: Ia1b8d4325207879634ace6d812358dac33fdc2fc

diff --git a/icon-themes/breeze/sfx2/res/separator.png b/icon-themes/breeze/sfx2/res/separator.png
deleted file mode 100644
index 45852ef..0000000
Binary files a/icon-themes/breeze/sfx2/res/separator.png and /dev/null differ
diff --git a/icon-themes/elementary/sfx2/res/separator.png b/icon-themes/elementary/sfx2/res/separator.png
deleted file mode 100644
index f94519b..0000000
Binary files a/icon-themes/elementary/sfx2/res/separator.png and /dev/null differ
diff --git a/icon-themes/galaxy/sfx2/res/separator.png b/icon-themes/galaxy/sfx2/res/separator.png
deleted file mode 100644
index be133b9..0000000
Binary files a/icon-themes/galaxy/sfx2/res/separator.png and /dev/null differ
diff --git a/include/sfx2/sidebar/Sidebar.hrc b/include/sfx2/sidebar/Sidebar.hrc
index e1ab270..96597cf 100644
--- a/include/sfx2/sidebar/Sidebar.hrc
+++ b/include/sfx2/sidebar/Sidebar.hrc
@@ -25,7 +25,6 @@
 #define IMAGE_SIDEBAR_GRIP                        5
 #define IMAGE_SIDEBAR_MENU                        7
 #define IMAGE_SIDEBAR_DETAIL_DIALOG               9
-#define IMAGE_SIDEBAR_TOOLBOX_SEPARATOR          11
 #define IMAGE_SIDEBAR_DECK_3D_LARGE              20
 #define IMAGE_SIDEBAR_DECK_3D_SMALL              22
 #define IMAGE_SIDEBAR_DECK_ANIMATION_LARGE       30
diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx
index 1e8915a..e9fae35 100644
--- a/include/sfx2/sidebar/SidebarToolBox.hxx
+++ b/include/sfx2/sidebar/SidebarToolBox.hxx
@@ -50,8 +50,6 @@ public:
             const Size& rRequestedSize = Size(),
             sal_uInt16 nPos = TOOLBOX_APPEND) override;
 
-    virtual void Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
-
     virtual bool Notify (NotifyEvent& rEvent) override;
 
     css::uno::Reference<css::frame::XToolbarController> GetControllerForItemId(const sal_uInt16 nItemId) const;
@@ -64,8 +62,6 @@ public:
     css::uno::Reference<css::frame::XToolbarController> GetFirstController();
 
 private:
-    Image maItemSeparator;
-
     class ItemDescriptor
     {
     public:
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index a9da7f68..6cec998 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -70,7 +70,6 @@ public:
         Image_Collapse,
         Image_TabBarMenu,
         Image_PanelMenu,
-        Image_ToolBoxItemSeparator,
         Image_Closer,
         Image_CloseIndicator,
 
@@ -124,7 +123,6 @@ public:
         __Int_Bool,
 
         Bool_UseSystemColors,
-        Bool_UseToolBoxItemSeparator,
         Bool_IsHighContrastModeActive,
 
         __Bool_Rect,
diff --git a/sfx2/source/sidebar/Sidebar.src b/sfx2/source/sidebar/Sidebar.src
index b9ff0c2..2320307 100644
--- a/sfx2/source/sidebar/Sidebar.src
+++ b/sfx2/source/sidebar/Sidebar.src
@@ -45,11 +45,6 @@ Resource RID_SIDEBAR_RESOURCE
         ImageBitmap = Bitmap { File = "symphony/morebutton.png" ;};
     };
 
-    Image IMAGE_SIDEBAR_TOOLBOX_SEPARATOR
-    {
-        ImageBitmap = Bitmap { File = "separator.png" ;};
-    };
-
     Image IMAGE_SIDEBAR_DECK_3D_LARGE
     {
         ImageBitmap = Bitmap { File = "symphony/sidebar-3d-large.png" ;};
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index 95acd31..dfebb0e 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -54,7 +54,6 @@ namespace sfx2 { namespace sidebar {
 
 SidebarToolBox::SidebarToolBox (vcl::Window* pParentWindow)
     : ToolBox(pParentWindow, 0),
-      maItemSeparator(Theme::GetImage(Theme::Image_ToolBoxItemSeparator)),
       maControllers(),
       mbAreHandlersRegistered(false)
 {
@@ -118,28 +117,6 @@ void SidebarToolBox::InsertItem(const OUString& rCommand,
     RegisterHandlers();
 }
 
-void SidebarToolBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
-{
-    ToolBox::Paint(rRenderContext, rRect);
-
-    if (Theme::GetBoolean(Theme::Bool_UseToolBoxItemSeparator))
-    {
-        const sal_Int32 nSeparatorY((GetSizePixel().Height() - maItemSeparator.GetSizePixel().Height()) / 2);
-        const sal_uInt16 nItemCount(GetItemCount());
-        int nLastRight(-1);
-        for (sal_uInt16 nIndex = 0; nIndex < nItemCount; ++nIndex)
-        {
-            const Rectangle aItemBoundingBox (GetItemPosRect(nIndex));
-            if (nLastRight >= 0)
-            {
-                const int nSeparatorX((nLastRight + aItemBoundingBox.Left() - 1) / 2);
-                rRenderContext.DrawImage(Point(nSeparatorX, nSeparatorY), maItemSeparator);
-            }
-            nLastRight = aItemBoundingBox.Right();
-        }
-    }
-}
-
 bool SidebarToolBox::Notify (NotifyEvent& rEvent)
 {
     if (rEvent.GetType() == MouseNotifyEvent::KEYINPUT)
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index eedcf77..241767b 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -305,10 +305,6 @@ void Theme::UpdateTheme()
         setPropertyValue(
             maPropertyIdToNameMap[Image_CloseIndicator],
             Any(OUString("private:graphicrepository/cmd/lc_decrementlevel.png")));
-        setPropertyValue(
-            maPropertyIdToNameMap[Image_ToolBoxItemSeparator],
-            Any(
-                OUString("private:graphicrepository/sfx2/res/separator.png")));
 
         // ToolBox
 
@@ -332,10 +328,6 @@ void Theme::UpdateTheme()
         setPropertyValue(
             maPropertyIdToNameMap[Rect_ToolBoxBorder],
             Any(awt::Rectangle(0,0,0,0)));
-        setPropertyValue(
-            maPropertyIdToNameMap[Bool_UseToolBoxItemSeparator],
-            Any(true));
-
         */
         // Gradient style
         Color aGradientStop2 (aBaseBackgroundColor);
@@ -370,9 +362,6 @@ void Theme::UpdateTheme()
         setPropertyValue(
             maPropertyIdToNameMap[Rect_ToolBoxBorder],
             Any(awt::Rectangle(1,1,1,1)));
-        setPropertyValue(
-            maPropertyIdToNameMap[Bool_UseToolBoxItemSeparator],
-            Any(false));
     }
     catch(beans::UnknownPropertyException& rException)
     {
@@ -686,7 +675,6 @@ void Theme::SetupPropertyMaps()
     AddEntry(Image_Collapse);
     AddEntry(Image_TabBarMenu);
     AddEntry(Image_PanelMenu);
-    AddEntry(Image_ToolBoxItemSeparator);
     AddEntry(Image_Closer);
     AddEntry(Image_CloseIndicator);
 
@@ -732,7 +720,6 @@ void Theme::SetupPropertyMaps()
     AddEntry(Int_ButtonCornerRadius);
 
     AddEntry(Bool_UseSystemColors);
-    AddEntry(Bool_UseToolBoxItemSeparator);
     AddEntry(Bool_IsHighContrastModeActive);
 
     AddEntry(Rect_ToolBoxPadding);
@@ -752,7 +739,6 @@ Theme::PropertyType Theme::GetPropertyType (const ThemeItem eItem)
         case Image_Collapse:
         case Image_TabBarMenu:
         case Image_PanelMenu:
-        case Image_ToolBoxItemSeparator:
         case Image_Closer:
         case Image_CloseIndicator:
             return PT_Image;
@@ -802,7 +788,6 @@ Theme::PropertyType Theme::GetPropertyType (const ThemeItem eItem)
             return PT_Integer;
 
         case Bool_UseSystemColors:
-        case Bool_UseToolBoxItemSeparator:
         case Bool_IsHighContrastModeActive:
             return PT_Boolean;
 


More information about the Libreoffice-commits mailing list