diff --git a/kstyle/breeze.h b/kstyle/breeze.h index 40ba5316..b75d962e 100644 --- a/kstyle/breeze.h +++ b/kstyle/breeze.h @@ -1,273 +1,273 @@ #ifndef breeze_h #define breeze_h /************************************************************************* * Copyright (C) 2014 by Hugo Pereira Da Costa * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * *************************************************************************/ #include #include #include #include namespace Breeze { //*@name convenience typedef //@{ #if QT_VERSION >= 0x050000 //* scoped pointer convenience typedef template using WeakPointer = QPointer; #else //* scoped pointer convenience typedef template using WeakPointer = QWeakPointer; #endif //* scoped pointer convenience typedef template using ScopedPointer = QScopedPointer; //* disable QStringLiteral for older Qt version #if QT_VERSION < 0x050000 using QStringLiteral = QString; #endif //@} //* metrics enum Metrics { // frames Frame_FrameWidth = 1, Frame_FrameRadius = 3, // layout Layout_TopLevelMarginWidth = 10, Layout_ChildMarginWidth = 6, Layout_DefaultSpacing = 6, // line editors LineEdit_FrameWidth = 6, // menu items Menu_FrameWidth = 1, MenuItem_MarginWidth = 8, MenuItem_MarginHeight = 3, MenuItem_HighlightHorizontalMargin = 2, MenuItem_HighlightVerticalMargin = 2, MenuItem_SeparatorMargin = 0, MenuItem_ItemSpacing = 4, MenuItem_AcceleratorSpace = 16, MenuButton_IndicatorWidth = 20, // combobox ComboBox_FrameWidth = 6, // spinbox SpinBox_FrameWidth = LineEdit_FrameWidth, SpinBox_ArrowButtonWidth = 20, // groupbox title margin GroupBox_TitleMarginWidth = 4, // buttons Button_MinWidth = 80, Button_MarginWidth = 6, Button_ItemSpacing = 4, // tool buttons ToolButton_MarginWidth = 6, ToolButton_ItemSpacing = 4, ToolButton_InlineIndicatorWidth = 12, // checkboxes and radio buttons CheckBox_Size = 20, CheckBox_FocusMarginWidth = 2, CheckBox_ItemSpacing = 4, // menubar items MenuBarItem_MarginWidth = 10, MenuBarItem_MarginHeight = 6, - MenuBarItem_SideLineHeight = -3, // Must be negative on right side + MenuBarItem_SideLineHeight = -3, // Must be negative on bottom side // scrollbars ScrollBar_Extend = 20, ScrollBar_SliderWidth = 6, ScrollBar_MinSliderHeight = 20, ScrollBar_NoButtonHeight = (ScrollBar_Extend-ScrollBar_SliderWidth)/2, ScrollBar_SingleButtonHeight = ScrollBar_Extend, ScrollBar_DoubleButtonHeight = 2*ScrollBar_Extend, // toolbars ToolBar_FrameWidth = 2, ToolBar_HandleExtent = 10, ToolBar_HandleWidth = 6, ToolBar_SeparatorWidth = 8, ToolBar_ExtensionWidth = 20, ToolBar_ItemSpacing = 0, // progressbars ProgressBar_BusyIndicatorSize = 14, ProgressBar_Thickness = 6, ProgressBar_ItemSpacing = 4, // mdi title bar TitleBar_MarginWidth = 4, // sliders Slider_TickLength = 8, Slider_TickMarginWidth = 2, Slider_GrooveThickness = 6, Slider_ControlThickness = 20, // tabbar TabBar_TabMarginHeight = 4, TabBar_TabMarginWidth = 8, TabBar_TabMinWidth = 80, TabBar_TabMinHeight = 28, TabBar_TabItemSpacing = 8, TabBar_TabOverlap = 1, TabBar_BaseOverlap = 2, // tab widget TabWidget_MarginWidth = 4, // toolbox ToolBox_TabMinWidth = 80, ToolBox_TabItemSpacing = 4, ToolBox_TabMarginWidth = 8, // tooltips ToolTip_FrameWidth = 3, // list headers Header_MarginWidth = 6, Header_ItemSpacing = 4, Header_ArrowSize = 10, // tree view ItemView_ArrowSize = 10, ItemView_ItemMarginWidth = 3, SidePanel_ItemMarginWidth = 4, - SidePanel_SideLineWidth = 3, + SidePanel_SideLineWidth = -3, // Must be negative on right side // splitter Splitter_SplitterWidth = 1, // shadow dimensions Shadow_Overlap = 2 }; //* animation mode enum AnimationMode { AnimationNone = 0, AnimationHover = 0x1, AnimationFocus = 0x2, AnimationEnable = 0x4, AnimationPressed = 0x8 }; Q_DECLARE_FLAGS(AnimationModes, AnimationMode) //* corners enum Corner { CornerTopLeft = 0x1, CornerTopRight = 0x2, CornerBottomLeft = 0x4, CornerBottomRight = 0x8, CornersTop = CornerTopLeft|CornerTopRight, CornersBottom = CornerBottomLeft|CornerBottomRight, CornersLeft = CornerTopLeft|CornerBottomLeft, CornersRight = CornerTopRight|CornerBottomRight, AllCorners = CornerTopLeft|CornerTopRight|CornerBottomLeft|CornerBottomRight }; Q_DECLARE_FLAGS( Corners, Corner ) //* sides enum Side { SideLeft = 0x1, SideTop = 0x2, SideRight = 0x4, SideBottom = 0x8, AllSides = SideLeft|SideTop|SideRight|SideBottom }; Q_DECLARE_FLAGS( Sides, Side ) //* checkbox state enum CheckBoxState { CheckOff, CheckPartial, CheckOn, CheckAnimated }; //* radio button state enum RadioButtonState { RadioOff, RadioOn, RadioAnimated }; //* arrow orientation enum ArrowOrientation { ArrowNone, ArrowUp, ArrowDown, ArrowLeft, ArrowRight }; //* button type enum ButtonType { ButtonClose, ButtonMaximize, ButtonMinimize, ButtonRestore }; //* paint opacity (0 to 255) enum Opacity { OpacityBackgroundMain = 85, //33% OpacityBackgroundSelected = 102, //40% OpacityBackgroundNotSelected = 51, //20% OpacitySideLineSelected = 255, OpacitySideLineNotSelected = 0, OpacityOutlineHovered = 255, OpacityOutlineNotHovered = 85 }; } Q_DECLARE_OPERATORS_FOR_FLAGS( Breeze::AnimationModes ) Q_DECLARE_OPERATORS_FOR_FLAGS( Breeze::Corners ) Q_DECLARE_OPERATORS_FOR_FLAGS( Breeze::Sides ) #endif