/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef SVT_DRAWERLAYOUTER_HXX #define SVT_DRAWERLAYOUTER_HXX #include "svtools/svtdllapi.h" #include "svtools/toolpanel/refbase.hxx" #include "svtools/toolpanel/toolpaneldeck.hxx" #include "svtools/toolpanel/decklayouter.hxx" #include //...................................................................................................................... namespace svt { //...................................................................................................................... class ToolPanelViewShell; class ToolPanelDrawer; typedef ::boost::shared_ptr< ToolPanelDrawer > PToolPanelDrawer; //================================================================================================================== //= ToolPanelDrawer //================================================================================================================== /** a class which implements a tool panel selector in the form of the classical drawers */ class SVT_DLLPUBLIC DrawerDeckLayouter :public RefBase ,public IDeckLayouter ,public IToolPanelDeckListener { public: DrawerDeckLayouter( ::Window& i_rParentWindow, IToolPanelDeck& i_rPanels ); ~DrawerDeckLayouter(); // IReference DECLARE_IREFERENCE() // IDeckLayouter virtual Rectangle Layout( const Rectangle& i_rDeckPlayground ); virtual void Destroy(); virtual void SetFocusToPanelSelector(); virtual size_t GetAccessibleChildCount() const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessibleChild( const size_t i_nChildIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible ); // IToolPanelDeckListener virtual void PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition ); virtual void PanelRemoved( const size_t i_nPosition ); virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive ); virtual void LayouterChanged( const PDeckLayouter& i_rNewLayouter ); virtual void Dying(); private: // triggers a re-arrance of the panel deck elements void impl_triggerRearrange() const; size_t impl_getPanelPositionFromWindow( const Window* i_pDrawerWindow ) const; void impl_removeDrawer( const size_t i_nPosition ); DECL_LINK( OnWindowEvent, VclSimpleEvent* ); private: Window& m_rParentWindow; IToolPanelDeck& m_rPanelDeck; ::std::vector< PToolPanelDrawer > m_aDrawers; ::boost::optional< size_t > m_aLastKnownActivePanel; }; //...................................................................................................................... } // namespace svt //...................................................................................................................... #endif // SVT_DRAWERLAYOUTER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ llabora/lof-4.3'>distro/collabora/lof-4.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbxcolorupdate.cxx
AgeCommit message (Collapse)Author
2023-08-07tdf#156629 Font,highlighting color buttons in sidebar have white background...Noel Grandin
..after transparency -> alpha change regression from commit 81994cb2b8b32453a92bcb011830fcb884f22ff3 Author: Noel Grandin Date: Fri Apr 16 20:33:10 2021 +0200 Convert internal vcl bitmap formats transparency->alpha (II) Change-Id: Id1a578fcd30a9315fd5910ccdbff5d759cba77fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-04tdf#154270 Sync toolbar button recent colorsMaxim Monastirsky
As the last used color is stored per button instance, these will go out of sync with several buttons being visible (e.g. a toolbar and a sidebar, or a toolbar overflow popup), and will reset whenever the toolbar resets (e.g. change in selection, switch from print preview, or customization). Fix that by storing the last colors per-document, and notifying other buttons on changes. Keep the last color also stored per-button for now, as a fallback for reportdesign (which isn't sfx2 based). Change-Id: I866f1de5c8ff6f56c47dc4b6b5acf52957d4e6c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153943 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-05-25svx: change NamedColor be a struct instead of std::pairTomaž Vajngerl
Change-Id: Ice1625e8cae8da859ea8a940b3f8e40f6f9d7037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152235 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-11Resolves: tdf#151898 get hidpi font/highlight color iconsCaolán McNamara
Most of this wouldn't be necessary if we could solve the split alpha problem. In the meantime, let Image take a MetaFile as an arg, record what we want to do in the metafile, and play it back when we need to generate the bitmap for to render the image. That way we don't have alpha to worry about during the recording, and we only have one alpha in the final rendering, as opposed to having two alphas in a source and in destination VirtualDevice, which is problematic in most backends. Change-Id: I5b0d7c498473271f4ab2743f75614b1b93a0e9c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142593 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-21clang-tidy modernize-pass-by-value in svxNoel Grandin
Change-Id: Iedd87d321f4d161574df87629fdd6c7714ff31c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-17split OutputDevice from WindowNoel Grandin
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-11use strong_int for item ids in vcl::ToolBoxNoel
(*) fix bug in SfxToolBoxControl::StateChanged where it was using the slot id instead of the toolbox item id (*) I left the logic in SbaTableQueryBrowser alone, but it looks suspicious, casting slot ids to toolbox ids Change-Id: Ied229164c27fb4456b0515c6fdcbd1682766a1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08Introduce Color::IsFullyTransparentNoel
Change-Id: I94875b9fb7ee18edf63ed28902da4ae77eb14bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: Idec482c21c270912f9bcaeb980077c1616f67c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-02tdf#135121 don't fill the rectangle in the transparent case at allCaolán McNamara
leave the area untouched Change-Id: Icf195d383271b92f6523f8c6b6bc3b87fcae00be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-28tdf#135121 don't paint the image over the rect that will contain the colorCaolán McNamara
so that for the transparent color case we remain showing the original background and not that part of the icon Change-Id: I20452c7eccf141fdbede9ed2476270315963022e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99589 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-28tdf#135121 ImageType::Size26 isn't always 26x26pxCaolán McNamara
so use ImageType just to detect the user has selected a new size, and use the size of the returned image for the icon pixel size Change-Id: If101c586bd2f0d83f668637b48ce3d25a0873358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99561 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-06move headers inside modulesNoel Grandin
Change-Id: I002f42d83820c86737ddceab805aa53ccb388e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-19tdf#134084 use the desired image size, not the current image sizeCaolán McNamara
when updating the color bar Change-Id: I6bf76a38adc034a25c0c31833c14f2b6afe3ec6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96738 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-10tdf#42949 Fix IWYU warnings in svx/source/[t-x]*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8d8a3e13932b004678b305f9a6883062854f9201 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90140 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-22rework line style to be a wide toolbar buttonCaolán McNamara
involves converting SvxLineStyleToolBoxControl to a PopupWindowController because chart is doing interesting things in its panel there needs to be a non-standard way to report/detect the selected line style, which is then reused to disable/enable the arrows when none is selected/deselected in non-chart sidebars SvxLineBox becomes a toolbar dropdown instead of a combobox itemwindow linectrl.cxx split into linewidthctrl.cxx and linewidthctrl because SvxLineBox is now needed in svxcore Change-Id: Icf0ef5e612b894a43d389af8a2908138c2e9c580 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87164 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-06weld AreaPropertyPanelCaolán McNamara
Change-Id: I5f4c4b43067b99cd57f8ea941002481ef5977e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86144 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-20tdf#126966: Tweak to get the "color bar" below text color controls to show upTor Lillqvist
(In iOS-only code, for now.) No idea where the size that the thing has to fit inside comes from; possibly one could alternatively have made that larger? (cherry picked from commit 4de843ee0de7f9211f536dc6c4ee0d05bf26cc52) Change-Id: Ifc1bec4c08c279403127056ecc61db4b80c03f96
2019-11-01tdf#126966: Use larger buttons for the colours in the sidebar on iOS - 2Marco Cecchetti
Attempt to merge this with Noel's re-work of the color picker. Change-Id: I9687546889bc20ef95a50aeafbc6f40e939d57a9 Reviewed-on: https://gerrit.libreoffice.org/81755 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/81900 Tested-by: Jenkins
2019-04-14loplugin:sequentialassign in svtools..svxNoel Grandin
Change-Id: I465a2479f347303e6d4faa39cb0a0f05aec3bf07 Reviewed-on: https://gerrit.libreoffice.org/70719 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-14Remove check for empty color nameJim Raykowski
In ToolboxButtonColorUpdater::Update(const NamedColor &rNamedColor) if the color name is empty the check for color name emptiness causes the tool tip to remain unchanged. This produces an incorrect tool tip. Better to show either the hex representation of the color or simply empty. This patch shows the color name as empty. Currently there are not any colors that I know of that have empty color names but with this patch we are ready for them :-) Change-Id: Ia96789b668cb358d7b03904a75e327303411e56d Reviewed-on: https://gerrit.libreoffice.org/70448 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-04-09tdf#124247: Fix tooltip message when color added to recent colorsAditya
Presently, the tool tip text in recent colors is shown in its hexadecimal representation when the split color button is clicked. Change the hexadecimal representation of the colors in 'recent colors' to its actual color name. Change-Id: I59636eb124b75a9397337c9560bfff72804424ae Reviewed-on: https://gerrit.libreoffice.org/70337 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-01-06tdf#82504 writer table cell background color SvxColorItem uno functionJim Raykowski
Current background color function only sets table cell background when multiple table cells are selected. Paragraph background is otherwise set. This gives expected results for use in sidebar Paragraph panel when multiple table cells are not selected but unexpected results when multiple table cells are selected. For background setting from the table tool bar unexpected paragraph background color is set when multiple cells are not selected. This fix creates a table cell background color uno command specific for setting table cell background color. Change-Id: Ic56723b635252415d932c5499f996c3e46eee13b Reviewed-on: https://gerrit.libreoffice.org/65591 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>