summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--CMakeLists.txt82
-rw-r--r--COPYING4
-rw-r--r--ChangeLog610
-rw-r--r--README36
-rw-r--r--cmake/QtCurveQt3.cmake27
-rw-r--r--colors/CMakeLists.txt1
-rw-r--r--colors/QtCurve.kcsrc27
-rw-r--r--common/colorutils.c305
-rw-r--r--common/common.h1726
-rw-r--r--common/config_file.c2750
-rw-r--r--common/dot.pngbin0 -> 130 bytes
-rw-r--r--common/radio_inner.pngbin0 -> 276 bytes
-rw-r--r--common/radio_on.pngbin231 -> 221 bytes
-rw-r--r--common/radio_on_small.pngbin0 -> 258 bytes
-rw-r--r--config.h.cmake6
-rw-r--r--config/CMakeLists.txt9
-rw-r--r--config/exportthemedialog.cpp6
-rw-r--r--config/exportthemedialog.h4
-rw-r--r--config/qtcurveconfig.cpp1337
-rw-r--r--config/qtcurveconfig.h77
-rw-r--r--config/qtcurveconfigbase.ui2530
-rw-r--r--po/CMakeLists.txt25
-rwxr-xr-xpo/generate.sh48
-rw-r--r--po/qtcurve.pot1423
-rw-r--r--po/tr.po1509
-rw-r--r--style/CMakeLists.txt32
-rw-r--r--style/pixmaps.h167
-rw-r--r--style/qtc_fixx11h.h233
-rw-r--r--style/qtc_kstyle.cpp1717
-rw-r--r--style/qtc_kstyle.h324
-rw-r--r--style/qtcurve.cpp5645
-rw-r--r--style/qtcurve.h114
-rw-r--r--style/qtcurve.themerc2
-rw-r--r--themes/Agua.qtcurve34
-rw-r--r--themes/Agua_II.qtcurve165
-rw-r--r--themes/CMakeLists.txt6
-rw-r--r--themes/Curve.qtcurve20
-rw-r--r--themes/Flat.qtcurve69
-rw-r--r--themes/Human.qtcurve28
-rw-r--r--themes/Inverted.qtcurve22
-rw-r--r--themes/Klearlooks.qtcurve74
-rwxr-xr-xthemes/Milk.qtcurve69
-rw-r--r--themes/Murrine.qtcurve22
-rw-r--r--themes/Ozone.qtcurve170
-rw-r--r--themes/Plastic.qtcurve140
-rw-r--r--themes/Silk.qtcurve89
47 files changed, 18703 insertions, 2982 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..5f68aed
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Craig Drummond <[email protected]>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 803ff67..ad2c3ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,24 +6,53 @@ set(CPACK_GENERATOR "DEB;RPM;TGZ")
set(DEBIAN_PACKAGE_DESCRIPTION "QtCurve for Qt3/KDE3")
set(DEBIAN_PACKAGE_SECTION "kde")
set(CPACK_SOURCE_GENERATOR "TBZ2")
-set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "55")
+set(CPACK_PACKAGE_VERSION_MAJOR "1")
+set(CPACK_PACKAGE_VERSION_MINOR "6")
set(CPACK_PACKAGE_VERSION_PATCH "2")
-set(CPACK_PACKAGE_CONTACT "Craig Drummond <[email protected]>")
+set(CPACK_PACKAGE_CONTACT "Craig Drummond <[email protected]>")
set(QTCURVE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(QTCURVE_VERSION_FULL "${QTCURVE_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}")
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}")
include(CPack)
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
+if(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+endif(COMMAND cmake_policy)
-find_package(KDE3 REQUIRED)
-include(KDE3Macros)
+if (QTC_BUILD_CONFIG_MODULE)
+ if (NOT QTC_QT_ONLY)
+ find_package(KDE3)
+ if (NOT KDE3_FOUND)
+ set(QTC_QT_ONLY true)
+ message("INFO: KDE3 not found! Compiling for Qt only! (Not building the config module)")
+ endif (NOT KDE3_FOUND)
+ endif (NOT QTC_QT_ONLY)
+else (QTC_BUILD_CONFIG_MODULE)
+ set(QTC_QT_ONLY true)
+endif (QTC_BUILD_CONFIG_MODULE)
+if (NOT QTC_QT_ONLY)
+ include(KDE3Macros)
+else (NOT QTC_QT_ONLY)
+ set(QT_MT_REQUIRED TRUE)
+ find_package(Qt3 REQUIRED)
+ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
+ include(QtCurveQt3)
+ if (QT_PLUGINS_DIR MATCHES NOTFOUND)
+ message(SEND_ERROR "ERROR: Failed to detemine Qt3 plugins folder. Please pass -DQT_PLUGINS_DIR=<folder> to cmake")
+ endif (QT_PLUGINS_DIR MATCHES NOTFOUND)
+endif (NOT QTC_QT_ONLY)
+
+if (NOT QTC_QT_ONLY)
exec_program(kde-config
- ARGS --prefix
+ ARGS --prefix --expandvars
OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX)
+endif (NOT QTC_QT_ONLY)
+
+exec_program(kde-config
+ ARGS --install locale --expandvars
+ OUTPUT_VARIABLE KDE3_LOCALE_PREFIX)
file(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
@@ -47,11 +76,42 @@ if(NOT KDE4PREFIX)
endif(NOT KDE4PREFIX)
configure_file (config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
-add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS})
-include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDES})
+if (NOT QTC_QT_ONLY)
+ add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS})
+ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDES})
+else (NOT QTC_QT_ONLY)
+ add_definitions(${QT_DEFINITIONS})
+ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
+endif (NOT QTC_QT_ONLY)
set(DATA_INSTALL_DIR ${KDE3PREFIX}/share/apps)
+
+if(QTC_DEFAULT_TO_KDE3)
+ message("INFO: Defaulting to reading KDE3 settings if KDE_SESSION_VERSION is not set")
+else(QTC_DEFAULT_TO_KDE3)
+ message("INFO: Defaulting to reading KDE4 settings if KDE_SESSION_VERSION is not set")
+endif(QTC_DEFAULT_TO_KDE3)
+
add_subdirectory(style)
-add_subdirectory(config)
-add_subdirectory(themes)
+if (NOT QTC_QT_ONLY)
+ if (QTC_BUILD_CONFIG_MODULE)
+ message("**************************************************************\n"
+ "Warning: The KDE3 config module is deprecated, and is no longer\n"
+ " actively maintained. This module NO LONGER COMPILES!\n"
+ " It is recommended to use the KDE4 version instead.\n"
+ "**************************************************************\n")
+ add_subdirectory(config)
+ add_subdirectory(po)
+ endif (QTC_BUILD_CONFIG_MODULE)
+ add_subdirectory(themes)
+ add_subdirectory(colors)
+endif (NOT QTC_QT_ONLY)
+if (QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT)
+ message("**************************************************************\n"
+ "Warning: You have enabled support for the 'fix parentless dialogs'\n"
+ " option. This is known to BREAK some applications. Please\n"
+ " DO NOT report errors to application authors when you have\n"
+ " this enabled. Please reconsider DISABLING this option.\n"
+ "**************************************************************\n")
+endif (QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT)
diff --git a/COPYING b/COPYING
index 623b625..d60c31a 100644
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
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
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
diff --git a/ChangeLog b/ChangeLog
index 6d6fb0f..d66ae34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,589 @@
+1.6.2
+-----
+1. Disable the support for 'fix parent-less dialog' option - this causes too many
+ issues with applications to be worth the fuss. If you really want this enabled,
+ use the -DQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT=true cmake option.
+
+1.6.1
+-----
+1. Use same radius for all corners of progressbar.
+
+1.6.0
+-----
+1. Add 'glow' focus option - this is now the default.
+2. Fix potential crash in rgbToHsv
+3. Enable glow/shadow/etch for square and slight round settings.
+4. Draw coloured mouse over for 'checked' toggle buttons.
+5. Use Highlight colour for default button glow.
+6. Default sub-menu popup delay to 225 - matches Gtk2 standard default.
+7. Fix glow-mouse over for radio buttons.
+
+1.5.0
+-----
+1. Add option to set progressbar colour.
+2. Add options to have squared sliders and/or scrollbar sliders even when
+ general setting set to round.
+
+1.4.1
+-----
+1. Fix config dialog compilation.
+
+1.4.0
+-----
+1. Add striped window and menu background options.
+2. Added options to not square frames and tab frames.
+3. Add option to drag windows by menubar.
+4. Blend menubar and window titlebar gradients if:
+ menubar, titlebar, and inactive titlebar gradients match AND
+ not blending titlebar gradient AND
+ using window titlebar colour for menubar AND
+ extending window drag into menubar
+5. Default titlebar colours to window colours - matches KDE4 default.
+6. Fix drawing of scrollbar background.
+
+1.3.1
+-----
+1. Fix compilation of config module. Please note that this module is deprecated,
+ and might be out-of sync with the maintained KDE4 version.
+2. Fix compile when style support is enabled.
+
+1.3.0
+-----
+1. Add option to use kwin titlebar colours as menubar shade.
+2. Fix(?) compilation of config module.
+3. Dont use KStandardDirs to create config folder.
+4. Use 'kde' to disable parent-less dialog fix for all KDE applications.
+
+1.2.0
+-----
+1. Draw etch effect on radios if using a button effect, and not using button-like
+ check/radios.
+2. If drawing square non-gtk style scrollviews, use a dark/light borders.
+3. If drawing square scrollviews, set frame width to 1 if using thin scrollbar
+ groove.
+4. Add options to draw square progress and entry fields when rounding.
+5. Add option to control whether progressbars have a border on all sides, or just
+ top/bottom.
+6. Add option to colour default buttons using highlight colour.
+7. Expand selected check/radio colour option so as to be able to specify colour.
+8. Allow to draw focus highlight for square scrollviews.
+
+1.1.1
+-----
+1. #include config.h before using QTC_QT_ONLY
+
+1.1.0
+-----
+1. Add option to not embolden progressbar text.
+2. Add option to allow coloured mouse over for toolbar buttons.
+3. Config module is deprecated, and no longer updated - use KDE4 config module
+ to change settings. If KDE3 version is required, pass -DQTC_BUILD_CONFIG_MODULE=true
+ to cmake.
+
+1.0.1
+-----
+1. Apply cygwin patches from Yaakov S - use MODULE istead of SHARED.
+
+1.0.0
+-----
+ 1. Added option to colour selected check/radios.
+ 2. Added option to use a smaller dot for radios.
+ 3. Made check/radio and splitter highlight options a configurable % - i.e.
+ not based on standard hightlight %
+ 4. When highlighting check/radio/splitter background, use the selection gradient.
+ 5. Added new splitter/handle/thumb style: single dot.
+ 6. Default check/radio/splitter/expander highlight set to 3%
+ 7. Don't do coloured mouse over for buttons of editable combos, spin buttons,
+ or scrollbar buttons.
+ 8. Don't do regular coloured mouse over of sliders when these are set to be
+ coloured on mouse over.
+ 9. Allow to specify strength when colouring selected tab.
+10. Remove support for QtCurve styles (these appear as unique KDE styles in the
+ main KDE style selection dialog). Re-enable support by passing
+ -DQTC_STYLE_SUPPORT=true to cmake.
+11. Slightly lighter shade used for coloured mouse over of arrows.
+12. Add option to specify appearance of dock-widget titlebars.
+13. When saving settings to $XDG_CONFIG_HOME/qtcurve/stylerc, remove the older
+ $XDG_CONFIG_HOME/qtcurvestylerc, and $XDG_CONFIG_HOME/qtcurve.gtk-icons if they
+ exist.
+14. Use split gradient for dock-widget titlebars.
+15. Reduce number of supplied presets.
+16. Allow to compile style against just Qt3 - tarball includes a simplified copy
+ of KStyle. Need to pass -DQTC_QT_ONLY=true to cmake. NOTE: May also need to set QTDIR
+ *before* calling cmake.
+17. If KDE3 development files not found, then automatically set -DQTC_QT_ONLY=true
+
+0.69.1
+------
+1. Remove line beneath dock widget titles.
+
+0.69.0
+------
+1. Add option to control whether bottom tabs should have their gradient
+ shades inverted.
+2. Config files now stored under $XDG_CONFIG_HOME/qtcurve (e.g. ~/.config/qtcurve)
+3. Fix some issue with 'flat' appearance.
+4. Fix shaded listview headers sometime being uninitialised.
+
+0.68.1
+------
+1. Fix reading, and saving, of 'dark inverted gradient' setting.
+
+0.68.0
+------
+1. New options:
+ Control whether icons are displayed in menus
+ Force alternate colours in listviews
+
+0.67.3
+------
+1. Fix saving of menubar item 'colour on mouse over' setting.
+2. Offset sunken slider thumbs to improve appearance.
+
+0.67.2
+------
+1. Only do mouse over for entries if combos and spin widgets are unified.
+2. If not etching/shadowing, when mouse over set to 'glow' use 'thick coloured'
+3. If not etching/shadowing, decrease thinner scrollbar groove.
+4. Fix shaded button on combos when not etching/shadowing.
+5. Remove hard-coding of light border in progressbars - use gradient setting.
+
+0.67.1
+------
+1. Disable combobox mouse over for OpenOffice.
+
+0.67.0
+------
+1. Add option to draw insider border of inactive tabs.
+2. Add option to colour the sorted listview header.
+3. Disable spin button when at min/max - matches Gtk2.
+4. Disable scrollbar buttons when at min/max - to match spin buttons.
+5. Place non-V arrows of unified spin widgets closer together.
+6. Fix shadows on radio buttons.
+
+0.66.0
+------
+ 1. Add a new 'Dark Inverted Gradient' and use this as the default gradient
+ for menu stripes.
+ 2. New 'Agua' style gradient - looks better under KDE4 and Gtk2.
+ 3. Add option to lighten/darken the background of tabs.
+ 4. Make inactive tabs more consistent with active tabs.
+ 5. Remove sunken scroll views config item, and replace with option to control
+ if entries and scroll views should be etched (sunken).
+ 6. Modify defaults:
+ Scrollbars outside of scrollview (Gtk/oxygen style)
+ Thin scrollbar groove.
+ 7. Use KDE_SESSION_VERSION to determine which KDE prefix (KDE3, or KDE4) to
+ seach first for qtc_xxx.themerc files.
+ 8. Update Klearlooks to be more consistent with Clearlooks (lighten tab background,
+ use highlight strip on active tab, dont colour active tab)
+ 9. Use default KDE4 settings to determine colour of text for disabled items.
+10. When calling kde-config/kde4-config pipe stderr to /dev/null
+
+0.65.4
+------
+1. Use 'MS Windows' and not 'Windows' for scrollbar type - to aid
+ translations.
+2. Fix installation location of translation files.
+
+0.65.3
+------
+1. When not using button-like check/radio boxes, use view text as the
+ indicator colour.
+2. Fix slight tab glitches when using glow tab mouse over and square
+ tabs.
+3. Fix usage of custom menu text colours.
+4. Fix custom menu stripe colour.
+5. In config dialog - for gradient directions, use "Top to bottom" instead of
+ "Horizontal" and "Left to right" instead of "Vertical"
+6. Add support for translations of config dialogs.
+ Turkish translation by Necmettin Begiter
+
+0.65.2
+------
+1. Add option to draw list view lines in pre 0.65 style.
+
+0.65.1
+------
+1. Use a border width of 1 if gradienting popupmenus.
+2. When using darkened menu stripe use popupmenu background colour as the
+ base colour.
+3. Fix gradient menus when not using lighter popup menu backgrounds.
+4. Dont fill background of PE_PanelLineEdit
+5. When readining kicker's settings, and window colours, use the correct KDE home.
+6. Fix blank menus in Amarok when using gradient menu background.
+
+0.65.0
+------
+ 1. Add options to draw editable combos, and spin widgets, as edit fields with
+ embedded arrows - oxygen style.
+ 2. Add option to draw a light border around tab widgets, as opposed to 3d look.
+ 3. Added ability to specify scrollbar width (11 -> 31, default 15)
+ 4. Base slider dimensions off of scrollbar width, unless using triangular slider.
+ 5. Add option to have thinner buttons.
+ 6. Add option to specify gradient for background of popupmenus.
+ 7. Enable mouse-over for entry fields.
+ 8. For mouse-over and focus, use same colour for top and bottom inner parts
+ of entry fields.
+ 9. When using full focus with coloured mouse over, then mouse over takes
+ precedence.
+10. Alter default settings:
+ Place arrows of spin buttons, and editable combos, in the edit field.
+ Draw a light border around tab widget.
+ Thinner buttons.
+ Use soft gradient for active tab.
+ Use glow style highlight for tab mouse-over (this introduces gaps between tabs).
+11. Modified how button, and combo, heights are calculated - no longer set a
+ minimum height.
+12. Fix some re-draw errors with thin scrollbar grooves.
+13. Default to reading KDE4 settings if KDE_SESSION_VERSION is not set.
+ Pass -DQTC_DEFAULT_TO_KDE3=true to cmake to force this to default to KDE3.
+14. Call kde-config / kde4-config to ascertain users KDEHOME.
+15. Fix slight redraw error with glow style mouse over tabs.
+16. Remove box from listview arrows when configured to drawn listview lines.
+
+0.64.2
+------
+1. When using shaded combo buttons, use button colours for border.
+
+0.64.1
+------
+1. When using shaded combo buttons, use the combo splitter setting to
+ determine if there should be a border between the shaded and unshaded parts.
+2. Fix background of some QTextEdits.
+
+0.64.0
+------
+ 1. Add option to not draw border around popupmenus.
+ 2. Add option to unify spinbuttons.
+ 3. Add option to set sub-menu delay (default 100ms)
+ 4. Use equal top/bottom padding on popupmenu separators.
+ 5. Add option to colour arrow part of combobox.
+ 6. Draw resize grip as a darkend triangle.
+ 7. Add a 'thick coloured border' mouse over type.
+ 8. Allow to darken sliders.
+ 9. Add new default button indicator - darken.
+10. Fix mispainted spin widget entry field.
+11. Fix reading of KDE4 palette.
+12. Fix setting of check/radio shade.
+13. Fix storing of custom menu stripe colour.
+14. In config dialog, place '%'symbol on the right for the "popup menu background"
+ setting.
+15. Fix kaffeine's slider benig completely filled at start of song.
+16. Fix LineEdit in qtconfig.
+17. Under KDE4 (KDE_SESSION_VERSION>=4), default hover/focus colours to the
+ KDE4 defaults.
+
+0.63.0
+------
+ 1. Add '3dfull' to gradient border options. This forces the
+ dark, as well as the light, portion to be drawn.
+ 2. Use a lighter shade for the dark portion of gradient border.
+ 3. Flat dot for radio buttons.
+ 4. Option to use button colour for listview headers.
+ 5. Use KDE4 colours for focus and mouse-over.
+ 6. Removal of background focus option.
+ 7. Softer colouration of selected tab.
+ 8. Tab mouse over options; top (as before), below, or glow.
+ 9. Modified defaults:
+ Tab mouse-over highlight drawn at the bottom
+ Plain slider style
+ Align titlebars text in center
+10. Add appearance setting for background of flat scrollbar buttons.
+11. Add HCY colour space.
+12. Use tint and mix colour routines from KDE4's KColourUtils.
+13. Remove QtCurve's 'inactiveHighlight' option, and use KDE4s setting
+ instead.
+14. Add option to specify appearance setting of filler part of sliders.
+15. Increase number of custom gradients - now matches number of gradient
+ config items.
+16. When using glow style mouse over, use mouse over colour for arrows.
+17. Option to use a thinner groove for scrollbars (only when using flat, or no, buttons).
+18. Option to only colour sliders on mouse over.
+19. Option to round all tabs.
+20. Add option to specify menu stripe colour.
+21. Update gradient preview when change colour space.
+22. Remove 'Custom sunken gradient' setting, as this was not
+ actually used.
+23. Better handling of 'full centered' titlebar texts when
+ window size is small.
+24. Fix scrolbar sliders appearing rounded when round=none, sliders
+ are shaded, and flat scrollbar buttons.
+25. Fix faded menuitems when not rounding.
+26. Make popup menu titles more KDE4-like.
+27. Fix use of base colour in disabled listviews. (Fixes bug introduced in 0.62.0)
+
+0.62.7
+------
+1. Show 'extra' as the default round setting in the config UI, as this is
+ actually the default. Note, that KDE3 does not support this and will use
+ 'full' instead.
+
+0.62.6
+------
+1. Allow ability to specify if titlebar center alignment is for the full window
+ width, or just the text area.
+
+0.62.5
+------
+1. Use gradient for filled slider - unless appearance is flat/raised.
+2. Remove menubar item size adjust code when toolbar borders are set - not
+ needed for KDE3, as it has padding anyway.
+3. Don't highlight slider groove on mouse-over.
+4. Fix coloured bottom tabs.
+5. Fix faded menuitems when not lightening popupmenus.
+
+0.62.4
+------
+1. When drawing filled slider groove, use fill colour for border as well.
+2. Better positioning of V arrows on secondary scrollbar buttons.
+
+0.62.3
+------
+1. Fix misdrawing of filled slider groove when slider is at 0.
+2. Use correct appearance setting for slider groove.
+3. Fix potentional palette issues if Qt3 and KDE3 have difference palettes.
+4. Override QStyle::drawItem to remove etched disabled text, as opposed to
+ just setting GUIStyle styleHint. This fixes the 'click on menubaritem' to
+ close menu issue.
+5. When menubars have a border, adjust the menubar items accordingly.
+6. When filling the used part of a slider groove, use the slider colour
+ if set, otherwise use the highlight colour.
+
+0.62.2
+------
+1. Fix crash when coloured mouse over is set to none, and focus is set to full.
+2. Make focus full like KDE4/Gtk2
+3. Fix some issues gradient issues (tabs and menuitems).
+
+0.62.1
+------
+1. Use highlight colour for unselected focused view items.
+2. Fix saving/reading of custom shades.
+3. Fix striped progress.
+4. Fix background of disabled spin widgets.
+
+0.62.0
+------
+ 1. Reduce gradient code complexity - makes predefined gradients
+ work in the same vein as custom gradients.
+ 2. Add scrollbar/slider groove and 'sunken' appearance options.
+ 3. Added new soft and harsh gradients.
+ 4. Change defaults:
+ Soft gradient
+ Fade menuitems
+ Don't use highlight for menu.
+ Default highlight set to 3%
+ Toolbar separators set to sunken
+ Flat menubar appearance
+ Button like check/radios
+ Supply, and use, predefined custom shades
+ Plain progress
+ Don't highlight active tab
+ Sunken scrollviews
+ Sunken appearance set to soft
+ Line focus
+ Set custom appearances for titlebars
+ 5. Allow all bar flat and raised tabs to bol coloured.
+ 6. Only save appearance settings if different from default.
+ 7. If a gradient does not define the values for positions 0 and 100, then add these.
+ 8. Better colouring of selected tab.
+ 9. Added new focus options - full and line.
+10. Add new round options - extra and max.
+11. Don't etch disabled items.
+12. Use text colour for focus indicator in tree/list/etc views.
+13. When specifying custom gradients, add the pssibility to have no
+ internal border - options are now none, light, 3d
+14. Only apply plastik style mouse-over scrollbars and sliders when
+ plastik is set as the mouse-over style.
+15. Add option to specify titlebar text alignment.
+16. When setting palette, also set link and link visited colours.
+
+0.61.4
+------
+1. Fix gradient of faded menuitems when not using lighter background.
+2. Disable usage of group box lines - has too many issues.
+
+0.61.3
+------
+1. Fix settings for sliderThumbs, handles, toolbarSeparators, and splitters.
+2. Disable 'group box line' for ksysguard.
+
+0.61.2
+------
+1. Fix setting of options if no qtcurvestylerc is found!
+2. Fix border of tabs.
+
+0.61.1
+------
+1. Fix setting of default style. Fixes odd behaviour of config dialog!
+2. Fix position of dark part of sunken lines.
+3. Improve KDE dock widget titles.
+4. Read in custom gradients and shades from any system config file.
+
+0.61
+----
+1. Only draw coloured border for moused-over items if they are enabled!
+2. Add option to draw line after frameless groupbox title.
+3. Dont darken background of dock widget titlebars, just draw a line underneath.
+4. Add 'none' to toolbar handles and splitters style.
+5. Change defaults:
+ Button effect: Shadow
+ Mouse over: Glow
+ Default button indicator: Glow
+ V arrows
+ Flat toolbars
+ Use highlight colour for focus
+ Flat scrollbar buttons
+ No combo line
+ Sunken toolbar handles
+ Only lighten popupmenus by 2%
+ Flat active tab
+ Don't shade sliders
+ Don't darken menubars
+ Use darkened background for progressbars
+6. Allow to darken popup menu background.
+
+0.60
+----
+ 1. Add more safety checks for destruction of hover widgets.
+ 2. New focus rect options - standard, highlight, background.
+ 3. Add the ability to specify popup menu light factor.
+ 4. Add option to use darkened background colour for menuitem selection.
+ 5. Add 'fade' to menuitem appearance.
+ 6. Option to have flat scrollbar buttons.
+ 7. New slider styles - plain rotated, and round rotated.
+ 8. Increase size of busy progressbar.
+ 9. Draw border around filled progress.
+10. Option to have button-like checks/radios.
+11. Use base for light part of lineedit border, and background for scrollview.
+12. Nicer 'V' arrows.
+13. Add option to specify appearance of inactive titlebars.
+14. Round internal corners of plain coloured mouse over effect.
+15. Remove reading of Qt3 palette - this 'hack' only worked for pure Qt apps.
+
+0.59.5
+------
+1. In config dialog, rename the 'Fill' progressbar option to 'No border',
+ and place it on the 'Bar' line.
+
+0.59.4
+------
+1. Left align dock widget titles - more KDE4 like. (Right align for RTL)
+2. Dont activate menubar when Alt key is pressed alone - matches Gtk.
+
+0.59.3
+------
+1. Fix background drawng of sliders on toolbars (such as in Kaffeine), when
+ coloured mouse over is disabled and highlight factor is set to 1.0.
+
+0.59.2
+------
+1. Also check in share/kde4/apps/kstyle/themes for qtc_*.themerc files.
+
+0.59.1
+------
+1. Fix appearance of shiny glass defult buttons.
+2. Give glass default buttons a light border.
+
+0.59
+----
+ 1. When drawing gray focus rect, draw only slightly rounded.
+ 2. Etch/shadow effect now applied to widget sides as well as
+ top/bottom.
+ 3. Add etching to checks, radios, slider grooves, and progressbars.
+ 4. Option to have progress fill groove - default to true.
+ 5. Option to display non-editable combo splitter - defaults to true.
+ 6. Dont do coloured mouse over for mdi buttons, dock widget buttons,
+ or toolbar buttons.
+ 7. Better coloured mouse over for checks and radios.
+ 8. Don't use background colour for non-coloured mouse over of
+ check/radios if highlighting text backgroud.
+ 9. When colouring menubars, correctly draw menubar text colour
+ of inactive windows.
+10. Fix potential crash when using pixmap cache.
+11. Fix tab coloured mouse-over when not rounded.
+12. Implement size grip.
+13. New mouse over effect - glow. Only applicable if etching or shadowing.
+14. New default button indicator - glow. Only applicable if etching
+ or shadowing.
+15. Allow up to 10 custom defined gradients.
+16. Allow custom shades to be specified.
+17. Add option to specify active tab appearance.
+18. Don't do coloured mouse-overs for sunken buttons.
+19. Apply 'border menuitems' only to popup menus.
+20. If lightening popup menus, and not bordering menuitems, then remove 1
+ pix border arund popup menus.
+21. Change default to not border menuitems.
+22. Re-arrange config GUI.
+23. Remove some frames from kate.
+24. Scrolview options: allow sunken, highlight, and square.
+25. Option to specify progressbar groove appearance.
+
+0.58
+----
+1. Add a config option for menu stripe appearance - defaults to gradient.
+2. Add a config option for selection appearance - defaults to flat. KDE4 (Qt4.4) & Gtk2 only.
+3. Use background colour for disabled scrollbar buttons.
+4. Remove some frames from systemsettings.
+5. Don't draw menu separators through stripe.
+6. Draw menu stripe on the right for RTL languages.
+7. Supply a QtCurve colours file.
+8. Lighter menustripe when not lightening menus.
+9. Lighter menu separators.
+
+0.57.1
+------
+1. Fix for frameless groupboxes krusader's config dialog.
+2. Draw QDockWindowResize handles like QSplitters.
+3. Make dock windows more KDE4 like.
+4. Don't draw frames around kicker buttons.
+5. Fix kicker menu stripe.
+
+0.57
+----
+1. Modify defaults:
+ Turn off shade menubar only of active window
+ Set default button indicator to tint
+2. Re-added option to highlight background of check/radio text on mouseover.
+
+0.56.3
+------
+1. Don't set sliders to flat just because appearance is flat.
+
+0.56.2
+------
+1. Use case-insesitive string compares when checking Qt and KDE config files.
+2. Fix for (sometimes) ever-boldening frameless groupbox titles.
+3. Don't colour non-maxed sliders of disabled scrollviews.
+
+0.56.1
+------
+1. Fix crash when using corner default button indicator and no coloured
+ mouse over.
+
+0.56
+----
+1. Change default settings:
+ Dont animate progressbars
+ Frameless groupboxes
+ Gradient KDE4 window titlebars
+2. Correctly position corner indicator.
+3. Use mouse over colours for corner indicator.
+4. Add option to control window titlebar appearance - default to
+ gradient.
+5. Read in KWin's pallete, and use to colour MDI windows.
+6. Draw own icons for titlebar buttons - more KDE4 like.
+7. Option to tint the default button colour.
+8. Option to draw a stripe on the left hand side of popupmenus.
+9. Only mark default button if it is enabled.
+
+0.55.3
+------
+1. Style "Ideal::Button"s on "Ideal::ButtonBar"s as per KMultiTabBar tabs.
+ (Makes KTorrent's tab buttons look like Kate's sidebar buttons)
+2. Read KDE4's contrast setting if running under KDE4.
+
0.55.2
------
1. Add ability to import qtc_*.themerc settings into config dialog.
@@ -23,7 +609,7 @@
6. Optional diagonal progressbar sripes.
7. Use alternating dark/light for dashed toolbar handles.
8. New 'split' style gradient.
- 9. Option to specift slider style: plain, round (only when appearance=round),
+ 9. Option to specify slider style: plain, round (only when appearance=round),
and triangular (plastik-ish)
10. Modify default style: flat splitter lines, flat slider thumbs, no
toolbar separators, triangular slider, diagonal progressbar stripes.
@@ -113,7 +699,7 @@
light colour schemes.
9. Dont draw sunken panel around checked menuitems.
10. Fix karm (and others?) statusbar icon.
-11. Fix for radio buttons in apps where QApplication::NormalColor!=QApplication::colorSpec()
+11. Fix for radio buttons in apps where QApplication::NormalColour!=QApplication::colourSpec()
(e.g. designer)
0.50
@@ -221,7 +807,7 @@
follows general appearance.
Tab appearance - set from general appearace.
Draw dock window titles - never.
- Colored sidebar buttons - always.
+ Coloured sidebar buttons - always.
3. Changed appearance of check/radios - now filled with base
colour.
4. Etch look for button, combos, line edits, and spin boxes.
@@ -294,7 +880,7 @@
0.45
----
1. Option to control whether highlighted items should use
- the highlight color in inactive windows.
+ the highlight colour in inactive windows.
2. Option to control whether menubars should be shaded in
inactive windows.
3. Fix loading / selection of options.
@@ -334,7 +920,7 @@
next, or none.
9. Slightly better radios in khtml.
10. Slightly smaller buttons.
-11. Option to have colored side-bar buttons - e.g. the buttons on the
+11. Option to have coloured side-bar buttons - e.g. the buttons on the
edge of kate's windows.
12. Improvement to Opera's MDI buttons in menubar area. Not
perfect, but better.
@@ -343,7 +929,7 @@
0.43.2
------
-1. Fix the config dialog to notice changes in menu text color settings.
+1. Fix the config dialog to notice changes in menu text colour settings.
2. Dont draw menubar text twice!
0.43.1
@@ -359,7 +945,7 @@
5. Really fix KDE 3.5.5 taskbar flicker...
6. Slight improvement to combobox when right-to-left
7. Seperate specification of scollbar slider, and range slider, settings.
- 8. Option to specify menubar text colors.
+ 8. Option to specify menubar text colours.
9. New 'flat' appearance.
10. Options to use a coloured border for mouse-over.
11. Nicer looking check and radio buttons - using pixmaps.
@@ -508,7 +1094,7 @@
7. KDE: Use dots also for general handles - more consistent.
8. KDE: Theme dock window handles - i.e. no more text.
9. KDE: Fix/hack look of MDI window buttons.
-10. GTK2: Hackish fix for firefox and KDE's "apply colors to non-KDE apps"
+10. GTK2: Hackish fix for firefox and KDE's "apply colours to non-KDE apps"
setting.
11. GTK: Fix for tear of menu background.
@@ -569,7 +1155,7 @@
6. ALL: New gradient style: bevelled - gradient top/bot, and plain in the
middle. Affects listview headers, buttons, and combos.
7. ALL: Allow setting of listview appearance.
- 8. ALL: Allow setting of listview header color - background, button, or
+ 8. ALL: Allow setting of listview header colour - background, button, or
custom.
9. ALL: Option to only round top of selected menubar items.
10. ALL: New toolbar handle style: dashes
@@ -605,8 +1191,8 @@
wont happen in Gtk2 apps until they are restarted.
4. GTK: Dont draw dividers in listview headers, unless header is >10 pixels
5. ALL: Gradient non-selected tabs as well as selected.
-6. GTK2: Also look in "hicolor" for icons. Search order will be:
- <chosen theme>, crystalsvg, hicolor
+6. GTK2: Also look in "hicolour" for icons. Search order will be:
+ <chosen theme>, crystalsvg, hicolour
7. GTK2: Map gt-add and gtk-remove stock icons
0.30
@@ -691,7 +1277,7 @@
11. ALL: Fix for tab-bar highlight when using light selection colours.
12. KDE: Fix for non-bordered gradient radio buttons.
13. GTK: More KDE like menu sizing.
-14. KDE: Fix/hack for OO.o2.x menubars. If the selected menu color is toodark,
+14. KDE: Fix/hack for OO.o2.x menubars. If the selected menu colour is toodark,
then lighten. This is required as OO.o always draws the menu text
dark! It seems to have a check for plastik style though, and then
it draws selected popup menu items white.
diff --git a/README b/README
index acd7309..733220f 100644
--- a/README
+++ b/README
@@ -8,6 +8,27 @@ To build and install:
4. make
5. make install
+The following options may be supplied to cmake:
+
+ -DQTC_QT_ONLY=true
+ Build style as a pure Qt3 style. NOTE: May also need to set QTDIR *before*
+ calling cmake.
+ This is the default as from QtCurve 1.0.0
+
+ -DQTC_BUILD_CONFIG_MODULE=true
+ Build KDE3 config module. NOTE: This is no longer maintained.
+
+ -DQTC_DEFAULT_TO_KDE3=true
+ If the KDE_SESSION_VERSION is not set, then assume we are running
+ under KDE3. If this cmake option is not set, then KDE4 is assumed.
+
+ -DQTC_STYLE_SUPPORT=true
+ Support QtCurve style files. These are stored as
+ <kde prefix>/share/apps/kstyle/themes/qtc_<stylename>.themerc
+
+ -DQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT=true
+ Enable support for the 'fixParentlessDialogs' config option. NOTE: This is
+ known to break some applications - hence is disabled by default!
Themes
------
@@ -36,10 +57,20 @@ or copy to <kde install prefix>/share/apps/kstyle/themes/ (usually
When KDE's style panel is restarted, your new theme should appear in the list.
+NOTE: As of QtCurve 1.0.0 style support has been disabled by default, and you will
+need to explicitly enable it via QTC_STYLE_SUPPORT
+
+Testing
+-------
+As of v1.2.1, QtCurve can be forced to read its settings from an alternate config
+file via the QTCURVE_CONFIG_FILE environment variable. This is only really useful
+for testing alternate config settings without changing the users current settings.
+Usage:
+
+ QTCURVE_CONFIG_FILE=~/testfile kcalc
Creating Distribution Packages
------------------------------
-
CMake (as of v2.4.x) does not support building rpm or deb packages, and a simple
checkinstall will not work. CMake 2.6 should support rpm and deb packages, but until
then I have supplied a simple shell script to build a package with checkinstall.
@@ -52,7 +83,6 @@ To use this:
pixmaps.h
---------
-
To regenerate this, run the following:
- qembed radio_frame.png radio_light.png radio_on.png check_on.png slider.png slider_light.png slider_v.png slider_light_v.png check_x_on.png > pixmaps.h \ No newline at end of file
+ qembed radio_frame.png radio_inner.png radio_light.png radio_on.png radio_on_small.png check_on.png slider.png slider_light.png check_x_on.png dot.png > pixmaps.h
diff --git a/cmake/QtCurveQt3.cmake b/cmake/QtCurveQt3.cmake
new file mode 100644
index 0000000..dac1b1b
--- /dev/null
+++ b/cmake/QtCurveQt3.cmake
@@ -0,0 +1,27 @@
+FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
+FIND_PATH(QT_PLUGINS_DIR imageformats
+ $ENV{QTDIR}/plugins
+ ${GLOB_PATHS_BIN}
+ /usr/local/qt/plugins
+ /usr/lib/qt/plugins
+ /usr/lib/qt3/plugins
+ /usr/share/qt3/plugins
+ )
+
+MACRO(QTCURVE_QT_WRAP_CPP outfiles )
+ # get include dirs
+ GET_DIRECTORY_PROPERTY(moc_includes_tmp INCLUDE_DIRECTORIES)
+ SET(moc_includes)
+
+ FOREACH(it ${ARGN})
+ GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+ SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfilename}.moc)
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND ${QT_MOC_EXECUTABLE}
+ ARGS -o ${outfile} ${infile}
+ DEPENDS ${infile})
+ SET(${outfiles} ${${outfiles}} ${outfile})
+ ENDFOREACH(it)
+
+ENDMACRO(QTCURVE_QT_WRAP_CPP)
diff --git a/colors/CMakeLists.txt b/colors/CMakeLists.txt
new file mode 100644
index 0000000..423bda3
--- /dev/null
+++ b/colors/CMakeLists.txt
@@ -0,0 +1 @@
+install(FILES QtCurve.kcsrc DESTINATION ${DATA_INSTALL_DIR}/kdisplay/color-schemes)
diff --git a/colors/QtCurve.kcsrc b/colors/QtCurve.kcsrc
new file mode 100644
index 0000000..d7409dc
--- /dev/null
+++ b/colors/QtCurve.kcsrc
@@ -0,0 +1,27 @@
+[Color Scheme]
+Name=QtCurve
+activeBackground=169,195,228
+activeBlend=169,195,228
+activeForeground=255,255,255
+activeTitleBtnBg=220,220,220
+alternateBackground=240,240,240
+background=239,236,231
+buttonBackground=239,236,231
+buttonForeground=0,0,0
+contrast=7
+foreground=0,0,0
+frame=238,238,230
+handle=238,238,230
+inactiveBackground=244,244,244
+inactiveBlend=244,244,244
+inactiveForeground=20,19,18
+inactiveFrame=238,238,230
+inactiveHandle=238,238,230
+inactiveTitleBtnBg=220,220,220
+linkColor=0,0,192
+selectBackground=69,126,224
+selectForeground=255,255,255
+shadeSortColumn=true
+visitedLinkColor=128,0,128
+windowBackground=224,232,238
+windowForeground=0,0,0
diff --git a/common/colorutils.c b/common/colorutils.c
new file mode 100644
index 0000000..05aaaea
--- /dev/null
+++ b/common/colorutils.c
@@ -0,0 +1,305 @@
+/*
+ This file is taken from kcolorspaces.cpp and kcolorutils.cpp from kdelibs
+The code has been modified to work with QColor (Qt3 &Qt4) and GdkColor
+*/
+
+/* This file is part of the KDE project
+ * Copyright (C) 2007 Matthew Woehlke <[email protected]>
+ * Copyright (C) 2007 Olaf Schmidt <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <math.h>
+
+#ifdef __cplusplus
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#define FLOAT_COLOR(VAL, COL) (VAL).COL##F()
+#define TO_COLOR(R, G, B) QColor::fromRgbF(R, G, B)
+#else
+#define FLOAT_COLOR(VAL, COL) ((double)(((VAL).COL()*1.0)/255.0))
+#define TO_COLOR(R, G, B) QColor(limit(R*255.0), limit(G*255.0), limit(B*255.0))
+#endif
+#else
+#define inline
+#define FLOAT_COLOR(VAL, COL) ((double)(((VAL).COL*1.0)/65535.0))
+static GdkColor qtcGdkColor(double r, double g, double b)
+{
+ GdkColor col;
+
+ col.red=limit(r*65535);
+ col.green=limit(g*65535);
+ col.blue=limit(b*65535);
+
+ return col;
+}
+
+#define TO_COLOR(R, G, B) qtcGdkColor(R, G, B)
+#endif
+
+static inline double ColorUtils_normalize(double a)
+{
+ return (a < 1.0 ? (a > 0.0 ? a : 0.0) : 1.0);
+}
+
+static inline double ColorUtils_wrap(double a)
+{
+ static double d = 1.0;
+ double r = fmod(a, d);
+ return (r < 0.0 ? d + r : (r > 0.0 ? r : 0.0));
+}
+
+#define HCY_REC 709 // use 709 for now
+#if HCY_REC == 601
+static const double yc[3] = { 0.299, 0.587, 0.114 };
+#elif HCY_REC == 709
+static const double yc[3] = {0.2126, 0.7152, 0.0722};
+#else // use Qt values
+static const double yc[3] = { 0.34375, 0.5, 0.15625 };
+#endif
+
+static inline double ColorUtils_HCY_gamma(double n)
+{
+ return pow(ColorUtils_normalize(n), 2.2);
+}
+
+static inline double ColorUtils_HCY_igamma(double n)
+{
+ return pow(ColorUtils_normalize(n), 1.0/2.2);
+}
+
+static inline double ColorUtils_HCY_lumag(double r, double g, double b)
+{
+ return r*yc[0] + g*yc[1] + b*yc[2];
+}
+
+typedef struct
+{
+ double h, c, y;
+} ColorUtils_HCY;
+
+// static ColorUtils_HCY ColorUtils_HCY_fromValues(double h_, double c_, double y_/*, double a_*/)
+// {
+// h = h_;
+// c = c_;
+// y = y_;
+// // a = a_;
+// }
+
+static ColorUtils_HCY ColorUtils_HCY_fromColor(const color *color)
+{
+ ColorUtils_HCY hcy;
+ double r = ColorUtils_HCY_gamma(FLOAT_COLOR(*color, red));
+ double g = ColorUtils_HCY_gamma(FLOAT_COLOR(*color, green));
+ double b = ColorUtils_HCY_gamma(FLOAT_COLOR(*color, blue));
+// a = color.alphaF();
+
+ // luma component
+ hcy.y = ColorUtils_HCY_lumag(r, g, b);
+
+ // hue component
+ double p = MAX(MAX(r, g), b);
+ double n = MIN(MIN(r, g), b);
+ double d = 6.0 * (p - n);
+ if (n == p)
+ hcy.h = 0.0;
+ else if (r == p)
+ hcy.h = ((g - b) / d);
+ else if (g == p)
+ hcy.h = ((b - r) / d) + (1.0 / 3.0);
+ else
+ hcy.h = ((r - g) / d) + (2.0 / 3.0);
+
+ // chroma component
+ if (0.0 == hcy.y || 1.0 == hcy.y)
+ hcy.c = 0.0;
+ else
+ hcy.c = MAX( (hcy.y - n) / hcy.y, (p - hcy.y) / (1 - hcy.y) );
+ return hcy;
+}
+
+static color ColorUtils_HCY_toColor(ColorUtils_HCY *hcy)
+{
+ // start with sane component values
+ double _h = ColorUtils_wrap(hcy->h);
+ double _c = ColorUtils_normalize(hcy->c);
+ double _y = ColorUtils_normalize(hcy->y);
+
+ // calculate some needed variables
+ double _hs = _h * 6.0, th, tm;
+ if (_hs < 1.0) {
+ th = _hs;
+ tm = yc[0] + yc[1] * th;
+ }
+ else if (_hs < 2.0) {
+ th = 2.0 - _hs;
+ tm = yc[1] + yc[0] * th;
+ }
+ else if (_hs < 3.0) {
+ th = _hs - 2.0;
+ tm = yc[1] + yc[2] * th;
+ }
+ else if (_hs < 4.0) {
+ th = 4.0 - _hs;
+ tm = yc[2] + yc[1] * th;
+ }
+ else if (_hs < 5.0) {
+ th = _hs - 4.0;
+ tm = yc[2] + yc[0] * th;
+ }
+ else {
+ th = 6.0 - _hs;
+ tm = yc[0] + yc[2] * th;
+ }
+
+ // calculate RGB channels in sorted order
+ double tn, to, tp;
+ if (tm >= _y) {
+ tp = _y + _y * _c * (1.0 - tm) / tm;
+ to = _y + _y * _c * (th - tm) / tm;
+ tn = _y - (_y * _c);
+ }
+ else {
+ tp = _y + (1.0 - _y) * _c;
+ to = _y + (1.0 - _y) * _c * (th - tm) / (1.0 - tm);
+ tn = _y - (1.0 - _y) * _c * tm / (1.0 - tm);
+ }
+
+ // return RGB channels in appropriate order
+ if (_hs < 1.0)
+ return TO_COLOR(ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tn));
+ else if (_hs < 2.0)
+ return TO_COLOR(ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(tn));
+ else if (_hs < 3.0)
+ return TO_COLOR(ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(to));
+ else if (_hs < 4.0)
+ return TO_COLOR(ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tp));
+ else if (_hs < 5.0)
+ return TO_COLOR(ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(tp));
+ else
+ return TO_COLOR(ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(to));
+}
+
+// #ifndef __cplusplus
+static inline double ColorUtils_HCY_luma(const color *color)
+{
+ return ColorUtils_HCY_lumag(ColorUtils_HCY_gamma(FLOAT_COLOR(*color, red)),
+ ColorUtils_HCY_gamma(FLOAT_COLOR(*color, green)),
+ ColorUtils_HCY_gamma(FLOAT_COLOR(*color, blue)));
+}
+
+static inline double ColorUtils_mixQreal(double a, double b, double bias)
+{
+ return a + (b - a) * bias;
+}
+
+static inline double ColorUtils_luma(const color *color)
+{
+ return ColorUtils_HCY_luma(color);
+}
+
+static double ColorUtils_contrastRatio(const color *c1, const color *c2)
+{
+ double y1 = ColorUtils_luma(c1), y2 = ColorUtils_luma(c2);
+ if (y1 > y2)
+ return (y1 + 0.05) / (y2 + 0.05);
+ else
+ return (y2 + 0.05) / (y1 + 0.05);
+}
+
+static color ColorUtils_lighten(const color *color, double ky, double kc)
+{
+ ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
+
+ c.y = 1.0 - ColorUtils_normalize((1.0 - c.y) * (1.0 - ky));
+ c.c = 1.0 - ColorUtils_normalize((1.0 - c.c) * kc);
+ return ColorUtils_HCY_toColor(&c);
+}
+
+static color ColorUtils_darken(const color *color, double ky, double kc)
+{
+ ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
+ c.y = ColorUtils_normalize(c.y * (1.0 - ky));
+ c.c = ColorUtils_normalize(c.c * kc);
+ return ColorUtils_HCY_toColor(&c);
+}
+
+static color ColorUtils_shade(const color *color, double ky, double kc)
+{
+ ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
+ c.y = ColorUtils_normalize(c.y + ky);
+ c.c = ColorUtils_normalize(c.c + kc);
+ return ColorUtils_HCY_toColor(&c);
+}
+
+static color ColorUtils_mix(const color *c1, const color *c2, double bias);
+
+static color ColorUtils_tintHelper(const color *base, const color *col, double amount)
+{
+ color mixed=ColorUtils_mix(base, col, pow(amount, 0.3));
+ ColorUtils_HCY c=ColorUtils_HCY_fromColor(&mixed);
+ c.y = ColorUtils_mixQreal(ColorUtils_luma(base), c.y, amount);
+
+ return ColorUtils_HCY_toColor(&c);
+}
+
+static color ColorUtils_tint(const color *base, const color *col, double amount)
+{
+ if (amount <= 0.0) return *base;
+ if (amount >= 1.0) return *col;
+ if (isnan(amount)) return *base;
+
+ double ri = ColorUtils_contrastRatio(base, col);
+ double rg = 1.0 + ((ri + 1.0) * amount * amount * amount);
+ double u = 1.0, l = 0.0;
+ color result;
+ int i;
+ for (i = 12 ; i ; --i) {
+ double a = 0.5 * (l+u);
+ result = ColorUtils_tintHelper(base, col, a);
+ double ra = ColorUtils_contrastRatio(base, &result);
+ if (ra > rg)
+ u = a;
+ else
+ l = a;
+ }
+ return result;
+}
+
+static color ColorUtils_mix(const color *c1, const color *c2, double bias)
+{
+ if (bias <= 0.0) return *c1;
+ if (bias >= 1.0) return *c2;
+ if (isnan(bias)) return *c1;
+
+ {
+ double r = ColorUtils_mixQreal(FLOAT_COLOR(*c1, red), FLOAT_COLOR(*c2, red), bias);
+ double g = ColorUtils_mixQreal(FLOAT_COLOR(*c1, green), FLOAT_COLOR(*c2, green), bias);
+ double b = ColorUtils_mixQreal(FLOAT_COLOR(*c1, blue), FLOAT_COLOR(*c2, blue), bias);
+ /*double a = ColorUtils_mixQreal(FLOAT_COLOR(*c1, alpha), FLOAT_COLOR(*c2, alpha), bias);*/
+
+ return TO_COLOR(r, g, b);
+ }
+}
+
+// #endif
+/* Added!!! */
+// static color ColorUtils_shade_qtc(const color *color, double k)
+// {
+// ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
+// c.y = ColorUtils_normalize(c.y * (k>1.0 ? (k*1.1) : (k<1.0 ? (k*0.9) : k)));
+// return ColorUtils_HCY_toColor(&c);
+// }
diff --git a/common/common.h b/common/common.h
index 21f6bae..c64872b 100644
--- a/common/common.h
+++ b/common/common.h
@@ -2,7 +2,7 @@
#define __COMMON_H__
/*
- QtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
+ QtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -25,17 +25,29 @@
between Qt and Gtk, but not polute the namespace with exported functions... */
#include <string.h>
+#include <stdarg.h>
#include <math.h>
#include "config.h"
-/*
- The following #define disables the rounding when scrollbar type==none.
-#define QTC_SIMPLE_SCROLLBARS
-*/
+#if defined _WIN32 && defined QT_VERSION && (QT_VERSION >= 0x040000)
+#include <sys/stat.h>
+#include <float.h>
+#include <direct.h>
+
+static int isnan(double x)
+{
+ return _isnan(x);
+}
+
+static int lstat(const char* fileName, struct stat* s)
+{
+ return stat(fileName, s);
+}
+#endif
/*
- The following #define disables the custom focus rectangle
-#define QTC_PLAIN_FOCUS_ONLY
+ The following #define disables the rounding when scrollbar type==none.
+#define SIMPLE_SCROLLBARS
*/
/*
@@ -43,64 +55,62 @@
the scrollbar buttons when at min/max. This removes the thick looking line
between the slider and the buttons.
*/
-#define QTC_INCREASE_SB_SLIDER
-
-/*
- Enable this to do focus highlighting for scrollviews... NOTE: Gtk2 currently does not do this.
-#define QTC_HIGHLIGHT_SCROLVIEWS
-*/
-
-/*
- Control shading used for glass variants.
- 0 => As used in 0.51.1 +
- 1 => As used in 0.51
- 2 => As used in <0.51
-*/
-#define QTC_GLASS_SHADING 0
+#define INCREASE_SB_SLIDER
typedef enum
{
SHADING_SIMPLE=0,
SHADING_HSL=1,
- SHADING_HSV=2
+ SHADING_HSV=2,
+ SHADING_HCY=3
} EShading;
-#if (!defined QTC_CONFIG_DIALOG) && (!defined QTC_KWIN)
-static EShading shading=SHADING_HSL;
-#endif
-
#ifdef __cplusplus
#include <qconfig.h>
-#ifdef QTC_CONFIG_DIALOG
+#ifdef CONFIG_DIALOG
#include <qapplication.h>
#endif
+#include <map>
+#include <set>
+#if !defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000)
+#include <QtCore/QString>
+#endif
#else
#include <glib.h>
#endif
#ifdef __cplusplus
+#include <qpixmap.h>
typedef QColor color;
+
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#include <QtCore/QSet>
+typedef QSet<QString> Strings;
+#else
+typedef QStringList Strings;
+#endif
+
#else
typedef gboolean bool;
typedef GdkColor color;
+typedef gchar ** Strings;
#define true TRUE
#define false FALSE
#endif
-#define QTC_GROUP "Settings"
-/*#define QTC_DESCR_GROUP "Description"*/
+#define SETTINGS_GROUP "Settings"
+#define KWIN_GROUP "KWin"
+/*#define DESCR_GROUP "Description"*/
/* qtc_<theme name>.themerc support */
#define KDE_PREFIX(V) ((4==(V)) ? KDE4PREFIX : KDE3PREFIX)
-#define QTC_THEME_DIR "/share/apps/kstyle/themes/"
-#define QTC_THEME_PREFIX "qtc_"
-#define QTC_THEME_SUFFIX ".themerc"
-
+#define THEME_DIR "/share/apps/kstyle/themes/"
+#define THEME_DIR4 "/share/kde4/apps/kstyle/themes/"
+#define THEME_PREFIX "qtc_"
+#define THEME_SUFFIX ".themerc"
+#define BORDER_SIZE_FILE "windowBorderSizes"
-#define QTC_CHECK_SIZE 13
-#define QTC_RADIO_SIZE 13
-#define QTC_MIN_BTN_SIZE 8
-#define QTC_LV_SIZE 7
+#define LV_SIZE 7
#define LARGE_ARR_WIDTH 7
#define LARGE_ARR_HEIGHT 4
@@ -110,6 +120,13 @@ typedef GdkColor color;
#define NUM_STD_SHADES 6
#define NUM_EXTRA_SHADES 3
+enum
+{
+ ALPHA_ETCH_LIGHT = 0,
+ ALPHA_ETCH_DARK,
+ NUM_STD_ALPHAS
+};
+
#define TOTAL_SHADES NUM_STD_SHADES+NUM_EXTRA_SHADES
#define ORIGINAL_SHADE TOTAL_SHADES
@@ -118,7 +135,7 @@ typedef GdkColor color;
#define SHADE_2_HIGHLIGHT NUM_STD_SHADES+2
/* 3d effect - i.e. buttons, etc */
-#define QTC_SHADES \
+#define SHADES \
static const double shades[2][11][NUM_STD_SHADES]=\
{ \
{ /* HSV & HSL */ \
@@ -149,88 +166,70 @@ typedef GdkColor color;
} \
} ;
-#define QTC_SIMPLE_SHADING (!shading)
-
-#define QT_STD_BORDER 5
-#define QT_DISABLED_BORDER QT_STD_BORDER /*3*/
-#define QT_BORDER(E) (/*(E) ?*/ QT_STD_BORDER/* : QT_DISABLED_BORDER*/)
-
-#define QT_FRAME_DARK_SHADOW 2
-#define QT_FOCUS 3
-
-#define QTC_SHADE(c, s) \
+#define SIMPLE_SHADING (!shading)
+#define DEFAULT_CONTRAST 7
+
+#define THIN_SBAR_MOD ((opts.sliderWidth<DEFAULT_SLIDER_WIDTH ? 3 : opts.sliderWidth>DEFAULT_SLIDER_WIDTH ? (opts.sliderWidth-9)/2 : 4)+(EFFECT_NONE==opts.buttonEffect ? 1 : 0))
+#define SLIDER_SIZE (opts.sliderWidth<DEFAULT_SLIDER_WIDTH ? DEFAULT_SLIDER_WIDTH-2 : opts.sliderWidth)
+#define CIRCULAR_SLIDER_SIZE 15
+#define GLOW_MO 1 /*ORIGINAL_SHADE*/
+#define GLOW_DEFBTN 1
+#define GLOW_ALPHA(DEF) ((DEF) ? 0.5 : 0.65)
+#define DEF_BNT_TINT 0.4
+#define ENTRY_INNER_ALPHA 0.4
+#define INACTIVE_SEL_ALPHA 0.5
+
+#define SUNKEN_BEVEL_DARK_ALPHA(X) (X.value()/800.0) // 0.25
+#define SUNKEN_BEVEL_LIGHT_ALPHA(X) (X.value()/500.0) // 0.40
+
+#define MENU_SIZE_ATOM "_QTCURVE_MENUBAR_SIZE_"
+#define STATUSBAR_ATOM "_QTCURVE_STATUSBAR_"
+#define TITLEBAR_SIZE_ATOM "_QTCURVE_TITLEBAR_SIZE_"
+#define ACTIVE_WINDOW_ATOM "_QTCURVE_ACTIVE_WINDOW_"
+#define TOGGLE_MENUBAR_ATOM "_QTCURVE_TOGGLE_MENUBAR_"
+#define TOGGLE_STATUSBAR_ATOM "_QTCURVE_TOGGLE_STATUSBAR_"
+#define OPACITY_ATOM "_QTCURVE_OPACITY_"
+#define BGND_ATOM "_QTCURVE_BGND_"
+#define BLEND_TITLEBAR (opts.menubarAppearance==opts.titlebarAppearance && opts.menubarAppearance==opts.inactiveTitlebarAppearance && \
+ !(opts.windowBorder&WINDOW_BORDER_BLEND_TITLEBAR) && SHADE_WINDOW_BORDER==opts.shadeMenubars && opts.windowDrag)
+
+#define STD_BORDER 5
+#define STD_BORDER_BR 2
+#define PBAR_BORDER 4
+#define ARROW_MO_SHADE 4
+#define LOWER_BORDER_ALPHA 0.35
+#define DISABLED_BORDER STD_BORDER /*3*/
+#define BORDER_VAL(E) (/*(E) ?*/ STD_BORDER/* : DISABLED_BORDER*/)
+#define SLIDER_MO_BORDER_VAL 3
+
+#define FRAME_DARK_SHADOW 2
+#define FOCUS_SHADE(SEL) (FOCUS_GLOW==opts.focus ? GLOW_MO : ((SEL) ? 3 : ORIGINAL_SHADE))
+#define MENU_STRIPE_SHADE (USE_LIGHTER_POPUP_MENU ? ORIGINAL_SHADE : 2)
+#define MENU_SEP_SHADE (USE_LIGHTER_POPUP_MENU ? 4 : 3)
+
+#define BGND_STRIPE_SHADE 0.95
+
+#define SHADE(c, s) \
(c>10 || c<0 || s>=NUM_STD_SHADES || s<0 \
? 1.0 \
- : opts.darkerBorders && (QT_STD_BORDER==i || QT_DISABLED_BORDER==i) \
- ? shades[SHADING_SIMPLE==shading ? 1 : 0][c][s] - 0.1 \
- : shades[SHADING_SIMPLE==shading ? 1 : 0][c][s] )
+ : opts.darkerBorders && (STD_BORDER==i || DISABLED_BORDER==i) \
+ ? shades[SHADING_SIMPLE==opts.shading ? 1 : 0][c][s] - 0.1 \
+ : shades[SHADING_SIMPLE==opts.shading ? 1 : 0][c][s] )
#define TAB_APPEARANCE(A) (A) /* (APPEARANCE_GLASS==(A) ? APPEARANCE_GRADIENT : (A)) */
-#define QTC_COLOR_SEL_TAB_FACTOR 1.2
-
-#define QTC_ROUNDED (ROUND_NONE!=opts.round)
-
-#define QTC_ETCHED_DARK 0.95
-#define SHADE_BEVEL_GRAD_LIGHT (QTC_SIMPLE_SHADING ? 1.05 : 1.07)
-#define SHADE_BEVEL_GRAD_DARK (QTC_SIMPLE_SHADING ? 0.93 : 0.91)
-#define SHADE_BEVEL_GRAD_SEL_LIGHT (QTC_SIMPLE_SHADING ? 1.05 : 1.07)
-#define SHADE_BEVEL_GRAD_SEL_DARK (QTC_SIMPLE_SHADING ? 0.95 : 0.93)
-
-#define SHADE_BEVEL_MENU_ITEM_LIGHT (QTC_SIMPLE_SHADING ? 1.07 : 1.09)
-#define SHADE_BEVEL_MENU_ITEM_DARK (QTC_SIMPLE_SHADING ? 0.85 : 0.83)
-
-#define SHADE_SLIDER_LIGHT 1.1
-#define SHADE_SLIDER_DARK 0.8
-
-#define SHADE_SBAR_LIGHT 1.02
-#define SHADE_SBAR_DARK 0.95
-
-#define SHADE_MENU_LIGHT 1.02
-#define SHADE_MENU_DARK 0.96
-
-#define SHADE_TAB_SEL_LIGHT 1.1
-#define SHADE_TAB_SEL_DARK 1.0
-#define SHADE_BOTTOM_TAB_SEL_LIGHT 1.0
-#define SHADE_BOTTOM_TAB_SEL_DARK 0.96
-
-#define SPLIT_GRADIENT_FACTOR 0.415
-
-#if !defined QTC_GLASS_SHADING || QTC_GLASS_SHADING==0
-
- #define SHADE_GLASS_TOP_A(A, W) (APPEARANCE_DULL_GLASS==A \
- ? (WIDGET_DEF_BUTTON==W ? 0.99 : 0.98) \
- : (WIDGET_DEF_BUTTON==W ? 1.08 : 1.55))
- #define SHADE_GLASS_TOP_B(A, W) (APPEARANCE_DULL_GLASS==A \
- ? (WIDGET_DEF_BUTTON==W ? 0.94 : 0.92) \
- : 0.92)
- #define SHADE_GLASS_BOT_A(A) (APPEARANCE_DULL_GLASS==A ? 1.02 : 0.99)
- #define SHADE_GLASS_BOT_B(A) (APPEARANCE_DULL_GLASS==A ? 1.10 : 1.16)
-
-#elif QTC_GLASS_SHADING==1
-
- #define SHADE_GLASS_TOP_A(A, W) (APPEARANCE_DULL_GLASS==A \
- ? (WIDGET_DEF_BUTTON==W ? 1.0 : 1.0) \
- : (WIDGET_DEF_BUTTON==W ? 1.08 : 1.7))
- #define SHADE_GLASS_TOP_B(A, W) (APPEARANCE_DULL_GLASS==A ? 0.96 : 0.96)
- #define SHADE_GLASS_BOT_A(A) 0.99
- #define SHADE_GLASS_BOT_B(A) (APPEARANCE_DULL_GLASS==A ? 1.08 : 1.16)
-
-#else
+#define INVERT_SHADE(A) (1.0+(1.0-(A)))
- #define SHADE_GLASS_TOP_A(A, W) (APPEARANCE_DULL_GLASS==A \
- ? (WIDGET_DEF_BUTTON==W ? 1.05 : 1.05) \
- : (WIDGET_DEF_BUTTON==W ? 1.08 : 1.7))
- #define SHADE_GLASS_TOP_B(A, W) 0.96
- #define SHADE_GLASS_BOT_A(A) 0.99
- #define SHADE_GLASS_BOT_B(A) (APPEARANCE_DULL_GLASS==A ? 1.08 : 1.16)
+#define ROUNDED (ROUND_NONE!=opts.round)
-#endif
+#define TOOLBAR_SEP_GAP (opts.fadeLines ? 5 : 6)
+#define FADE_SIZE 0.4
+#define ETCHED_DARK 0.95
-#define IS_GLASS(A) (APPEARANCE_DULL_GLASS==A || APPEARANCE_SHINY_GLASS==A)
-#define IS_FLAT(A) (APPEARANCE_FLAT==A || APPEARANCE_RAISED==A)
-#define SHADE_SELECTION_TOP 1.15
-#define SHADE_SELECTION_BOT 0.9
+#define IS_GLASS(A) (APPEARANCE_DULL_GLASS==(A) || APPEARANCE_SHINY_GLASS==(A))
+#define IS_CUSTOM(A) ((A)>=APPEARANCE_CUSTOM1 && (A)<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD))
+#define IS_FLAT(A) (APPEARANCE_FLAT==(A) || APPEARANCE_RAISED==(A) || APPEARANCE_FADE==(A))
+#define IS_FLAT_BGND(A) (APPEARANCE_FLAT==(A) || APPEARANCE_RAISED==(A))
#ifdef __cplusplus
#define MENUBAR_DARK_LIMIT 160
@@ -240,73 +239,340 @@ typedef GdkColor color;
#define TOO_DARK(A) ((A).red<MENUBAR_DARK_LIMIT || (A).green<MENUBAR_DARK_LIMIT || (A).blue<MENUBAR_DARK_LIMIT)
#endif
-#define DEFAULT_HIGHLIGHT_FACTOR 1.05
-#define MAX_HIGHLIGHT_FACTOR 50
-#define MIN_HIGHLIGHT_FACTOR -50
-#define MENUBAR_DARK_FACTOR 0.97
-#define POPUPMENU_LIGHT_FACTOR 1.15
-#define INACTIVE_HIGHLIGHT_FACTOR 1.20
+#define TO_FACTOR(A) ((100.0+((double)(A)))/100.0)
+#define DEFAULT_HIGHLIGHT_FACTOR 3
+#define DEFAULT_SPLITTER_HIGHLIGHT_FACTOR 3
+#define DEFAULT_CR_HIGHLIGHT_FACTOR 0
+#define DEFAULT_EXPANDER_HIGHLIGHT_FACTOR 3
+#define MAX_HIGHLIGHT_FACTOR 50
+#define MIN_HIGHLIGHT_FACTOR -50
+#define MENUBAR_DARK_FACTOR TO_FACTOR(-3)
+#define INACTIVE_HIGHLIGHT_FACTOR TO_FACTOR(20)
+#define LV_HEADER_DARK_FACTOR TO_FACTOR(-10)
+#define DEF_POPUPMENU_LIGHT_FACTOR 2
+#define MIN_LIGHTER_POPUP_MENU -100
+#define MAX_LIGHTER_POPUP_MENU 100
+
+#define MIN_GB_FACTOR -50
+#define MAX_GB_FACTOR 50
+#define DEF_GB_FACTOR -3
+
+#define TO_ALPHA(A) (((double)((A)<0 ? -(A) : (A)))/100.0)
+#define DEF_COLOR_SEL_TAB_FACTOR 25
+#define MIN_COLOR_SEL_TAB_FACTOR 0
+#define MAX_COLOR_SEL_TAB_FACTOR 100
+
+#define DEF_TAB_BGND 0
+#define MIN_TAB_BGND -5
+#define MAX_TAB_BGND 5
+
+#define DEFAULT_MENU_DELAY 225
+#define MIN_MENU_DELAY 0
+#define MAX_MENU_DELAY 500
+
+#define DEFAULT_SLIDER_WIDTH 15
+#define MIN_SLIDER_WIDTH 11
+#define MAX_SLIDER_WIDTH 31
+
+#define SIZE_GRIP_SIZE 12
+
+#define USE_LIGHTER_POPUP_MENU (opts.lighterPopupMenuBgnd)
+#define USE_GLOW_FOCUS(mouseOver) (FOCUS_GLOW==opts.focus && (MO_GLOW!=opts.coloredMouseOver || !(mouseOver)))
#define USE_SHADED_MENU_BAR_COLORS (SHADE_CUSTOM==opts.shadeMenubars || SHADE_BLEND_SELECTED==opts.shadeMenubars)
#define MENUBAR_GLASS_SELECTED_DARK_FACTOR 0.9
-#define GLASS_BORDER 0.4
-#define BEVEL_BORDER(w) (WIDGET_LISTVIEW_HEADER==w ? 6 : 4)
-#define SHADE_BEVEL_TOP 1.07
-#define SHADE_BEVEL_MID_TOP 1.03
-#define SHADE_BEVEL_MID_BOT 0.975
-#define SHADE_BEVEL_BOT(w) (WIDGET_LISTVIEW_HEADER==(w) ? 0.88 : 0.90)
+
+#define MENUITEM_FADE_SIZE 48
#define NUM_SPLITTER_DASHES 21
-#define WIDGET_BUTTON(w) (WIDGET_STD_BUTTON==w || WIDGET_DEF_BUTTON==w || WIDGET_TOGGLE_BUTTON==w || WIDGET_CHECKBOX==w)
#ifdef __cplusplus
-#define ETCH_WIDGET(w) (WIDGET_STD_BUTTON==w || WIDGET_DEF_BUTTON==w || WIDGET_TOGGLE_BUTTON==w)
+#define WIDGET_BUTTON(w) (WIDGET_STD_BUTTON==(w) || WIDGET_DEF_BUTTON==(w) || \
+ WIDGET_CHECKBOX==(w) || WIDGET_RADIO_BUTTON==(w) || WIDGET_DIAL==(w) || \
+ WIDGET_COMBO==(w) || WIDGET_COMBO_BUTTON==(w) || WIDGET_MDI_WINDOW_BUTTON==(w) || \
+ WIDGET_TOOLBAR_BUTTON==(w) )
+#define ETCH_WIDGET(w) (WIDGET_STD_BUTTON==(w) || WIDGET_DEF_BUTTON==(w) || WIDGET_SLIDER_TROUGH==(w) || \
+ WIDGET_CHECKBOX==(w) || WIDGET_RADIO_BUTTON==(w) || WIDGET_DIAL==(w) || \
+ (WIDGET_SLIDER==(w) && MO_GLOW==opts.coloredMouseOver) || \
+ WIDGET_FILLED_SLIDER_TROUGH==(w) || WIDGET_MDI_WINDOW_BUTTON==(w) || WIDGET_TOOLBAR_BUTTON==(w))
+#define AGUA_WIDGET(w) (WIDGET_STD_BUTTON==(w) || WIDGET_DEF_BUTTON==(w) || IS_SLIDER((w)) || \
+ WIDGET_CHECKBOX==(w) || WIDGET_RADIO_BUTTON==(w) || \
+ WIDGET_COMBO==(w) WIDGET_COMBO_BUTTON==(w) || WIDGET_MDI_WINDOW_BUTTON==(w))
#else
-#define ETCH_WIDGET(w) (WIDGET_STD_BUTTON==w || WIDGET_DEF_BUTTON==w || WIDGET_TOGGLE_BUTTON==w || \
- WIDGET_SPIN_UP==w || WIDGET_SPIN_DOWN==w)
+#define WIDGET_BUTTON(w) (WIDGET_STD_BUTTON==(w) || WIDGET_DEF_BUTTON==(w) || WIDGET_TOGGLE_BUTTON==(w) || \
+ WIDGET_CHECKBOX==(w) || WIDGET_RADIO_BUTTON==(w) || \
+ WIDGET_RADIO_BUTTON==(w) || WIDGET_COMBO==(w) || WIDGET_COMBO_BUTTON==(w) || WIDGET_UNCOLOURED_MO_BUTTON==(w) || \
+ WIDGET_TOOLBAR_BUTTON==(w))
+#define ETCH_WIDGET(w) (WIDGET_STD_BUTTON==(w) || WIDGET_DEF_BUTTON==(w) || WIDGET_TOGGLE_BUTTON==(w) || WIDGET_SLIDER_TROUGH==(w) || \
+ WIDGET_CHECKBOX==(w) || WIDGET_RADIO_BUTTON==(w) || \
+ (WIDGET_SLIDER==(w) && MO_GLOW==opts.coloredMouseOver) || \
+ WIDGET_FILLED_SLIDER_TROUGH==(w) || WIDGET_COMBO==(w) || WIDGET_UNCOLOURED_MO_BUTTON==(w) || \
+ WIDGET_TOOLBAR_BUTTON==(w))
+#define AGUA_WIDGET(w) (WIDGET_STD_BUTTON==(w) || WIDGET_DEF_BUTTON==(w) || WIDGET_TOGGLE_BUTTON==(w) || IS_SLIDER((w)) || \
+ WIDGET_CHECKBOX==(w) || WIDGET_RADIO_BUTTON==(w) || \
+ WIDGET_COMBO==(w) WIDGET_COMBO_BUTTON==(w))
#endif
+
+#define SLIDER(w) (WIDGET_SB_SLIDER==(w) || WIDGET_SLIDER==(w))
+#define CIRCULAR_SLIDER(w) (WIDGET_SLIDER==(w) && SLIDER_CIRCULAR==opts.sliderStyle)
+
+#define MODIFY_AGUA_X(A, X) (APPEARANCE_AGUA==(A) ? (X) : (A))
+#define MODIFY_AGUA(A) MODIFY_AGUA_X((A), APPEARANCE_AGUA_MOD)
+#define AGUA_MAX 32.0
+#define AGUA_MID_SHADE 0.85
+
#define COLORED_BORDER_SIZE 3
#define PROGRESS_CHUNK_WIDTH 10
-#define QTC_DRAW_LIGHT_BORDER(SUKEN, WIDGET, APP) \
- ((!SUKEN && IS_GLASS(APP) && WIDGET_MENU_ITEM!=WIDGET && WIDGET_DEF_BUTTON!=WIDGET) || \
- (WIDGET_PROGRESSBAR==WIDGET && APPEARANCE_FLAT!=APP && \
- APPEARANCE_RAISED!=APP && APPEARANCE_INVERTED!=APP))
+#define STRIPE_WIDTH 10
+#define DRAW_LIGHT_BORDER(SUKEN, WIDGET, APP) \
+ (!(SUKEN) && (GB_LIGHT==getGradient(APP, &opts)->border) && WIDGET_MENU_ITEM!=(WIDGET) && !IS_TROUGH(WIDGET) && \
+ (WIDGET_DEF_BUTTON!=(WIDGET) || IND_COLORED!=opts.defBtnIndicator))
+
+#define DRAW_3D_FULL_BORDER(SUNKEN, APP) \
+ (!(SUNKEN) && GB_3D_FULL==getGradient((APP), &opts)->border)
+
+#define DRAW_3D_BORDER(SUNKEN, APP) \
+ (!(SUNKEN) && GB_3D==getGradient((APP), &opts)->border)
+
+#define DRAW_SHINE(SUNKEN, APP) \
+ (!(SUNKEN) && GB_SHINE==getGradient((APP), &opts)->border)
+
+#define LIGHT_BORDER(APP) (APPEARANCE_DULL_GLASS==(APP) ? 1 : 0)
#define PROGRESS_ANIMATION 100
-#define MIN_SLIDER_SIZE(A) (LINE_DOTS==A ? 24 : 20)
-
-#define QTC_NORM_TAB_APP (APPEARANCE_BEVELLED==opts.tabAppearance || APPEARANCE_SPLIT_GRADIENT==opts.appearance \
- ? APPEARANCE_GRADIENT : opts.tabAppearance)
-#define QTC_SEL_TAB_APP (APPEARANCE_INVERTED==opts.tabAppearance ? APPEARANCE_FLAT : (QTC_NORM_TAB_APP))
-#define QTC_SLIDER_MO_SHADE (SHADE_SELECTED==opts.shadeSliders ? 1 : (SHADE_BLEND_SELECTED==opts.shadeSliders ? 0 : ORIGINAL_SHADE))
-#define QTC_SLIDER_MO_BORDER (SHADE_SELECTED==opts.shadeSliders || SHADE_BLEND_SELECTED==opts.shadeSliders ? 2 : 1)
-#define QTC_SLIDER_MO_LEN (SLIDER_TRIANGULAR==opts.sliderStyle ? 2 : (SHADE_SELECTED==opts.shadeSliders || SHADE_BLEND_SELECTED==opts.shadeSliders ? 4 : 3))
-#define QTC_SB_SLIDER_MO_LEN(A) ((A)<22 && ROUND_FULL!=opts.round \
+#define MIN_SLIDER_SIZE(A) (LINE_DOTS==(A) ? 24 : 20)
+
+#define CR_SMALL_SIZE 13
+#define CR_LARGE_SIZE 15
+
+#define TAB_APP(A) (APPEARANCE_BEVELLED==(A) || APPEARANCE_SPLIT_GRADIENT==(A) ? APPEARANCE_GRADIENT : (A))
+#define NORM_TAB_APP TAB_APP(opts.tabAppearance)
+#define SEL_TAB_APP TAB_APP(opts.activeTabAppearance)
+
+#define SLIDER_MO_SHADE (SHADE_SELECTED==opts.shadeSliders ? 1 : (SHADE_BLEND_SELECTED==opts.shadeSliders ? 0 : ORIGINAL_SHADE))
+#define SLIDER_MO_PLASTIK_BORDER (SHADE_SELECTED==opts.shadeSliders || SHADE_BLEND_SELECTED==opts.shadeSliders ? 2 : 1)
+#define SLIDER_MO_LEN (SLIDER_TRIANGULAR==opts.sliderStyle ? 2 : (SHADE_SELECTED==opts.shadeSliders || SHADE_BLEND_SELECTED==opts.shadeSliders ? 4 : 3))
+#define SB_SLIDER_MO_LEN(A) ((A)<22 && !FULLLY_ROUNDED \
? 2 \
: ((A)<32 || (SHADE_SELECTED!=opts.shadeSliders && SHADE_BLEND_SELECTED!=opts.shadeSliders) \
? 4 \
: 6))
-#define QTC_CR_MO_FILL (SHADE_BLEND_SELECTED==opts.shadeCheckRadio || SHADE_SELECTED==opts.shadeCheckRadio ? 1 : 2)
-#define QTC_MO_DEF_BTN 2
-#define QTC_MO_PLASTIK_DARK(W) (WIDGET_DEF_BUTTON==W && IND_COLORED==opts.defBtnIndicator ? 3 : 2) /*? 2 : 1) */
-#define QTC_MO_PLASTIK_LIGHT(W) (WIDGET_DEF_BUTTON==W && IND_COLORED==opts.defBtnIndicator ? 4 : 1) /*? 2 : 0) */
+#define CR_MO_FILL 1
+#define MO_DEF_BTN 2
+#define MO_PLASTIK_DARK(W) (WIDGET_DEF_BUTTON==(W) && IND_COLORED==opts.defBtnIndicator ? 3 : 2) /*? 2 : 1) */
+#define MO_PLASTIK_LIGHT(W) (WIDGET_DEF_BUTTON==(W) && IND_COLORED==opts.defBtnIndicator ? 4 : 1) /*? 2 : 0) */
+
+#define MO_STD_DARK(W) (MO_GLOW==opts.coloredMouseOver \
+ ? 1 \
+ : MO_PLASTIK_DARK(W))
+#define MO_STD_LIGHT(W, S) (MO_GLOW==opts.coloredMouseOver \
+ ? 1 \
+ : MO_PLASTIK_LIGHT(W))
+
+#define FULLLY_ROUNDED (opts.round>=ROUND_FULL)
+#define DO_EFFECT (EFFECT_NONE!=opts.buttonEffect)
+#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#define SLIDER_GLOW (DO_EFFECT && MO_GLOW==opts.coloredMouseOver /*&& SLIDER_TRIANGULAR!=opts.sliderStyle*/ ? 2 : 0)
+#endif
-#define QTC_MO_STD_DARK(W) QTC_MO_PLASTIK_DARK(W) /*(WIDGET_DEF_BUTTON==W && IND_COLORED==opts.defBtnIndicator ? 4 : 1) */
-#define QTC_MO_STD_LIGHT(W, S) QTC_MO_PLASTIK_LIGHT(W) /*(WIDGET_DEF_BUTTON==W && IND_COLORED==opts.defBtnIndicator ? 2 : (S ? 1 : 0))*/
+#define ENTRY_MO (opts.unifyCombo && opts.unifySpin)
+
+#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#define FOCUS_ALPHA 0.08
+#define FOCUS_GLOW_LINE_ALPHA 0.5
+#define BORDER_BLEND_ALPHA 0.7
+#define ETCH_TOP_ALPHA 0.055
+#define ETCH_BOTTOM_ALPHA 0.1
+// #if defined QT_VERSION && (QT_VERSION >= 0x040000)
+// #define ETCH_RADIO_TOP_ALPHA 0.055
+// #define ETCH_RADIO_BOTTOM_ALPHA 0.80
+// #else
+#define ETCH_RADIO_TOP_ALPHA 0.09
+#define ETCH_RADIO_BOTTOM_ALPHA 1.0
+// #endif
+
+#define RINGS_INNER_ALPHA(T) qtcRingAlpha[IMG_PLAIN_RINGS==(T) ? 1 : 0] //(IMG_PLAIN_RINGS==opts.bgndImage.type ? 0.25 : 0.125)
+#define RINGS_OUTER_ALPHA qtcRingAlpha[2] //0.5
+#define RINGS_WIDTH(T) (IMG_SQUARE_RINGS==T ? 260 : 450)
+#define RINGS_HEIGHT(T) (IMG_SQUARE_RINGS==T ? 220 : 360)
+
+#define RINGS_SQUARE_LARGE_ALPHA (RINGS_OUTER_ALPHA*0.675)
+#define RINGS_SQUARE_SMALL_ALPHA (RINGS_OUTER_ALPHA*0.50)
+#define RINGS_SQUARE_LINE_WIDTH 20.0
+#define RINGS_SQUARE_RADIUS 18.0
+#define RINGS_SQUARE_LARGE_SIZE 120.0
+#define RINGS_SQUARE_SMALL_SIZE 100.0
+
+#if !defined __cplusplus
+#define MENU_AND_TOOLTIP_RADIUS (opts.round>=ROUND_FULL ? 5.0 : 3.5)
+#else
+#define MENU_AND_TOOLTIP_RADIUS (opts.round>=ROUND_FULL ? 5.0 : 2.5)
+#endif
-#define QTC_DO_EFFECT (ROUND_FULL==opts.round && EFFECT_NONE!=opts.buttonEffect)
+#define CUSTOM_BGND (!(IS_FLAT_BGND(opts.bgndAppearance)) || IMG_NONE!=opts.bgndImage.type || 100!=opts.bgndOpacity || 100!=opts.dlgOpacity)
+
+#define GLOW_PROG_ALPHA 0.55
+
+#endif
+
+#if defined __cplusplus && defined QT_VERSION && (QT_VERSION >= 0x040000)
-#ifdef __cplusplus
#include <qstyle.h>
typedef enum
{
- QtC_Round = QStyle::PM_CustomBase
+ QtC_Round = QStyle::PM_CustomBase,
+ QtC_TitleBarButtonAppearance,
+ QtC_TitleAlignment,
+ QtC_TitleBarButtons,
+ QtC_TitleBarIcon,
+ QtC_TitleBarIconColor,
+ QtC_TitleBarEffect,
+ QtC_BlendMenuAndTitleBar,
+ QtC_ShadeMenubarOnlyWhenActive,
+ QtC_ToggleButtons,
+ QtC_MenubarColor,
+ QtC_WindowBorder,
+ QtC_CustomBgnd,
+ QtC_TitleBarApp
} QtCMetrics;
+
+#define QtC_StateKWin ((QStyle::StateFlag)0x10000000)
+// PE_FrameWindow
+#define QtC_StateKWinNotFull ((QStyle::StateFlag)0x20000000)
+// CC_TitleBar
+#define QtC_StateKWinFillBgnd ((QStyle::StateFlag)0x20000000)
+#define QtC_StateKWinNoBorder ((QStyle::StateFlag)0x40000000)
+#define QtC_StateKWinCompositing ((QStyle::StateFlag)0x80000000)
+#define QtC_StateKWinTabDrag ((QStyle::StateFlag)0x00000001)
+
+#define QtC_PE_DrawBackground ((QStyle::PrimitiveElement)(QStyle::PE_CustomBase+10000))
+
+#define CLOSE_COLOR QColor(191, 82, 82)
+#define DARK_WINDOW_TEXT(A) ((A).red()<230 || (A).green()<230 || (A).blue()<230)
+#define HOVER_BUTTON_ALPHA(A) (DARK_WINDOW_TEXT(A) ? 0.25 : 0.65)
+#define WINDOW_TEXT_SHADOW_ALPHA(A) (EFFECT_SHADOW==(A) ? 0.10 : 0.60)
+#define WINDOW_SHADOW_COLOR(A) (EFFECT_SHADOW==(A) ? Qt::black : Qt::white)
+#endif
+
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#define QTCURVE_PREVIEW_CONFIG "QTCURVE_PREVIEW_CONFIG"
+#define QTCURVE_PREVIEW_CONFIG_FULL "QTCURVE_PREVIEW_CONFIG_FULL"
+
+typedef enum
+{
+ DWT_BUTTONS_AS_PER_TITLEBAR = 0x0001,
+ DWT_COLOR_AS_PER_TITLEBAR = 0x0002,
+ DWT_FONT_AS_PER_TITLEBAR = 0x0004,
+ DWT_TEXT_ALIGN_AS_PER_TITLEBAR = 0x0008,
+ DWT_EFFECT_AS_PER_TITLEBAR = 0x0010,
+ DWT_ROUND_TOP_ONLY = 0x0020,
+ DWT_ICON_COLOR_AS_PER_TITLEBAR = 0x0040
+} EDwtSettingsFlags;
+
+typedef enum
+{
+ TITLEBAR_BUTTON_ROUND = 0x0001,
+ TITLEBAR_BUTTON_HOVER_FRAME = 0x0002,
+ TITLEBAR_BUTTON_HOVER_SYMBOL = 0x0004,
+ TITLEBAR_BUTTON_NO_FRAME = 0x0008,
+ TITLEBAR_BUTTON_COLOR = 0x0010,
+ TITLEBAR_BUTTON_COLOR_INACTIVE = 0x0020,
+ TITLEBAR_BUTTON_COLOR_MOUSE_OVER = 0x0040,
+ TITLEBAR_BUTTON_STD_COLOR = 0x0080,
+ TITLEBAR_BUTTON_COLOR_SYMBOL = 0x0100,
+ TITLEBAR_BUTTON_HOVER_SYMBOL_FULL = 0x0200,
+ TITLEBAR_BUTTON_SUNKEN_BACKGROUND = 0x0400,
+ TITLEBAR_BUTTOM_ARROW_MIN_MAX = 0x0800,
+ TITLEBAR_BUTTOM_HIDE_ON_INACTIVE_WINDOW = 0x1000,
+ TITLEBAR_BUTTON_ICON_COLOR = 0x2000
+} ETitleBarButtonFlags;
+
+typedef enum
+{
+ TITLEBAR_ICON_NONE,
+ TITLEBAR_ICON_MENU_BUTTON,
+ TITLEBAR_ICON_NEXT_TO_TITLE
+} ETitleBarIcon;
+
+typedef enum
+{
+ TITLEBAR_CLOSE,
+ TITLEBAR_MIN,
+ TITLEBAR_MAX,
+ TITLEBAR_HELP,
+ TITLEBAR_MENU,
+ TITLEBAR_SHADE,
+ TITLEBAR_ALL_DESKTOPS,
+ TITLEBAR_KEEP_ABOVE,
+ TITLEBAR_KEEP_BELOW,
+ NUM_TITLEBAR_BUTTONS
+} ETitleBarButtons;
+
+#define TBAR_VERSION_HACK 65535
+#define TBAR_BORDER_VERSION_HACK (TBAR_VERSION_HACK+1000)
+
+typedef std::map<int, QColor> TBCols;
#endif
typedef enum
{
+ WINDOW_BORDER_COLOR_TITLEBAR_ONLY = 0x01, // colorTitlebarOnly
+ WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR = 0x02, // titlebarMenuColor
+ WINDOW_BORDER_ADD_LIGHT_BORDER = 0x04, // titlebarBorder
+ WINDOW_BORDER_BLEND_TITLEBAR = 0x08, // titlebarBlend
+ WINDOW_BORDER_SEPARATOR = 0x10
+} EWindowBorder;
+
+typedef enum
+{
+ IMG_NONE,
+ IMG_BORDERED_RINGS,
+ IMG_PLAIN_RINGS,
+ IMG_SQUARE_RINGS,
+ IMG_FILE
+} EImageType;
+
+typedef struct
+{
+ EImageType type;
+ bool loaded;
+#if defined __cplusplus
+ QString file;
+ QPixmap pix;
+#else // __cplusplus
+ const char *file;
+ GdkPixbuf *pix;
+#endif // __cplusplus
+ int width, height;
+} QtCImage;
+
+typedef enum
+{
+ SQUARE_NONE = 0x0000,
+ SQUARE_ENTRY = 0x0001,
+ SQUARE_PROGRESS = 0x0002,
+ SQUARE_SCROLLVIEW = 0x0004,
+ SQUARE_LISTVIEW_SELECTION = 0x0008,
+ SQUARE_FRAME = 0x0010,
+ SQUARE_TAB_FRAME = 0x0020,
+ SQUARE_SLIDER = 0x0040,
+ SQUARE_SB_SLIDER = 0x0080,
+ SQUARE_WINDOWS = 0x0100,
+ SQUARE_TOOLTIPS = 0x0200,
+ SQUARE_POPUP_MENUS = 0x0400
+} ESquare;
+
+typedef enum
+{
+ WM_DRAG_NONE = 0,
+ WM_DRAG_MENUBAR = 1,
+ WM_DRAG_MENU_AND_TOOLBAR = 2,
+ WM_DRAG_ALL = 3
+} EWmDrag;
+
+typedef enum
+{
EFFECT_NONE,
EFFECT_ETCH,
EFFECT_SHADOW
@@ -314,14 +580,22 @@ typedef enum
typedef enum
{
+ PIX_CHECK,
+#ifdef __cplusplus
+#if defined QT_VERSION && (QT_VERSION < 0x040000)
+ PIX_RADIO_ON,
PIX_RADIO_BORDER,
+ PIX_RADIO_INNER,
PIX_RADIO_LIGHT,
- PIX_RADIO_ON,
- PIX_CHECK,
PIX_SLIDER,
PIX_SLIDER_LIGHT,
PIX_SLIDER_V,
- PIX_SLIDER_LIGHT_V
+ PIX_SLIDER_LIGHT_V,
+#endif
+ PIX_DOT
+#else
+ PIX_BLANK
+#endif
} EPixmap;
typedef enum
@@ -330,46 +604,109 @@ typedef enum
WIDGET_TAB_BOT,
WIDGET_STD_BUTTON,
WIDGET_DEF_BUTTON,
+ WIDGET_TOOLBAR_BUTTON,
WIDGET_LISTVIEW_HEADER,
WIDGET_SLIDER,
WIDGET_SLIDER_TROUGH,
+ WIDGET_FILLED_SLIDER_TROUGH,
WIDGET_SB_SLIDER,
WIDGET_SB_BUTTON,
+ WIDGET_SB_BGND,
WIDGET_TROUGH,
WIDGET_CHECKBOX,
- WIDGET_TOGGLE_BUTTON,
+ WIDGET_RADIO_BUTTON,
+ WIDGET_COMBO,
+ WIDGET_COMBO_BUTTON,
WIDGET_MENU_ITEM,
WIDGET_PROGRESSBAR,
+ WIDGET_PBAR_TROUGH,
#ifndef __cplusplus
+ WIDGET_ENTRY_PROGRESSBAR,
+ WIDGET_TOGGLE_BUTTON,
WIDGET_SPIN_UP,
WIDGET_SPIN_DOWN,
+ WIDGET_UNCOLOURED_MO_BUTTON,
+#else
+ WIDGET_CHECKBUTTON, // Qt4 only
+ WIDGET_MDI_WINDOW, // Qt4 only
+ WIDGET_MDI_WINDOW_TITLE, // Qt4 only
+ WIDGET_MDI_WINDOW_BUTTON, // Qt4 only
+ WIDGET_DOCK_WIDGET_TITLE,
+ WIDGET_DIAL,
#endif
WIDGET_SPIN,
-#ifdef __cplusplus
- WIDGET_CHECKBUTTON, // Qt4 only
- WIDGET_MDI_WINDOW, // Qt4 only
- WIDGET_MDI_WINDOW_TITLE, // Qt4 only
WIDGET_ENTRY,
+ WIDGET_SCROLLVIEW,
+ WIDGET_SELECTION,
WIDGET_FRAME,
WIDGET_NO_ETCH_BTN,
-#endif
+ WIDGET_MENU_BUTTON, // Qt4 only
+ WIDGET_FOCUS,
+ WIDGET_TAB_FRAME,
WIDGET_OTHER
} EWidget;
typedef enum
{
- APPEARANCE_FLAT,
+ APP_ALLOW_BASIC,
+ APP_ALLOW_FADE,
+ APP_ALLOW_STRIPED,
+ APP_ALLOW_NONE
+} EAppAllow;
+
+typedef enum
+{
+ APPEARANCE_CUSTOM1,
+ APPEARANCE_CUSTOM2,
+ APPEARANCE_CUSTOM3,
+ APPEARANCE_CUSTOM4,
+ APPEARANCE_CUSTOM5,
+ APPEARANCE_CUSTOM6,
+ APPEARANCE_CUSTOM7,
+ APPEARANCE_CUSTOM8,
+ APPEARANCE_CUSTOM9,
+ APPEARANCE_CUSTOM10,
+ APPEARANCE_CUSTOM11,
+ APPEARANCE_CUSTOM12,
+ APPEARANCE_CUSTOM13,
+ APPEARANCE_CUSTOM14,
+ APPEARANCE_CUSTOM15,
+ APPEARANCE_CUSTOM16,
+ APPEARANCE_CUSTOM17,
+ APPEARANCE_CUSTOM18,
+ APPEARANCE_CUSTOM19,
+ APPEARANCE_CUSTOM20,
+ APPEARANCE_CUSTOM21,
+ APPEARANCE_CUSTOM22,
+
+ NUM_CUSTOM_GRAD,
+
+ APPEARANCE_FLAT = NUM_CUSTOM_GRAD,
APPEARANCE_RAISED,
APPEARANCE_DULL_GLASS,
APPEARANCE_SHINY_GLASS,
+ APPEARANCE_AGUA,
+ APPEARANCE_SOFT_GRADIENT,
APPEARANCE_GRADIENT,
+ APPEARANCE_HARSH_GRADIENT,
APPEARANCE_INVERTED,
+ APPEARANCE_DARK_INVERTED,
APPEARANCE_SPLIT_GRADIENT,
- APPEARANCE_BEVELLED
+ APPEARANCE_BEVELLED,
+ APPEARANCE_FADE, /* Only for poupmenu items! */
+ APPEARANCE_STRIPED = APPEARANCE_FADE, /* Only for windows and menus */
+ APPEARANCE_NONE = APPEARANCE_FADE, /* Only for titlebars */
+ APPEARANCE_LV_BEVELLED, /* To be used only with getGradient */
+ APPEARANCE_AGUA_MOD,
+ APPEARANCE_LV_AGUA,
+ NUM_STD_APP = (APPEARANCE_LV_AGUA-NUM_CUSTOM_GRAD)+1
} EAppearance;
-#define IS_SLIDER(W) (WIDGET_SLIDER==W || WIDGET_SB_SLIDER==W)
-#define IS_TOGGLE_BUTTON(W) (WIDGET_TOGGLE_BUTTON==W || WIDGET_CHECKBOX==W)
+#define IS_SLIDER(W) (WIDGET_SLIDER==(W) || WIDGET_SB_SLIDER==(W))
+#define IS_TROUGH(W) (WIDGET_SLIDER_TROUGH==(W) || WIDGET_PBAR_TROUGH==(W) || WIDGET_TROUGH==(W) || WIDGET_FILLED_SLIDER_TROUGH==(W))
+#ifndef __cplusplus
+#define IS_TOGGLE_BUTTON(W) (WIDGET_TOGGLE_BUTTON==(W) || WIDGET_CHECKBOX==(W))
+#endif
typedef enum
{
@@ -379,49 +716,54 @@ typedef enum
CORNER_BL = 0x8
} ECornerBits;
-#define ROUNDED_NONE 0x0
-#define ROUNDED_TOP (CORNER_TL|CORNER_TR)
-#define ROUNDED_BOTTOM (CORNER_BL|CORNER_BR)
-#define ROUNDED_LEFT (CORNER_TL|CORNER_BL)
-#define ROUNDED_RIGHT (CORNER_TR|CORNER_BR)
-#define ROUNDED_TOPRIGHT CORNER_TR
-#define ROUNDED_BOTTOMRIGHT CORNER_BR
-#define ROUNDED_TOPLEFT CORNER_TL
-#define ROUNDED_BOTTOMLEFT CORNER_BL
-#define ROUNDED_ALL (CORNER_TL|CORNER_TR|CORNER_BR|CORNER_BL)
+#define ROUNDED_NONE 0x0
+#define ROUNDED_TOP (CORNER_TL|CORNER_TR)
+#define ROUNDED_BOTTOM (CORNER_BL|CORNER_BR)
+#define ROUNDED_LEFT (CORNER_TL|CORNER_BL)
+#define ROUNDED_RIGHT (CORNER_TR|CORNER_BR)
+#define ROUNDED_TOPRIGHT CORNER_TR
+#define ROUNDED_BOTTOMRIGHT CORNER_BR
+#define ROUNDED_TOPLEFT CORNER_TL
+#define ROUNDED_BOTTOMLEFT CORNER_BL
+#define ROUNDED_ALL (CORNER_TL|CORNER_TR|CORNER_BR|CORNER_BL)
typedef enum
{
IND_CORNER,
IND_FONT_COLOR,
IND_COLORED,
+ IND_TINT,
+ IND_GLOW,
+ IND_DARKEN,
+ IND_SELECTED,
IND_NONE
} EDefBtnIndicator;
typedef enum
{
+ LINE_NONE,
LINE_SUNKEN,
LINE_FLAT,
LINE_DOTS,
- LINE_DASHES
+ LINE_1DOT,
+ LINE_DASHES,
} ELine;
-#define LINE_NONE LINE_DASHES
-
typedef enum
{
TB_NONE,
TB_LIGHT,
TB_DARK,
TB_LIGHT_ALL,
- TB_DARK_ALL,
+ TB_DARK_ALL
} ETBarBorder;
typedef enum
{
BORDER_FLAT,
BORDER_RAISED,
- BORDER_SUNKEN
+ BORDER_SUNKEN,
+ BORDER_LIGHT
} EBorder;
/*
@@ -433,16 +775,26 @@ typedef enum
{
SHADE_NONE,
SHADE_CUSTOM,
- SHADE_BLEND_SELECTED, /* In the case of check/radios this is SHADE_SELECTED */
- SHADE_SELECTED,
- SHADE_DARKEN = SHADE_SELECTED , /* For menubar only! */
+ SHADE_SELECTED,
+ SHADE_BLEND_SELECTED,
+ SHADE_DARKEN,
+ SHADE_WINDOW_BORDER
} EShade;
typedef enum
{
+ ECOLOR_BASE,
+ ECOLOR_BACKGROUND,
+ ECOLOR_DARK,
+} EColor;
+
+typedef enum
+{
ROUND_NONE,
ROUND_SLIGHT,
- ROUND_FULL
+ ROUND_FULL,
+ ROUND_EXTRA,
+ ROUND_MAX
} ERound;
typedef enum
@@ -456,66 +808,437 @@ typedef enum
typedef enum
{
+ FRAME_NONE,
+ FRAME_PLAIN,
+ FRAME_LINE,
+ FRAME_SHADED,
+ FRAME_FADED
+} EFrame;
+
+typedef enum
+{
+ GB_LBL_BOLD = 0x01,
+ GB_LBL_CENTRED = 0x02,
+ GB_LBL_INSIDE = 0x04,
+ GB_LBL_OUTSIDE = 0x08
+} EGBLabel;
+
+#define NO_FRAME(A) (FRAME_NONE==(A) || FRAME_LINE==(A))
+
+typedef enum
+{
MO_NONE,
MO_COLORED,
- MO_PLASTIK
+ MO_COLORED_THICK,
+ MO_PLASTIK,
+ MO_GLOW
} EMouseOver;
typedef enum
{
STRIPE_NONE,
STRIPE_PLAIN,
- STRIPE_DIAGONAL
+ STRIPE_DIAGONAL,
+ STRIPE_FADE
} EStripe;
typedef enum
{
SLIDER_PLAIN,
SLIDER_ROUND,
+ SLIDER_PLAIN_ROTATED,
+ SLIDER_ROUND_ROTATED,
SLIDER_TRIANGULAR,
+ SLIDER_CIRCULAR
} ESliderStyle;
-#define DEF_IND_STR "fontcolor"
-#define DEF_LINE_STR "dots"
-#define DEF_TB_BORDER "none"
-#define DEF_APPEARANCE_STR "bevelled"
-#define DEF_MENU_APPEARANCE_STR "gradient"
-#define DEF_TOOLBAR_APPEARANCE_STR "gradient"
-#define DEF_SLIDER_SHADE_STR "selected"
-#define DEF_TBS_STR "dots"
-#define DEF_COLOR_STR "background"
-#define DEF_TOOLBAR_SHADE_STR "none"
+#define ROTATED_SLIDER (SLIDER_PLAIN_ROTATED==opts.sliderStyle || SLIDER_ROUND_ROTATED==opts.sliderStyle)
-#ifdef QTC_COMMON_FUNCTIONS
-static double getWidgetShade(EWidget w, bool light, bool sunken, EAppearance app)
+typedef enum
{
- switch(w)
+ FOCUS_STANDARD,
+ FOCUS_RECTANGLE,
+ FOCUS_FULL,
+ FOCUS_FILLED,
+ FOCUS_LINE,
+ FOCUS_GLOW
+} EFocus;
+
+typedef enum
+{
+ TAB_MO_TOP,
+ TAB_MO_BOTTOM,
+ TAB_MO_GLOW
+} ETabMo;
+
+typedef enum
+{
+ GT_HORIZ,
+ GT_VERT
+} EGradType;
+
+typedef enum
+{
+ GLOW_NONE,
+ GLOW_START,
+ GLOW_MIDDLE,
+ GLOW_END
+} EGlow;
+
+#define FULL_FOCUS (FOCUS_FULL==opts.focus || FOCUS_FILLED==opts.focus)
+
+enum
+{
+ HIDE_NONE = 0x00,
+ HIDE_KEYBOARD = 0x01,
+ HIDE_KWIN = 0x02
+};
+
+#if defined __cplusplus
+typedef enum
+{
+ ALIGN_LEFT,
+ ALIGN_CENTER,
+ ALIGN_FULL_CENTER,
+ ALIGN_RIGHT
+} EAlign;
+#endif
+
+#ifdef __cplusplus
+inline
+#else
+static
+#endif
+bool equal(double d1, double d2)
+{
+ return (fabs(d1 - d2) < 0.0001);
+}
+
+#ifdef __cplusplus
+struct GradientStop
+#else
+typedef struct
+#endif
+{
+#ifdef __cplusplus
+ GradientStop(double p=0.0, double v=0.0, double a=1.0) : pos(p), val(v), alpha(a) { }
+
+ bool operator==(const GradientStop &o) const
{
- case WIDGET_TROUGH:
- return light ? SHADE_SBAR_LIGHT : SHADE_SBAR_DARK;
- case WIDGET_SLIDER_TROUGH:
- return light ? SHADE_SLIDER_LIGHT : SHADE_SLIDER_DARK;
- case WIDGET_MENU_ITEM:
- if(APPEARANCE_DULL_GLASS!=app && APPEARANCE_SHINY_GLASS!=app)
- return light ? SHADE_BEVEL_MENU_ITEM_LIGHT : SHADE_BEVEL_MENU_ITEM_DARK;
- default:
- return light
- ? sunken
- ? SHADE_BEVEL_GRAD_SEL_LIGHT
- : SHADE_BEVEL_GRAD_LIGHT
- : sunken
- ? SHADE_BEVEL_GRAD_SEL_DARK
- : SHADE_BEVEL_GRAD_DARK;
+ return equal(pos, o.pos) && equal(val, o.val) && equal(alpha, o.alpha);
+ }
+
+ bool operator<(const GradientStop &o) const
+ {
+ return pos<o.pos || (equal(pos, o.pos) && (val<o.val || (equal(val, o.val) && alpha<o.alpha)));
}
+#endif
+
+ double pos,
+ val,
+ alpha;
}
+#ifndef __cplusplus
+GradientStop
+#endif
+;
-#define QTC_MIN(a, b) ((a) < (b) ? (a) : (b))
-#define QTC_MAX(a, b) ((b) < (a) ? (a) : (b))
+typedef enum
+{
+ GB_NONE,
+ GB_LIGHT,
+ GB_3D,
+ GB_3D_FULL,
+ GB_SHINE
+} EGradientBorder;
-static bool equal(double d1, double d2)
+typedef enum
{
- return (fabs(d1 - d2) < 0.0001);
+ LV_NONE,
+ LV_NEW,
+ LV_OLD
+} ELvLines;
+
+typedef struct
+{
+ int titleHeight,
+ toolTitleHeight,
+ bottom,
+ sides;
+} WindowBorders;
+
+#ifdef __cplusplus
+struct GradientStopCont : public std::set<GradientStop>
+{
+ GradientStopCont fix() const
+ {
+ GradientStopCont c(*this);
+ if(size())
+ {
+ GradientStopCont::const_iterator first(c.begin());
+ GradientStopCont::reverse_iterator last(c.rbegin());
+
+ if((*first).pos>0.001)
+ c.insert(GradientStop(0.0, 1.0));
+ if((*last).pos<0.999)
+ c.insert(GradientStop(1.0, 1.0));
+ }
+ return c;
+ }
+};
+struct Gradient
+#else
+typedef struct
+#endif
+{
+#ifdef __cplusplus
+ Gradient() : border(GB_3D) { }
+
+#ifdef CONFIG_DIALOG
+ bool operator==(const Gradient &o) const
+ {
+ return border==o.border && stops==o.stops;
+ }
+#endif
+#endif
+ EGradientBorder border;
+#ifdef __cplusplus
+ GradientStopCont stops;
+#else
+ int numStops;
+ GradientStop *stops;
+#endif
}
+#ifndef __cplusplus
+Gradient
+#endif
+;
+
+#define USE_CUSTOM_SHADES(A) ((A).customShades[0]>0.00001)
+#define USE_CUSTOM_ALPHAS(A) ((A).customAlphas[0]>0.00001)
+
+#ifdef __cplusplus
+typedef std::map<EAppearance, Gradient> GradientCont;
+struct Options
+#else
+typedef struct
+#endif
+{
+
+ int version,
+ contrast,
+ passwordChar,
+ highlightFactor,
+ lighterPopupMenuBgnd,
+ menuDelay,
+ sliderWidth,
+ tabBgnd,
+ colorSelTab,
+ expanderHighlight,
+ crHighlight,
+ splitterHighlight,
+ crSize,
+ gbFactor,
+ gbLabel;
+ ERound round;
+ bool embolden,
+ highlightTab,
+ roundAllTabs,
+ animatedProgress,
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ fixParentlessDialogs,
+#endif
+ customMenuTextColor,
+ menubarMouseOver,
+ useHighlightForMenu,
+ shadeMenubarOnlyWhenActive,
+ thinnerMenuItems,
+ thinnerBtns,
+ lvButton,
+ drawStatusBarFrames,
+ fillSlider,
+ roundMbTopOnly,
+ gtkScrollViews,
+ stdSidebarButtons,
+ toolbarTabs,
+#ifdef __cplusplus
+ gtkComboMenus,
+/*
+#else
+ setDialogButtonOrder,
+*/
+#endif
+ mapKdeIcons,
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+ gtkButtonOrder,
+ fadeLines,
+#endif
+ reorderGtkButtons,
+ borderMenuitems,
+ colorMenubarMouseOver,
+ darkerBorders,
+ vArrows,
+ xCheck,
+ crButton,
+ smallRadio,
+ fillProgress,
+ comboSplitter,
+ highlightScrollViews,
+ sunkenScrollViews,
+ etchEntry,
+ colorSliderMouseOver,
+ thinSbarGroove,
+ flatSbarButtons,
+ borderSbarGroove,
+ borderProgress,
+ popupBorder,
+ unifySpinBtns,
+ unifyCombo,
+ unifySpin,
+ borderTab,
+ borderInactiveTab,
+ doubleGtkComboArrow,
+ menuIcons,
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ stdBtnSizes,
+#endif
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ xbar,
+#endif
+ forceAlternateLvCols,
+ invertBotTab,
+ boldProgress,
+ coloredTbarMo,
+ borderSelection,
+ stripedSbar,
+ shadePopupMenu;
+ EFrame groupBox;
+ EGlow glowProgress;
+ ELvLines lvLines;
+ EGradType bgndGrad,
+ menuBgndGrad;
+ int menubarHiding,
+ statusbarHiding,
+ square,
+ windowDrag,
+ windowBorder,
+ bgndOpacity,
+ menuBgndOpacity,
+ dlgOpacity;
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ int dwtSettings;
+#endif
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ int titlebarButtons;
+ TBCols titlebarButtonColors;
+ ETitleBarIcon titlebarIcon;
+#endif
+ EStripe stripedProgress;
+ ESliderStyle sliderStyle;
+ EMouseOver coloredMouseOver;
+ ETBarBorder toolbarBorders;
+ EDefBtnIndicator defBtnIndicator;
+ ELine sliderThumbs,
+ handles,
+ toolbarSeparators,
+ splitters;
+ ETabMo tabMouseOver;
+/* NOTE: If add an appearance setting, increase the number of custmo gradients to match! */
+ EAppearance appearance,
+ bgndAppearance,
+ menuBgndAppearance,
+ menubarAppearance,
+ menuitemAppearance,
+ toolbarAppearance,
+ lvAppearance,
+ tabAppearance,
+ activeTabAppearance,
+ sliderAppearance,
+ titlebarAppearance,
+ inactiveTitlebarAppearance,
+#ifdef __cplusplus
+ titlebarButtonAppearance,
+ dwtAppearance,
+#endif
+ selectionAppearance,
+ menuStripeAppearance,
+ progressAppearance,
+ progressGrooveAppearance,
+ grooveAppearance,
+ sunkenAppearance,
+ sbarBgndAppearance,
+ sliderFill,
+ tooltipAppearance;
+ EShade shadeSliders,
+ shadeMenubars,
+ menuStripe,
+ shadeCheckRadio,
+ comboBtn,
+ sortedLv,
+ crColor,
+ progressColor;
+ EColor progressGrooveColor;
+ EEffect buttonEffect;
+ EScrollbar scrollbarType;
+ EFocus focus;
+ color customMenubarsColor,
+ customSlidersColor,
+ customMenuNormTextColor,
+ customMenuSelTextColor,
+ customMenuStripeColor,
+ customCheckRadioColor,
+ customComboBtnColor,
+ customSortedLvColor,
+ customCrBgndColor,
+ customProgressColor;
+ EShading shading;
+#if defined __cplusplus
+ EAlign titlebarAlignment;
+ EEffect titlebarEffect;
+ bool centerTabText;
+#endif
+ double customShades[NUM_STD_SHADES],
+ customAlphas[NUM_STD_ALPHAS];
+#ifdef __cplusplus
+ GradientCont customGradient;
+#else
+ Gradient *customGradient[NUM_CUSTOM_GRAD];
+#endif
+ QtCImage bgndImage,
+ menuBgndImage;
+#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ /* NOTE: If add any more settings here, need to alter copyOpts/freeOpts/defaultSettings in config_file.c */
+ Strings noBgndGradientApps,
+ noBgndOpacityApps,
+ noMenuBgndOpacityApps,
+ noBgndImageApps;
+#endif
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ Strings noDlgFixApps;
+#endif
+ Strings noMenuStripeApps;
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ Strings menubarApps,
+ statusbarApps,
+ useQtFileDialogApps,
+ windowDragWhiteList,
+ windowDragBlackList;
+#endif
+
+#ifndef __cplusplus
+} Options;
+#else
+};
+#endif
+
+#ifdef COMMON_FUNCTIONS
+
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef MAX
+#define MAX(a, b) ((b) < (a) ? (a) : (b))
+#endif
/* Taken from rgb->hsl routines taken from KColor
Copyright 2007 Matthew Woehlke <[email protected]>
@@ -551,8 +1274,8 @@ static inline double h2c(double h, double m1, double m2)
static inline void rgbToHsl(double r, double g, double b, double *h, double *s, double *l)
{
- double min=QTC_MIN(QTC_MIN(r, g), b),
- max=QTC_MAX(QTC_MAX(r, g), b);
+ double min=MIN(MIN(r, g), b),
+ max=MAX(MAX(r, g), b);
*l = 0.5 * (max + min);
*s = 0.0;
@@ -600,29 +1323,30 @@ static inline void hslToRgb(double h, double s, double l, double *r, double *g,
static void rgbToHsv(double r, double g, double b, double *h, double *s, double *v)
{
- double min=QTC_MIN(QTC_MIN(r, g), b),
- max=QTC_MAX(QTC_MAX(r, g), b),
+ double min=MIN(MIN(r, g), b),
+ max=MAX(MAX(r, g), b),
delta=max - min;
*v=max;
if(max != 0)
*s=delta / max;
else
- {
- /* r=g=b=0 s=0, v is undefined */
*s=0;
- *h=-1;
- return;
- }
- if(r == max)
- *h=(g - b) / delta; /* between yellow & magenta */
- else if(g == max)
- *h=2 + (b - r) / delta; /* between cyan & yellow */
+
+ if (*s==0.0)
+ *h = 0.0;
else
- *h=4 + (r - g) / delta; /* between magenta & cyan */
- *h *= 60; /* degrees */
- if(*h < 0)
- *h += 360;
+ {
+ if(r == max)
+ *h=(g - b) / delta; /* between yellow & magenta */
+ else if(g == max)
+ *h=2 + (b - r) / delta; /* between cyan & yellow */
+ else if(b == max)
+ *h=4 + (r - g) / delta; /* between magenta & cyan */
+ *h *= 60; /* degrees */
+ if(*h < 0)
+ *h += 360;
+ }
}
static void hsvToRgb(double *r, double *g, double *b, double h, double s, double v)
@@ -692,10 +1416,26 @@ inline int limit(double c)
}
#endif
+#if defined QT_VERSION && (QT_VERSION >= 0x040000) && !defined QTC_QT_ONLY
+#include <KDE/KColorUtils>
+#define tint(COLA, COLB, FACTOR) KColorUtils::tint((COLA), (COLB), (FACTOR))
+#define midColor(COLA, COLB) KColorUtils::mix((COLA), (COLB), 0.5)
+#else
+#include "colorutils.c"
+#ifdef __cplusplus
+#define tint(COLA, COLB, FACTOR) ColorUtils_tint(&(COLA), &(COLB), (FACTOR))
+#define midColor(COLA, COLB) ColorUtils_mix(&(COLA), &(COLB), 0.5)
+#define midColorF(COLA, COLB, FACTOR) ColorUtils_mix(&(COLA), &(COLB), FACTOR-0.5)
+#else
+#define tint(COLA, COLB, FACTOR) ColorUtils_tint((COLA), (COLB), (FACTOR))
+#define midColor(COLA, COLB) ColorUtils_mix((COLA), (COLB), 0.5)
+#endif
+#endif
+
#ifdef __cplusplus
-static void shade(const color &ca, color *cb, double k)
+static void shade(const Options *opts, const color &ca, color *cb, double k)
#else
-static void shade(const color *ca, color *cb, double k)
+static void shade(const Options *opts, const color *ca, color *cb, double k)
#endif
{
if(equal(k, 1.0))
@@ -709,7 +1449,7 @@ static void shade(const color *ca, color *cb, double k)
#endif
}
else
- switch(shading)
+ switch(opts->shading)
{
case SHADING_SIMPLE:
{
@@ -783,10 +1523,38 @@ static void shade(const color *ca, color *cb, double k)
cb->green=limit(g*65535.0);
cb->blue=limit(b*65535.0);
#endif
+ break;
+ }
+ case SHADING_HCY:
+ {
+ #define HCY_FACTOR 0.15
+ #if defined QT_VERSION && (QT_VERSION >= 0x040000) && !defined QTC_QT_ONLY
+ if(k>1.0)
+ *cb=KColorUtils::lighten(ca, (k*(1+HCY_FACTOR))-1.0, 1.0);
+ else
+ *cb=KColorUtils::darken(ca, 1.0-(k*(1-HCY_FACTOR)), 1.0);
+ #elif defined __cplusplus
+ if(k>1.0)
+ *cb=ColorUtils_lighten(&ca, (k*(1+HCY_FACTOR))-1.0, 1.0);
+ else
+ *cb=ColorUtils_darken(&ca, 1.0-(k*(1-HCY_FACTOR)), 1.0);
+ #else
+ if(k>1.0)
+ *cb=ColorUtils_lighten(ca, (k*(1+HCY_FACTOR))-1.0, 1.0);
+ else
+ *cb=ColorUtils_darken(ca, 1.0-(k*(1-HCY_FACTOR)), 1.0);
+ #endif
}
}
+#if defined __cplusplus && defined QT_VERSION && (QT_VERSION >= 0x040000)
+ cb->setAlpha(ca.alpha());
+#endif
+#ifndef __cplusplus
+ cb->pixel = ca->pixel;
+#endif
}
+#if (!defined CONFIG_DIALOG)
static unsigned char checkBounds(int num)
{
return num < 0 ? 0 :
@@ -835,121 +1603,445 @@ static void adjustPix(unsigned char *data, int numChannels, int w, int h, int st
offset+=stride;
}
}
-#endif /* QTC_COMMON_NO_FUNCTIONS */
+#endif
+
+static void setupGradient(Gradient *grad, EGradientBorder border, int numStops, ...)
+{
+ va_list ap;
+ int i;
+ grad->border=border;
+#ifndef __cplusplus
+ grad->numStops=numStops;
+ grad->stops=malloc(sizeof(GradientStop) * numStops);
+#endif
+ va_start(ap, numStops);
+ for(i=0; i<numStops; ++i)
+ {
+ double pos=va_arg(ap, double),
+ val=va_arg(ap, double);
#ifdef __cplusplus
-struct Options
+ grad->stops.insert(GradientStop(pos, val));
#else
-typedef struct
+ grad->stops[i].pos=pos;
+ grad->stops[i].val=val;
+ grad->stops[i].alpha=1.0;
#endif
+ }
+ va_end(ap);
+}
+
+static const Gradient * getGradient(EAppearance app, const Options *opts)
{
- int contrast,
- passwordChar;
- double highlightFactor;
- ERound round;
- bool embolden,
- lighterPopupMenuBgnd,
- highlightTab,
- colorSelTab,
- animatedProgress,
- fixParentlessDialogs,
- customMenuTextColor,
- menubarMouseOver,
- shadeMenubarOnlyWhenActive,
- thinnerMenuItems,
-#ifndef QTC_PLAIN_FOCUS_ONLY
- stdFocus,
-#endif
- lvLines,
- drawStatusBarFrames,
- fillSlider,
- roundMbTopOnly,
- gradientPbGroove,
+ if(IS_CUSTOM(app))
+ {
#ifdef __cplusplus
- stdSidebarButtons,
- gtkScrollViews,
- gtkComboMenus,
-/*
+ GradientCont::const_iterator grad(opts->customGradient.find(app));
+
+ if(grad!=opts->customGradient.end())
+ return &((*grad).second);
#else
- setDialogButtonOrder,
-*/
-#endif
-#if !defined __cplusplus || defined QTC_CONFIG_DIALOG
- mapKdeIcons,
-#endif
-#if defined QTC_CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
- gtkButtonOrder,
+ Gradient *grad=opts->customGradient[app-APPEARANCE_CUSTOM1];
+
+ if(grad)
+ return grad;
#endif
- borderMenuitems,
- colorMenubarMouseOver,
- darkerBorders,
- vArrows,
- xCheck,
- framelessGroupBoxes,
- inactiveHighlight;
- EStripe stripedProgress;
- ESliderStyle sliderStyle;
- EMouseOver coloredMouseOver;
- ETBarBorder toolbarBorders;
- EDefBtnIndicator defBtnIndicator;
- ELine sliderThumbs,
- handles,
- toolbarSeparators,
- splitters;
- EAppearance appearance,
- menubarAppearance,
- menuitemAppearance,
- toolbarAppearance,
- lvAppearance,
- tabAppearance,
- sliderAppearance,
- progressAppearance;
- EShade shadeSliders,
- shadeMenubars,
- shadeCheckRadio;
- EEffect buttonEffect;
- EScrollbar scrollbarType;
- color customMenubarsColor,
- customSlidersColor,
- customMenuNormTextColor,
- customMenuSelTextColor,
- customCheckRadioColor;
- #ifdef QTC_CONFIG_DIALOG
- EShading shading;
- #endif
-#ifndef __cplusplus
-} Options;
-#else
-};
+ app=APPEARANCE_RAISED;
+ }
+
+ {
+ static Gradient stdGradients[NUM_STD_APP];
+ static bool init=false;
+
+ if(!init)
+ {
+ setupGradient(&stdGradients[APPEARANCE_FLAT-APPEARANCE_FLAT], GB_3D,2,0.0,1.0,1.0,1.0);
+ setupGradient(&stdGradients[APPEARANCE_RAISED-APPEARANCE_FLAT], GB_3D_FULL,2,0.0,1.0,1.0,1.0);
+ setupGradient(&stdGradients[APPEARANCE_DULL_GLASS-APPEARANCE_FLAT], GB_LIGHT,4,0.0,1.05,0.499,0.984,0.5,0.928,1.0,1.0);
+ setupGradient(&stdGradients[APPEARANCE_SHINY_GLASS-APPEARANCE_FLAT], GB_LIGHT,4,0.0,1.2,0.499,0.984,0.5,0.9,1.0,1.06);
+ setupGradient(&stdGradients[APPEARANCE_AGUA-APPEARANCE_FLAT], GB_SHINE, 2,0.0,0.6,1.0,1.1);
+ setupGradient(&stdGradients[APPEARANCE_SOFT_GRADIENT-APPEARANCE_FLAT], GB_3D,2,0.0,1.04,1.0,0.98);
+ setupGradient(&stdGradients[APPEARANCE_GRADIENT-APPEARANCE_FLAT], GB_3D,2,0.0,1.1,1.0,0.94);
+ setupGradient(&stdGradients[APPEARANCE_HARSH_GRADIENT-APPEARANCE_FLAT], GB_3D,2,0.0,1.3,1.0,0.925);
+ setupGradient(&stdGradients[APPEARANCE_INVERTED-APPEARANCE_FLAT], GB_3D,2,0.0,0.93,1.0,1.04);
+ setupGradient(&stdGradients[APPEARANCE_DARK_INVERTED-APPEARANCE_FLAT], GB_NONE,3,0.0,0.8,0.7,0.95,1.0,1.0);
+ setupGradient(&stdGradients[APPEARANCE_SPLIT_GRADIENT-APPEARANCE_FLAT], GB_3D,4,0.0,1.06,0.499,1.004,0.5,0.986,1.0,0.92);
+ setupGradient(&stdGradients[APPEARANCE_BEVELLED-APPEARANCE_FLAT], GB_3D,4,0.0,1.05,0.1,1.02,0.9,0.985,1.0,0.94);
+ setupGradient(&stdGradients[APPEARANCE_LV_BEVELLED-APPEARANCE_FLAT], GB_3D,3,0.0,1.00,0.85,1.0,1.0,0.90);
+ setupGradient(&stdGradients[APPEARANCE_AGUA_MOD-APPEARANCE_FLAT], GB_NONE,3,0.0,1.5,0.49,0.85,1.0,1.3);
+ setupGradient(&stdGradients[APPEARANCE_LV_AGUA-APPEARANCE_FLAT], GB_NONE,4,0.0,0.98,0.35,0.95,0.4,0.93,1.0,1.15);
+ init=true;
+ }
+
+ return &stdGradients[app-APPEARANCE_FLAT];
+ }
+
+ return 0L; /* Will never happen! */
+}
+
#endif
-#if defined QTC_COMMON_FUNCTIONS && !defined QTC_CONFIG_DIALOG
+#if defined COMMON_FUNCTIONS && !defined CONFIG_DIALOG
+
+#ifdef __cplusplus
+static EAppearance widgetApp(EWidget w, const Options *opts, bool active=true)
+#else
static EAppearance widgetApp(EWidget w, const Options *opts)
+#endif
{
switch(w)
{
+ case WIDGET_SB_BGND:
+ return opts->sbarBgndAppearance;
case WIDGET_LISTVIEW_HEADER:
return opts->lvAppearance;
case WIDGET_SB_BUTTON:
case WIDGET_SLIDER:
case WIDGET_SB_SLIDER:
return opts->sliderAppearance;
+ case WIDGET_FILLED_SLIDER_TROUGH:
+ return opts->sliderFill;
case WIDGET_TAB_TOP:
case WIDGET_TAB_BOT:
return opts->tabAppearance;
case WIDGET_MENU_ITEM:
return opts->menuitemAppearance;
case WIDGET_PROGRESSBAR:
+#ifndef __cplusplus
+ case WIDGET_ENTRY_PROGRESSBAR:
+#endif
return opts->progressAppearance;
+ case WIDGET_PBAR_TROUGH:
+ return opts->progressGrooveAppearance;
+ case WIDGET_SELECTION:
+ return opts->selectionAppearance;
+#ifdef __cplusplus
+ case WIDGET_DOCK_WIDGET_TITLE:
+ return opts->dwtAppearance;
+ case WIDGET_MDI_WINDOW:
+ case WIDGET_MDI_WINDOW_TITLE:
+ return active ? opts->titlebarAppearance : opts->inactiveTitlebarAppearance;
+ case WIDGET_MDI_WINDOW_BUTTON:
+ return opts->titlebarButtonAppearance;
+ case WIDGET_DIAL:
+ return IS_FLAT(opts->appearance) ? APPEARANCE_RAISED : APPEARANCE_SOFT_GRADIENT;
+#endif
+ case WIDGET_TROUGH:
case WIDGET_SLIDER_TROUGH:
- return APPEARANCE_FLAT==opts->appearance || APPEARANCE_RAISED==opts->appearance
- ? APPEARANCE_FLAT : APPEARANCE_GRADIENT;
+ return opts->grooveAppearance;
+#ifndef __cplusplus
+ case WIDGET_SPIN_UP:
+ case WIDGET_SPIN_DOWN:
+#endif
+ case WIDGET_SPIN:
+ return MODIFY_AGUA(opts->appearance);
default:
break;
}
return opts->appearance;
};
+
+#define MIN_ROUND_FULL_SIZE 8
+#ifdef __cplusplus
+#define MIN_ROUND_EXTRA_SIZE(W) (WIDGET_SPIN==(W) ? 7 : 14)
+#else
+#define MIN_ROUND_EXTRA_SIZE(W) (WIDGET_SPIN_UP==(W) || WIDGET_SPIN_DOWN==(W) || WIDGET_SPIN==(W) ? 7 : 14)
+#endif
+#define MIN_ROUND_MAX_HEIGHT 12
+#define MIN_ROUND_MAX_WIDTH 24
+
+#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+
+#if defined __cplusplus
+#define EXTRA_INNER_RADIUS 3.5
+#define EXTRA_OUTER_RADIUS 4.5
+#define EXTRA_ETCH_RADIUS 5.5
+#define FULL_INNER_RADIUS 1.5
+#define FULL_OUTER_RADIUS 2.5
+#define FULL_ETCH_RADIUS 3.5
+
+#if defined QT_VERSION && (QT_VERSION < 0x040600)
+#define SLIGHT_INNER_RADIUS 0.5
+#define SLIGHT_OUTER_RADIUS 1.5
+#define SLIGHT_ETCH_RADIUS 2.5
+#else
+#define SLIGHT_INNER_RADIUS 0.75
+#define SLIGHT_OUTER_RADIUS 1.75
+#define SLIGHT_ETCH_RADIUS 2.75
#endif
+#else
+#define EXTRA_INNER_RADIUS 4
+#define EXTRA_OUTER_RADIUS 5
+#define EXTRA_ETCH_RADIUS 6
+#define FULL_INNER_RADIUS 2
+#define FULL_OUTER_RADIUS 3
+#define FULL_ETCH_RADIUS 4
+#define SLIGHT_INNER_RADIUS 1
+#define SLIGHT_OUTER_RADIUS 2
+#define SLIGHT_ETCH_RADIUS 3
#endif
+
+#define MAX_RADIUS_INTERNAL 9.0
+#define MAX_RADIUS_EXTERNAL (MAX_RADIUS_INTERNAL+2.0)
+
+typedef enum
+{
+ RADIUS_SELECTION,
+ RADIUS_INTERNAL,
+ RADIUS_EXTERNAL,
+ RADIUS_ETCH
+} ERadius;
+
+#ifdef __cplusplus
+#define IS_MAX_ROUND_WIDGET(A) \
+ (WIDGET_STD_BUTTON==A || WIDGET_DEF_BUTTON==A /*|| WIDGET_MENU_BUTTON==A*/)
+#define IS_EXTRA_ROUND_WIDGET(A) \
+ (A!=WIDGET_MENU_ITEM && A!=WIDGET_TAB_FRAME && A!=WIDGET_PBAR_TROUGH && A!=WIDGET_PROGRESSBAR && \
+ A!=WIDGET_MDI_WINDOW && A!=WIDGET_MDI_WINDOW_TITLE)
+#else
+#define IS_MAX_ROUND_WIDGET(A) \
+ (WIDGET_STD_BUTTON==A || WIDGET_DEF_BUTTON==A || WIDGET_TOGGLE_BUTTON==A /*|| WIDGET_MENU_BUTTON==A*/)
+#define IS_EXTRA_ROUND_WIDGET(A) \
+ (A!=WIDGET_MENU_ITEM && A!=WIDGET_TAB_FRAME && A!=WIDGET_PBAR_TROUGH && A!=WIDGET_PROGRESSBAR)
+#endif
+
+#define CAN_EXTRA_ROUND(MOD) \
+ (IS_EXTRA_ROUND_WIDGET(widget) && \
+ (IS_SLIDER(widget) || WIDGET_TROUGH==widget || \
+ ( ( (w>(MIN_ROUND_EXTRA_SIZE(widget)+MOD)) || (WIDGET_NO_ETCH_BTN==widget || WIDGET_MENU_BUTTON==widget) ) &&\
+ (h>(MIN_ROUND_EXTRA_SIZE(widget)+MOD)))))
+#define CAN_FULL_ROUND(MOD) (w>(MIN_ROUND_FULL_SIZE+MOD) && h>(MIN_ROUND_FULL_SIZE+MOD))
+
+// **NOTE** MUST KEEP IN SYNC WITH getRadius/RADIUS_ETCH !!!
+ERound getWidgetRound(const Options *opts, int w, int h, EWidget widget)
+{
+ ERound r=opts->round;
+
+ if( ((WIDGET_PBAR_TROUGH==widget || WIDGET_PROGRESSBAR==widget) && (opts->square&SQUARE_PROGRESS)) ||
+ (WIDGET_ENTRY==widget && (opts->square&SQUARE_ENTRY)) )
+ return ROUND_NONE;
+
+ if((WIDGET_CHECKBOX==widget || WIDGET_FOCUS==widget) && ROUND_NONE!=r)
+ r=ROUND_SLIGHT;
+
+#if defined __cplusplus && (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ if((WIDGET_MDI_WINDOW_BUTTON==widget && (opts->titlebarButtons&TITLEBAR_BUTTON_ROUND)) ||
+ WIDGET_RADIO_BUTTON==widget || WIDGET_DIAL==widget)
+ return ROUND_MAX;
+#endif
+#ifndef __cplusplus
+ if(WIDGET_RADIO_BUTTON==widget)
+ return ROUND_MAX;
+#endif
+
+#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ if(WIDGET_SLIDER==widget &&
+ (SLIDER_ROUND==opts->sliderStyle || SLIDER_ROUND_ROTATED==opts->sliderStyle || SLIDER_CIRCULAR==opts->sliderStyle))
+ return ROUND_MAX;
+#endif
+
+ switch(r)
+ {
+ case ROUND_MAX:
+ if(IS_SLIDER(widget) || WIDGET_TROUGH==widget ||
+ (w>(MIN_ROUND_MAX_WIDTH+2) && h>(MIN_ROUND_MAX_HEIGHT+2) && IS_MAX_ROUND_WIDGET(widget)))
+ return ROUND_MAX;
+ case ROUND_EXTRA:
+ if(CAN_EXTRA_ROUND(2))
+ return ROUND_EXTRA;
+ case ROUND_FULL:
+ if(CAN_FULL_ROUND(2))
+ return ROUND_FULL;
+ case ROUND_SLIGHT:
+ return ROUND_SLIGHT;
+ case ROUND_NONE:
+ return ROUND_NONE;
+ }
+
+ return ROUND_NONE;
+}
+
+static double getRadius(const Options *opts, int w, int h, EWidget widget, ERadius rad)
+{
+ ERound r=opts->round;
+
+ if((WIDGET_CHECKBOX==widget || WIDGET_FOCUS==widget) && ROUND_NONE!=r)
+ r=ROUND_SLIGHT;
+
+ if( ((WIDGET_PBAR_TROUGH==widget || WIDGET_PROGRESSBAR==widget) && (opts->square&SQUARE_PROGRESS)) ||
+ (WIDGET_ENTRY==widget && (opts->square&SQUARE_ENTRY)) )
+ return 0.0;
+
+#if defined __cplusplus && (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ if((WIDGET_MDI_WINDOW_BUTTON==widget && (opts->titlebarButtons&TITLEBAR_BUTTON_ROUND)) ||
+ WIDGET_RADIO_BUTTON==widget || WIDGET_DIAL==widget)
+ return (w>h ? h : w)/2.0;
+#endif
+#ifndef __cplusplus
+ if(WIDGET_RADIO_BUTTON==widget)
+ return (w>h ? h : w)/2.0;
+#endif
+
+#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ if(WIDGET_SLIDER==widget &&
+ (SLIDER_ROUND==opts->sliderStyle || SLIDER_ROUND_ROTATED==opts->sliderStyle || SLIDER_CIRCULAR==opts->sliderStyle))
+ return (w>h ? h : w)/2.0;
+#endif
+
+ if(RADIUS_EXTERNAL==rad && !opts->fillProgress && (WIDGET_PROGRESSBAR==widget
+#ifndef __cplusplus
+ || WIDGET_ENTRY_PROGRESSBAR==widget
+#endif
+ ))
+ rad=RADIUS_INTERNAL;
+
+ switch(rad)
+ {
+ case RADIUS_SELECTION:
+ switch(r)
+ {
+ case ROUND_MAX:
+ case ROUND_EXTRA:
+ if(/* (WIDGET_RUBBER_BAND==widget && w>14 && h>14) || */(w>48 && h>48))
+ return 6.0;
+ case ROUND_FULL:
+// if( /*(WIDGET_RUBBER_BAND==widget && w>11 && h>11) || */(w>48 && h>48))
+// return 3.0;
+ if(w>MIN_ROUND_FULL_SIZE && h>MIN_ROUND_FULL_SIZE)
+ return 3.0;
+ case ROUND_SLIGHT:
+ return 2.0;
+ case ROUND_NONE:
+ return 0;
+ }
+ case RADIUS_INTERNAL:
+ switch(r)
+ {
+ case ROUND_MAX:
+ if(IS_SLIDER(widget) || WIDGET_TROUGH==widget)
+ {
+ double r=((w>h ? h : w)-(WIDGET_SLIDER==widget ? 1 : 0))/2.0;
+ return r>MAX_RADIUS_INTERNAL ? MAX_RADIUS_INTERNAL : r;
+ }
+ if(w>(MIN_ROUND_MAX_WIDTH-2) && h>(MIN_ROUND_MAX_HEIGHT-2) && IS_MAX_ROUND_WIDGET(widget))
+ {
+ double r=((w>h ? h : w)-2.0)/2.0;
+ return r>9.5 ? 9.5 : r;
+ }
+ case ROUND_EXTRA:
+ if(CAN_EXTRA_ROUND(-2))
+ return EXTRA_INNER_RADIUS;
+ case ROUND_FULL:
+ if(CAN_FULL_ROUND(-2))
+ return FULL_INNER_RADIUS;
+ case ROUND_SLIGHT:
+ return SLIGHT_INNER_RADIUS;
+ case ROUND_NONE:
+ return 0;
+ }
+ case RADIUS_EXTERNAL:
+ switch(r)
+ {
+ case ROUND_MAX:
+ if(IS_SLIDER(widget) || WIDGET_TROUGH==widget)
+ {
+ double r=((w>h ? h : w)-(WIDGET_SLIDER==widget ? 1 : 0))/2.0;
+ return r>MAX_RADIUS_EXTERNAL ? MAX_RADIUS_EXTERNAL : r;
+ }
+ if(w>MIN_ROUND_MAX_WIDTH && h>MIN_ROUND_MAX_HEIGHT && IS_MAX_ROUND_WIDGET(widget))
+ {
+ double r=((w>h ? h : w)-2.0)/2.0;
+ return r>10.5 ? 10.5 : r;
+ }
+ case ROUND_EXTRA:
+ if(CAN_EXTRA_ROUND(0))
+ return EXTRA_OUTER_RADIUS;
+ case ROUND_FULL:
+ if(CAN_FULL_ROUND(0))
+ return FULL_OUTER_RADIUS;
+ case ROUND_SLIGHT:
+ return SLIGHT_OUTER_RADIUS;
+ case ROUND_NONE:
+ return 0;
+ }
+ case RADIUS_ETCH:
+ // **NOTE** MUST KEEP IN SYNC WITH getWidgetRound !!!
+ switch(r)
+ {
+ case ROUND_MAX:
+ if(IS_SLIDER(widget) || WIDGET_TROUGH==widget)
+ {
+ double r=((w>h ? h : w)-(WIDGET_SLIDER==widget ? 1 : 0))/2.0;
+ return r>MAX_RADIUS_EXTERNAL ? MAX_RADIUS_EXTERNAL : r;
+ }
+ if(w>(MIN_ROUND_MAX_WIDTH+2) && h>(MIN_ROUND_MAX_HEIGHT+2) && IS_MAX_ROUND_WIDGET(widget))
+ {
+ double r=((w>h ? h : w)-2.0)/2.0;
+ return r>11.5 ? 11.5 : r;
+ }
+ case ROUND_EXTRA:
+ if(CAN_FULL_ROUND(2))
+ return EXTRA_ETCH_RADIUS;
+ case ROUND_FULL:
+ if(w>(MIN_ROUND_FULL_SIZE+2) && h>(MIN_ROUND_FULL_SIZE+2))
+ return FULL_ETCH_RADIUS;
+ case ROUND_SLIGHT:
+ return SLIGHT_ETCH_RADIUS;
+ case ROUND_NONE:
+ return 0;
+ }
+ }
+
+ return 0;
+}
+
+static double qtcRingAlpha[3]={0.125, 0.125, 0.5};
+
+static void calcRingAlphas(const color *bgnd)
+{
+#ifdef __cplusplus
+ double r=bgnd->red()/255.0,
+ g=bgnd->green()/255.0,
+ b=bgnd->blue()/255.0,
+#else
+ double r=bgnd->red/65535.0,
+ g=bgnd->green/65535.0,
+ b=bgnd->blue/65535.0,
+#endif
+ h=0,
+ s=0,
+ v=0;
+ rgbToHsv(r, g, b, &h, &s, &v);
+ qtcRingAlpha[0]=v*0.26;
+ qtcRingAlpha[1]=v*0.14;
+ qtcRingAlpha[2]=v*0.55;
+}
+
+#define BGND_SHINE_SIZE 300
+#define BGND_SHINE_STEPS 8
+
+static double shineAlpha(const color *bgnd)
+{
+#ifdef __cplusplus
+ double r=bgnd->red()/255.0,
+ g=bgnd->green()/255.0,
+ b=bgnd->blue()/255.0,
+#else
+ double r=bgnd->red/65535.0,
+ g=bgnd->green/65535.0,
+ b=bgnd->blue/65535.0,
+#endif
+ h=0,
+ s=0,
+ v=0;
+ rgbToHsv(r, g, b, &h, &s, &v);
+ return v*0.8;
+}
+
+#endif
+
+#endif
+
+#endif // __COMMON_H__
diff --git a/common/config_file.c b/common/config_file.c
index 930ce21..7174286 100644
--- a/common/config_file.c
+++ b/common/config_file.c
@@ -1,5 +1,5 @@
-/*
- QtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
+ /*
+ QtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -23,15 +23,40 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <pwd.h>
#include <sys/types.h>
-#define QTC_MAX_FILENAME_LEN 1024
-#define QTC_MAX_INPUT_LINE_LEN 256
-#define QTC_FILE "qtcurvestylerc"
+#ifndef _WIN32
+#include <unistd.h>
+#include <pwd.h>
+#endif
+
+#define MAKE_VERSION(a, b) (((a) << 16) | ((b) << 8))
+#define MAKE_VERSION3(a, b, c) (((a) << 16) | ((b) << 8) | (c))
+
+#define MAX_CONFIG_FILENAME_LEN 1024
+#define MAX_CONFIG_INPUT_LINE_LEN 256
+#define CONFIG_FILE "stylerc"
+#define OLD_CONFIG_FILE "qtcurvestylerc"
+#define VERSION_KEY "version"
+
+#ifdef __cplusplus
+
+#if QT_VERSION >= 0x040000
+#include <QMap>
+#include <QFile>
+#include <QTextStream>
+#define TO_LATIN1(A) A.toLatin1().constData()
+#else
+#define TO_LATIN1(A) A.latin1()
+
+#include <qmap.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#endif
+
+#endif // __cplusplus
#ifdef CONFIG_READ
static int c2h(char ch)
@@ -78,6 +103,14 @@ static EDefBtnIndicator toInd(const char *str, EDefBtnIndicator def)
return IND_CORNER;
if(0==memcmp(str, "colored", 7))
return IND_COLORED;
+ if(0==memcmp(str, "tint", 4))
+ return IND_TINT;
+ if(0==memcmp(str, "glow", 4))
+ return IND_GLOW;
+ if(0==memcmp(str, "darken", 6))
+ return IND_DARKEN;
+ if(0==memcmp(str, "origselected", 12))
+ return IND_SELECTED;
}
return def;
@@ -97,6 +130,8 @@ static ELine toLine(const char *str, ELine def)
return LINE_DOTS;
if(0==memcmp(str, "flat", 4))
return LINE_FLAT;
+ if(0==memcmp(str, "1dot", 5))
+ return LINE_1DOT;
}
return def;
}
@@ -121,15 +156,19 @@ static EMouseOver toMouseOver(const char *str, EMouseOver def)
{
if(0==memcmp(str, "true", 4) || 0==memcmp(str, "colored", 7))
return MO_COLORED;
+ if(0==memcmp(str, "thickcolored", 12))
+ return MO_COLORED_THICK;
if(0==memcmp(str, "plastik", 7))
return MO_PLASTIK;
+ if(0==memcmp(str, "glow", 4))
+ return MO_GLOW;
if(0==memcmp(str, "false", 4) || 0==memcmp(str, "none", 4))
return MO_NONE;
}
return def;
}
-static EAppearance toAppearance(const char *str, EAppearance def)
+static EAppearance toAppearance(const char *str, EAppearance def, EAppAllow allow)
{
if(str)
{
@@ -137,35 +176,69 @@ static EAppearance toAppearance(const char *str, EAppearance def)
return APPEARANCE_FLAT;
if(0==memcmp(str, "raised", 6))
return APPEARANCE_RAISED;
- if(0==memcmp(str, "gradient", 8) || 0==memcmp(str, "lightgradient", 13))
- return APPEARANCE_GRADIENT;
- if(0==memcmp(str, "splitgradient", 13))
- return APPEARANCE_SPLIT_GRADIENT;
- if(0==memcmp(str, "glass", 5) || 0==memcmp(str, "shinyglass", 10))
- return APPEARANCE_SHINY_GLASS;
if(0==memcmp(str, "dullglass", 9))
return APPEARANCE_DULL_GLASS;
+ if(0==memcmp(str, "glass", 5) || 0==memcmp(str, "shinyglass", 10))
+ return APPEARANCE_SHINY_GLASS;
+ if(0==memcmp(str, "agua", 4))
+#if defined __cplusplus && !defined CONFIG_DIALOG && defined QT_VERSION && QT_VERSION < 0x040000
+ return APPEARANCE_AGUA_MOD;
+#else
+ return APPEARANCE_AGUA;
+#endif
+ if(0==memcmp(str, "soft", 4))
+ return APPEARANCE_SOFT_GRADIENT;
+ if(0==memcmp(str, "gradient", 8) || 0==memcmp(str, "lightgradient", 13))
+ return APPEARANCE_GRADIENT;
+ if(0==memcmp(str, "harsh", 5))
+ return APPEARANCE_HARSH_GRADIENT;
if(0==memcmp(str, "inverted", 8))
return APPEARANCE_INVERTED;
+ if(0==memcmp(str, "darkinverted", 12))
+ return APPEARANCE_DARK_INVERTED;
+ if(0==memcmp(str, "splitgradient", 13))
+ return APPEARANCE_SPLIT_GRADIENT;
if(0==memcmp(str, "bevelled", 8))
return APPEARANCE_BEVELLED;
+ if(APP_ALLOW_FADE==allow && 0==memcmp(str, "fade", 4))
+ return APPEARANCE_FADE;
+ if(APP_ALLOW_STRIPED==allow && 0==memcmp(str, "striped", 7))
+ return APPEARANCE_STRIPED;
+ if(APP_ALLOW_NONE==allow && 0==memcmp(str, "none", 4))
+ return APPEARANCE_NONE;
+
+ if(0==memcmp(str, "customgradient", 14) && strlen(str)>14)
+ {
+ int i=atoi(&str[14]);
+
+ i--;
+ if(i>=0 && i<NUM_CUSTOM_GRAD)
+ return (EAppearance)(APPEARANCE_CUSTOM1+i);
+ }
}
return def;
}
-static EShade toShade(const char *str, bool allowDarken, EShade def)
+static EShade toShade(const char *str, bool allowMenu, EShade def, bool menuShade, color *col)
{
if(str)
{
/* true/false is from 0.25... */
- if(0==memcmp(str, "true", 4) || 0==memcmp(str, "selected", 8))
+ if((!menuShade && 0==memcmp(str, "true", 4)) || 0==memcmp(str, "selected", 8))
return SHADE_BLEND_SELECTED;
if(0==memcmp(str, "origselected", 12))
return SHADE_SELECTED;
- if(allowDarken && 0==memcmp(str, "darken", 6))
+ if(allowMenu && (0==memcmp(str, "darken", 6) || (menuShade && 0==memcmp(str, "true", 4))))
return SHADE_DARKEN;
+ if(allowMenu && 0==memcmp(str, "wborder", 7))
+ return SHADE_WINDOW_BORDER;
if(0==memcmp(str, "custom", 6))
return SHADE_CUSTOM;
+ if('#'==str[0] && col)
+ {
+ setRgb(col, str);
+ return SHADE_CUSTOM;
+ }
if(0==memcmp(str, "none", 4))
return SHADE_NONE;
}
@@ -184,6 +257,10 @@ static ERound toRound(const char *str, ERound def)
return ROUND_SLIGHT;
if(0==memcmp(str, "full", 4))
return ROUND_FULL;
+ if(0==memcmp(str, "extra", 5))
+ return ROUND_EXTRA;
+ if(0==memcmp(str, "max", 3))
+ return ROUND_MAX;
}
return def;
@@ -208,6 +285,25 @@ static EScrollbar toScrollbar(const char *str, EScrollbar def)
return def;
}
+static EFrame toFrame(const char *str, EFrame def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "none", 4))
+ return FRAME_NONE;
+ if(0==memcmp(str, "plain", 5))
+ return FRAME_PLAIN;
+ if(0==memcmp(str, "line", 4))
+ return FRAME_LINE;
+ if(0==memcmp(str, "shaded", 6))
+ return FRAME_SHADED;
+ if(0==memcmp(str, "faded", 5))
+ return FRAME_FADED;
+ }
+
+ return def;
+}
+
static EEffect toEffect(const char *str, EEffect def)
{
if(str)
@@ -223,7 +319,7 @@ static EEffect toEffect(const char *str, EEffect def)
return def;
}
-static EShading toShading(const char * str, EShading def)
+static EShading toShading(const char *str, EShading def)
{
if(str)
{
@@ -233,12 +329,14 @@ static EShading toShading(const char * str, EShading def)
return SHADING_HSL;
if(0==memcmp(str, "hsv", 3))
return SHADING_HSV;
+ if(0==memcmp(str, "hcy", 3))
+ return SHADING_HCY;
}
return def;
}
-static EStripe toStripe(const char * str, EStripe def)
+static EStripe toStripe(const char *str, EStripe def)
{
if(str)
{
@@ -248,12 +346,14 @@ static EStripe toStripe(const char * str, EStripe def)
return STRIPE_NONE;
if(0==memcmp(str, "diagonal", 8))
return STRIPE_DIAGONAL;
+ if(0==memcmp(str, "fade", 4))
+ return STRIPE_FADE;
}
return def;
}
-static ESliderStyle toSlider(const char * str, ESliderStyle def)
+static ESliderStyle toSlider(const char *str, ESliderStyle def)
{
if(str)
{
@@ -261,23 +361,191 @@ static ESliderStyle toSlider(const char * str, ESliderStyle def)
return SLIDER_ROUND;
if(0==memcmp(str, "plain", 5))
return SLIDER_PLAIN;
+ if(0==memcmp(str, "r-round", 7))
+ return SLIDER_ROUND_ROTATED;
+ if(0==memcmp(str, "r-plain", 7))
+ return SLIDER_PLAIN_ROTATED;
if(0==memcmp(str, "triangular", 10))
return SLIDER_TRIANGULAR;
+ if(0==memcmp(str, "circular", 8))
+ return SLIDER_CIRCULAR;
+ }
+
+ return def;
+}
+
+static EColor toEColor(const char *str, EColor def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "base", 4))
+ return ECOLOR_BASE;
+ if(0==memcmp(str, "dark", 4))
+ return ECOLOR_DARK;
+ if(0==memcmp(str, "background", 10))
+ return ECOLOR_BACKGROUND;
+ }
+
+ return def;
+}
+
+static EFocus toFocus(const char *str, EFocus def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "standard", 8))
+ return FOCUS_STANDARD;
+ if(0==memcmp(str, "rect", 4) || 0==memcmp(str, "highlight", 9))
+ return FOCUS_RECTANGLE;
+ if(0==memcmp(str, "filled", 6))
+ return FOCUS_FILLED;
+ if(0==memcmp(str, "full", 4))
+ return FOCUS_FULL;
+ if(0==memcmp(str, "line", 4))
+ return FOCUS_LINE;
+ if(0==memcmp(str, "glow", 4))
+ return FOCUS_GLOW;
+ }
+
+ return def;
+}
+
+static ETabMo toTabMo(const char *str, ETabMo def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "top", 3))
+ return TAB_MO_TOP;
+ if(0==memcmp(str, "bot", 3))
+ return TAB_MO_BOTTOM;
+ if(0==memcmp(str, "glow", 4))
+ return TAB_MO_GLOW;
+ }
+
+ return def;
+}
+
+static EGradType toGradType(const char *str, EGradType def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "horiz", 5))
+ return GT_HORIZ;
+ if(0==memcmp(str, "vert", 4))
+ return GT_VERT;
}
+ return def;
+}
+static ELvLines toLvLines(const char *str, ELvLines def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "true", 4) || 0==memcmp(str, "new", 3))
+ return LV_NEW;
+ if(0==memcmp(str, "old", 3))
+ return LV_OLD;
+ if(0==memcmp(str, "false", 5) || 0==memcmp(str, "none", 4))
+ return LV_NONE;
+ }
return def;
}
+static EGradientBorder toGradientBorder(const char *str, bool *haveAlpha)
+{
+ if(str)
+ {
+ *haveAlpha=strstr(str, "-alpha") ? true : false;
+ if(0==memcmp(str, "light", 5) || 0==memcmp(str, "true", 4))
+ return GB_LIGHT;
+ if(0==memcmp(str, "none", 4))
+ return GB_NONE;
+ if(0==memcmp(str, "3dfull", 6))
+ return GB_3D_FULL;
+ if(0==memcmp(str, "3d", 2) || 0==memcmp(str, "false", 5))
+ return GB_3D;
+ if(0==memcmp(str, "shine", 5))
+ return GB_SHINE;
+ }
+ return GB_3D;
+}
+
+#ifdef __cplusplus
+static EAlign toAlign(const char *str, EAlign def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "left", 4))
+ return ALIGN_LEFT;
+ if(0==memcmp(str, "center-full", 11))
+ return ALIGN_FULL_CENTER;
+ if(0==memcmp(str, "center", 6))
+ return ALIGN_CENTER;
+ if(0==memcmp(str, "right", 5))
+ return ALIGN_RIGHT;
+ }
+ return def;
+}
#endif
-#ifdef CONFIG_WRITE
-#include <kstandarddirs.h>
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+static ETitleBarIcon toTitlebarIcon(const char *str, ETitleBarIcon def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "none", 4))
+ return TITLEBAR_ICON_NONE;
+ if(0==memcmp(str, "menu", 4))
+ return TITLEBAR_ICON_MENU_BUTTON;
+ if(0==memcmp(str, "title", 5))
+ return TITLEBAR_ICON_NEXT_TO_TITLE;
+ }
+ return def;
+}
+#endif
+
+static EImageType toImageType(const char *str, EImageType def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "none", 4))
+ return IMG_NONE;
+ if(0==memcmp(str, "plainrings", 10))
+ return IMG_PLAIN_RINGS;
+ if(0==memcmp(str, "rings", 5))
+ return IMG_BORDERED_RINGS;
+ if(0==memcmp(str, "squarerings", 11))
+ return IMG_SQUARE_RINGS;
+ if(0==memcmp(str, "file", 4))
+ return IMG_FILE;
+ }
+ return def;
+}
+
+static EGlow toGlow(const char *str, EGlow def)
+{
+ if(str)
+ {
+ if(0==memcmp(str, "none", 4))
+ return GLOW_NONE;
+ if(0==memcmp(str, "start", 5))
+ return GLOW_START;
+ if(0==memcmp(str, "middle", 6))
+ return GLOW_MIDDLE;
+ if(0==memcmp(str, "end", 3))
+ return GLOW_END;
+ }
+ return def;
+}
#endif
static const char * getHome()
{
static const char *home=NULL;
+#ifdef _WIN32
+ home = getenv("HOMEPATH");
+#else
if(!home)
{
struct passwd *p=getpwuid(getuid());
@@ -295,15 +563,82 @@ static const char * getHome()
if(!home)
home="/tmp";
}
-
+#endif
return home;
}
-static const char *xdgConfigFolder()
+#ifdef __cplusplus
+
+#if defined QTC_QT_ONLY || QT_VERSION < 0x040000
+#if QT_VERSION < 0x040000
+#include <qdir.h>
+#include <qfile.h>
+#endif
+// Take from KStandardDirs::makeDir
+static bool makeDir(const QString& dir, int mode)
+{
+ // we want an absolute path
+ if (QDir::isRelativePath(dir))
+ return false;
+
+#ifdef Q_WS_WIN
+ return QDir().mkpath(dir);
+#else
+ QString target = dir;
+ uint len = target.length();
+
+ // append trailing slash if missing
+ if (dir.at(len - 1) != '/')
+ target += '/';
+
+ QString base;
+ uint i = 1;
+
+ while( i < len )
+ {
+ struct stat st;
+#if QT_VERSION >= 0x040000
+ int pos = target.indexOf('/', i);
+#else
+ int pos = target.find('/', i);
+#endif
+ base += target.mid(i - 1, pos - i + 1);
+ QByteArray baseEncoded = QFile::encodeName(base);
+ // bail out if we encountered a problem
+ if (stat(baseEncoded, &st) != 0)
+ {
+ // Directory does not exist....
+ // Or maybe a dangling symlink ?
+ if (lstat(baseEncoded, &st) == 0)
+ (void)unlink(baseEncoded); // try removing
+
+ if (mkdir(baseEncoded, static_cast<mode_t>(mode)) != 0)
+ {
+#if QT_VERSION >= 0x040000
+ baseEncoded.prepend("trying to create local folder ");
+ perror(baseEncoded.constData());
+#else
+ perror("trying to create QtCurve config folder ");
+#endif
+ return false; // Couldn't create it :-(
+ }
+ }
+ i = pos + 1;
+ }
+ return true;
+#endif
+}
+
+#else
+#include <kstandarddirs.h>
+#endif
+#endif
+
+static const char *qtcConfDir()
{
- static char xdgDir[QTC_MAX_FILENAME_LEN]={'\0'};
+ static char *cfgDir=NULL;
- if(!xdgDir[0])
+ if(!cfgDir)
{
static const char *home=NULL;
@@ -333,7 +668,12 @@ static const char *xdgConfigFolder()
"sudo su" / "kcmshell style". The 1st would write to ~/.config, but
if root has a XDG_ set then that would be used on the second :-(
*/
+#ifndef _WIN32
char *env=0==getuid() ? NULL : getenv("XDG_CONFIG_HOME");
+#else
+ char *env=0;
+#endif
+
#endif
if(!env)
@@ -341,59 +681,210 @@ static const char *xdgConfigFolder()
if(!home)
home=getHome();
- sprintf(xdgDir, "%s/.config", home);
+ cfgDir=(char *)malloc(strlen(home)+18);
+ sprintf(cfgDir, "%s/.config/qtcurve/", home);
}
else
- strcpy(xdgDir, env);
+ {
+ cfgDir=(char *)malloc(strlen(env)+10);
+ sprintf(cfgDir, "%s/qtcurve/", env);
+ }
-#if defined CONFIG_WRITE || !defined __cplusplus
+//#if defined CONFIG_WRITE || !defined __cplusplus
{
struct stat info;
- if(0!=lstat(xdgDir, &info))
+ if(0!=lstat(cfgDir, &info))
{
#ifdef __cplusplus
- KStandardDirs::makeDir(xdgDir, 0755);
+#if defined QTC_QT_ONLY || QT_VERSION < 0x040000
+ makeDir(cfgDir, 0755);
+#else
+ KStandardDirs::makeDir(cfgDir, 0755);
+#endif
#else
- g_mkdir_with_parents(xdgDir, 0755);
+ g_mkdir_with_parents(cfgDir, 0755);
#endif
}
}
+//#endif
+ }
+
+ return cfgDir;
+}
+
+#ifdef __cplusplus
+static WindowBorders qtcGetWindowBorderSize(bool force=false)
+#else
+static WindowBorders qtcGetWindowBorderSize(bool force)
+#endif
+{
+ static WindowBorders def={24, 18, 4, 4};
+ static WindowBorders sizes={-1, -1, -1, -1};
+
+ if(-1==sizes.titleHeight || force)
+ {
+#ifdef __cplusplus
+ QFile f(qtcConfDir()+QString(BORDER_SIZE_FILE));
+
+#if QT_VERSION >= 0x040000
+ if(f.open(QIODevice::ReadOnly))
+#else
+ if(f.open(IO_ReadOnly))
#endif
+ {
+ QTextStream stream(&f);
+ QString line;
+
+ sizes.titleHeight=stream.readLine().toInt();
+ sizes.toolTitleHeight=stream.readLine().toInt();
+ sizes.bottom=stream.readLine().toInt();
+ sizes.sides=stream.readLine().toInt();
+ f.close();
+ }
+#else // __cplusplus
+ char *filename=(char *)malloc(strlen(qtcConfDir())+strlen(BORDER_SIZE_FILE)+1);
+ FILE *f=NULL;
+
+ sprintf(filename, "%s"BORDER_SIZE_FILE, qtcConfDir());
+ if((f=fopen(filename, "r")))
+ {
+ char *line=NULL;
+ size_t len;
+ getline(&line, &len, f);
+ sizes.titleHeight=atoi(line);
+ getline(&line, &len, f);
+ sizes.toolTitleHeight=atoi(line);
+ getline(&line, &len, f);
+ sizes.bottom=atoi(line);
+ getline(&line, &len, f);
+ sizes.sides=atoi(line);
+ if(line)
+ free(line);
+ fclose(f);
+ }
+ free(filename);
+#endif // __cplusplus
}
- return xdgDir;
+ return sizes.titleHeight<12 ? def : sizes;
}
+#if (!defined QT_VERSION || QT_VERSION >= 0x040000) && !defined CONFIG_DIALOG
+
+#define MENU_FILE_PREFIX "menubar-"
+#define STATUS_FILE_PREFIX "statusbar-"
+
+#define qtcMenuBarHidden(A) qtcBarHidden((A), MENU_FILE_PREFIX)
+#define qtcSetMenuBarHidden(A, H) qtcSetBarHidden((A), (H), MENU_FILE_PREFIX)
+#define qtcStatusBarHidden(A) qtcBarHidden((A), STATUS_FILE_PREFIX)
+#define qtcSetStatusBarHidden(A, H) qtcSetBarHidden((A), (H), STATUS_FILE_PREFIX)
+
+#ifdef __cplusplus
+static bool qtcBarHidden(const QString &app, const char *prefix)
+{
+ return QFile::exists(QFile::decodeName(qtcConfDir())+prefix+app);
+}
+
+static void qtcSetBarHidden(const QString &app, bool hidden, const char *prefix)
+{
+ if(!hidden)
+ QFile::remove(QFile::decodeName(qtcConfDir())+prefix+app);
+ else
+ QFile(QFile::decodeName(qtcConfDir())+prefix+app).open(QIODevice::WriteOnly);
+}
+
+#else // __cplusplus
+static bool qtcFileExists(const char *name)
+{
+ struct stat info;
+
+ return 0==lstat(name, &info) && S_ISREG(info.st_mode);
+}
+
+static char * qtcGetBarFileName(const char *app, const char *prefix)
+{
+ char *filename=NULL;
+
+ if(!filename)
+ {
+ filename=(char *)malloc(strlen(qtcConfDir())+strlen(prefix)+strlen(app)+1);
+ sprintf(filename, "%s%s%s", qtcConfDir(), prefix, app);
+ }
+
+ return filename;
+}
+
+static bool qtcBarHidden(const char *app, const char *prefix)
+{
+ return qtcFileExists(qtcGetBarFileName(app, prefix));
+}
+
+static void qtcSetBarHidden(const char *app, bool hidden, const char *prefix)
+{
+ if(!hidden)
+ unlink(qtcGetBarFileName(app, prefix));
+ else
+ {
+ FILE *f=fopen(qtcGetBarFileName(app, prefix), "w");
+
+ if(f)
+ fclose(f);
+ }
+}
+
+#endif // __cplusplus
+
+#ifdef __cplusplus
+#include <QtSvg/QSvgRenderer>
+#endif // __cplusplus
+
+static void loadBgndImage(QtCImage *img)
+{
+ if(!img->loaded &&
+ img->width>16 && img->width<1024 && img->height>16 && img->height<1024)
+ {
+ img->loaded=true;
+#ifdef __cplusplus
+ if(!img->file.isEmpty())
+ {
+ QSvgRenderer svg(img->file);
+
+ if(svg.isValid())
+ {
+ img->pix=QPixmap(img->width, img->height);
+ img->pix.fill(Qt::transparent);
+ QPainter painter(&img->pix);
+ svg.render(&painter);
+ painter.end();
+ }
+ }
+#else // __cplusplus
+ img->pix=0L;
+ if(img->file)
+ img->pix=gdk_pixbuf_new_from_file_at_scale(img->file, img->width, img->height, FALSE, NULL);
+#endif // __cplusplus
+ }
+}
+
+#endif // (!defined QT_VERSION || QT_VERSION >= 0x040000) && !defined CONFIG_DIALOG
+
#ifdef CONFIG_READ
#ifdef __cplusplus
-#define QTC_IS_BLACK(A) (0==(A).red() && 0==(A).green() && 0==(A).blue())
+#define IS_BLACK(A) (0==(A).red() && 0==(A).green() && 0==(A).blue())
#else
-#define QTC_IS_BLACK(A) (0==(A).red && 0==(A).green && 0==(A).blue)
+#define IS_BLACK(A) (0==(A).red && 0==(A).green && 0==(A).blue)
#endif
static void checkColor(EShade *s, color *c)
{
- if(SHADE_CUSTOM==*s && QTC_IS_BLACK(*c))
+ if(SHADE_CUSTOM==*s && IS_BLACK(*c))
*s=SHADE_NONE;
}
#ifdef __cplusplus
-#if QT_VERSION >= 0x040000
-#include <QMap>
-#include <QFile>
-#include <QTextStream>
-#define QTC_LATIN1(A) A.toLatin1()
-#else
-#define QTC_LATIN1(A) A.latin1()
-
-#include <qmap.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#endif
-
class QtCConfig
{
public:
@@ -401,7 +892,8 @@ class QtCConfig
QtCConfig(const QString &filename);
bool ok() const { return values.count()>0; }
- const QString & readEntry(const char *key, const QString &def=QString::null);
+ bool hasKey(const QString &key) { return values.contains(key); }
+ const QString & readEntry(const QString &key, const QString &def=QString::null);
private:
@@ -436,47 +928,105 @@ QtCConfig::QtCConfig(const QString &filename)
}
}
-inline const QString & QtCConfig::readEntry(const char *key, const QString &def)
+inline const QString & QtCConfig::readEntry(const QString &key, const QString &def)
{
return values.contains(key) ? values[key] : def;
}
-inline QString readStringEntry(QtCConfig &cfg, const char *key)
+inline QString readStringEntry(QtCConfig &cfg, const QString &key)
{
return cfg.readEntry(key);
}
-static int readNumEntry(QtCConfig &cfg, const char *key, int def)
+static int readNumEntry(QtCConfig &cfg, const QString &key, int def)
{
const QString &val(readStringEntry(cfg, key));
return val.isEmpty() ? def : val.toInt();
}
-static bool readBoolEntry(QtCConfig &cfg, const char *key, bool def)
+static int readVersionEntry(QtCConfig &cfg, const QString &key)
+{
+ const QString &val(readStringEntry(cfg, key));
+ int major, minor, patch;
+
+ return !val.isEmpty() && 3==sscanf(TO_LATIN1(val), "%d.%d.%d", &major, &minor, &patch)
+ ? MAKE_VERSION3(major, minor, patch)
+ : 0;
+}
+
+static bool readBoolEntry(QtCConfig &cfg, const QString &key, bool def)
{
const QString &val(readStringEntry(cfg, key));
return val.isEmpty() ? def : (val=="true" ? true : false);
}
-#if QT_VERSION >= 0x040000
-#define QTC_LATIN1(A) A.toLatin1()
+static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int count)
+{
+#if (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ QStringList strings(readStringEntry(cfg, key).split(',', QString::SkipEmptyParts));
#else
-#define QTC_LATIN1(A) A.latin1()
+ QStringList strings(QStringList::split(',', readStringEntry(cfg, key)));
#endif
+ bool ok(count==strings.size());
+
+ if(ok)
+ {
+ QStringList::ConstIterator it(strings.begin());
+ int i;
-#define QTC_CFG_READ_COLOR(ENTRY) \
+ for(i=0; i<count && ok; ++i, ++it)
+ list[i]=(*it).toDouble(&ok);
+ }
+
+ if(!ok && strings.size())
+ list[0]=0;
+}
+
+#define CFG_READ_COLOR(ENTRY) \
{ \
QString sVal(cfg.readEntry(#ENTRY)); \
if(sVal.isEmpty()) \
opts->ENTRY=def->ENTRY; \
else \
- setRgb(&(opts->ENTRY), QTC_LATIN1(sVal)); \
+ setRgb(&(opts->ENTRY), TO_LATIN1(sVal)); \
+ }
+
+#define CFG_READ_IMAGE(ENTRY) \
+ { \
+ opts->ENTRY.type=toImageType(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY.type); \
+ opts->ENTRY.loaded=false; \
+ if(IMG_FILE==opts->ENTRY.type) \
+ { \
+ QString file(cfg.readEntry(#ENTRY ".file")); \
+ if(!file.isEmpty()) \
+ { \
+ opts->ENTRY.file=file; \
+ opts->ENTRY.width=readNumEntry(cfg, #ENTRY ".width", 0); \
+ opts->ENTRY.height=readNumEntry(cfg, #ENTRY ".height", 0); \
+ } \
+ } \
}
+#if QT_VERSION >= 0x040000
+ #define CFG_READ_STRING_LIST(ENTRY) \
+ { \
+ QString val=readStringEntry(cfg, #ENTRY); \
+ Strings set=val.isEmpty() ? Strings() : Strings::fromList(val.split(",", QString::SkipEmptyParts)); \
+ opts->ENTRY=set.count() || cfg.hasKey(#ENTRY) ? set : def->ENTRY; \
+ }
#else
+ #define CFG_READ_STRING_LIST(ENTRY) \
+ { \
+ QString val=readStringEntry(cfg, #ENTRY); \
+ Strings list=val.isEmpty() ? Strings() : Strings::split(",", val, false); \
+ opts->ENTRY=list.count() || cfg.hasKey(#ENTRY) ? list : def->ENTRY; \
+ }
+#endif
+#else
+
static char * lookupCfgHash(GHashTable **cfg, char *key, char *val)
{
char *rv=NULL;
@@ -502,9 +1052,9 @@ static GHashTable * loadConfig(const char *filename)
if(f)
{
- char line[QTC_MAX_INPUT_LINE_LEN];
+ char line[MAX_CONFIG_INPUT_LINE_LEN];
- while(NULL!=fgets(line, QTC_MAX_INPUT_LINE_LEN-1, f))
+ while(NULL!=fgets(line, MAX_CONFIG_INPUT_LINE_LEN-1, f))
{
char *eq=strchr(line, '=');
int pos=eq ? eq-line : -1;
@@ -545,6 +1095,16 @@ static int readNumEntry(GHashTable *cfg, char *key, int def)
return str ? atoi(str) : def;
}
+static int readVersionEntry(GHashTable *cfg, char *key)
+{
+ char *str=readStringEntry(cfg, key);
+ int major, minor, patch;
+
+ return str && 3==sscanf(str, "%d.%d.%d", &major, &minor, &patch)
+ ? MAKE_VERSION3(major, minor, patch)
+ : 0;
+}
+
static gboolean readBoolEntry(GHashTable *cfg, char *key, gboolean def)
{
char *str=readStringEntry(cfg, key);
@@ -552,9 +1112,47 @@ static gboolean readBoolEntry(GHashTable *cfg, char *key, gboolean def)
return str ? (0==memcmp(str, "true", 4) ? true : false) : def;
}
-#define QTC_LATIN1(A) A
+static void readDoubleList(GHashTable *cfg, char *key, double *list, int count)
+{
+ char *str=readStringEntry(cfg, key);
+
+ if(str)
+ {
+ int j,
+ comma=0;
+ bool ok=true;
+
+ for(j=0; str[j]; ++j)
+ if(','==str[j])
+ comma++;
+
+ ok=(count-1)==comma;
+ if(ok)
+ {
+ for(j=0; j<comma+1 && str && ok; ++j)
+ {
+ char *c=strchr(str, ',');
+
+ if(c || (str && count-1==comma))
+ {
+ if(c)
+ *c='\0';
+ list[j]=g_ascii_strtod(str, NULL);
+ str=c+1;
+ }
+ else
+ ok=false;
+ }
+ }
-#define QTC_CFG_READ_COLOR(ENTRY) \
+ if(!ok)
+ list[0]=0;
+ }
+}
+
+#define TO_LATIN1(A) A
+
+#define CFG_READ_COLOR(ENTRY) \
{ \
const char *str=readStringEntry(cfg, #ENTRY); \
\
@@ -563,93 +1161,485 @@ static gboolean readBoolEntry(GHashTable *cfg, char *key, gboolean def)
else \
opts->ENTRY=def->ENTRY; \
}
-#endif
+#define CFG_READ_IMAGE(ENTRY) \
+ { \
+ opts->ENTRY.type=toImageType(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY.type); \
+ opts->ENTRY.loaded=false; \
+ if(IMG_FILE==opts->ENTRY.type) \
+ { \
+ const char *file=readStringEntry(cfg, #ENTRY ".file"); \
+ if(file) \
+ { \
+ opts->ENTRY.file=file; \
+ opts->ENTRY.width=readNumEntry(cfg, #ENTRY ".width", 0); \
+ opts->ENTRY.height=readNumEntry(cfg, #ENTRY ".height", 0); \
+ } \
+ } \
+ }
+#define CFG_READ_STRING_LIST(ENTRY) \
+ { \
+ const gchar *str=readStringEntry(cfg, #ENTRY); \
+ if(str) \
+ opts->ENTRY=g_strsplit(str, ",", -1); \
+ else if(def->ENTRY) \
+ { \
+ opts->ENTRY=def->ENTRY; \
+ def->ENTRY=NULL; \
+ } \
+ }
-#define QTC_CFG_READ_NUM(ENTRY) \
- opts->ENTRY=readNumEntry(cfg, #ENTRY, def->ENTRY);
+#endif
-#define QTC_CFG_READ_BOOL(ENTRY) \
+#define CFG_READ_BOOL(ENTRY) \
opts->ENTRY=readBoolEntry(cfg, #ENTRY, def->ENTRY);
-#define QTC_CFG_READ_ROUND(ENTRY) \
- opts->ENTRY=toRound(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_ROUND(ENTRY) \
+ opts->ENTRY=toRound(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_DI(ENTRY) \
- opts->ENTRY=((double)(readNumEntry(cfg, #ENTRY, ((int)(def->ENTRY*100))-100)+100))/100.0;
+#define CFG_READ_INT(ENTRY) \
+ opts->ENTRY=readNumEntry(cfg, #ENTRY, def->ENTRY);
-#define QTC_CFG_READ_TB_BORDER(ENTRY) \
- opts->ENTRY=toTBarBorder(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_INT_BOOL(ENTRY, DEF) \
+ if(readBoolEntry(cfg, #ENTRY, false)) \
+ opts->ENTRY=DEF; \
+ else \
+ opts->ENTRY=readNumEntry(cfg, #ENTRY, def->ENTRY);
+
+#define CFG_READ_TB_BORDER(ENTRY) \
+ opts->ENTRY=toTBarBorder(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_MOUSE_OVER(ENTRY) \
- opts->ENTRY=toMouseOver(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_MOUSE_OVER(ENTRY) \
+ opts->ENTRY=toMouseOver(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_APPEARANCE(ENTRY, DEF) \
- opts->ENTRY=toAppearance(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF);
+#define CFG_READ_APPEARANCE(ENTRY, ALLOW) \
+ opts->ENTRY=toAppearance(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY, ALLOW);
/*
-#define QTC_CFG_READ_APPEARANCE(ENTRY) \
- opts->ENTRY=toAppearance(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_APPEARANCE(ENTRY) \
+ opts->ENTRY=toAppearance(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
*/
-#define QTC_CFG_READ_STRIPE(ENTRY) \
- opts->ENTRY=toStripe(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_STRIPE(ENTRY) \
+ opts->ENTRY=toStripe(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+
+#define CFG_READ_SLIDER(ENTRY) \
+ opts->ENTRY=toSlider(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+
+#define CFG_READ_DEF_BTN(ENTRY) \
+ opts->ENTRY=toInd(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+
+#define CFG_READ_LINE(ENTRY) \
+ opts->ENTRY=toLine(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+
+#define CFG_READ_SHADE(ENTRY, AD, MENU_STRIPE, COL) \
+ opts->ENTRY=toShade(TO_LATIN1(readStringEntry(cfg, #ENTRY)), AD, def->ENTRY, MENU_STRIPE, COL);
+
+#define CFG_READ_SCROLLBAR(ENTRY) \
+ opts->ENTRY=toScrollbar(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+
+#define CFG_READ_FRAME(ENTRY) \
+ opts->ENTRY=toFrame(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+
+#define CFG_READ_EFFECT(ENTRY) \
+ opts->ENTRY=toEffect(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_SLIDER(ENTRY) \
- opts->ENTRY=toSlider(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_SHADING(ENTRY) \
+ opts->ENTRY=toShading(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_DEF_BTN(ENTRY) \
- opts->ENTRY=toInd(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_ECOLOR(ENTRY) \
+ opts->ENTRY=toEColor(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_LINE(ENTRY) \
- opts->ENTRY=toLine(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_FOCUS(ENTRY) \
+ opts->ENTRY=toFocus(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_SHADE(ENTRY, AD) \
- opts->ENTRY=toShade(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), AD, def->ENTRY);
+#define CFG_READ_TAB_MO(ENTRY) \
+ opts->ENTRY=toTabMo(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_SCROLLBAR(ENTRY) \
- opts->ENTRY=toScrollbar(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_GRAD_TYPE(ENTRY) \
+ opts->ENTRY=toGradType(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_EFFECT(ENTRY) \
- opts->ENTRY=toEffect(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define CFG_READ_LV_LINES(ENTRY) \
+ opts->ENTRY=toLvLines(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#ifdef QTC_CONFIG_DIALOG
-#define QTC_CFG_READ_SHADING(ENTRY, UNUSED) \
- opts->ENTRY=toShading(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#ifdef __cplusplus
+#define CFG_READ_ALIGN(ENTRY) \
+ opts->ENTRY=toAlign(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#endif
+
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#define CFG_READ_TB_ICON(ENTRY) \
+ opts->ENTRY=toTitlebarIcon(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#endif
+
+#define CFG_READ_GLOW(ENTRY) \
+ opts->ENTRY=toGlow(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+
+static void checkAppearance(EAppearance *ap, Options *opts)
+{
+ if(*ap>=APPEARANCE_CUSTOM1 && *ap<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD))
+ {
+#ifdef __cplusplus
+ if(opts->customGradient.end()==opts->customGradient.find(*ap))
#else
-#define QTC_CFG_READ_SHADING(ENTRY, DEF) \
- ENTRY=toShading(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF);
+ if(!opts->customGradient[*ap-APPEARANCE_CUSTOM1])
+#endif
+ {
+ if(ap==&opts->appearance)
+ *ap=APPEARANCE_FLAT;
+ else
+ *ap=opts->appearance;
+ }
+ }
+}
+
+static void defaultSettings(Options *opts);
+
+#ifndef __cplusplus
+static void copyGradients(Options *src, Options *dest)
+{
+ if(src && dest && src!=dest)
+ {
+ int i;
+
+ for(i=0; i<NUM_CUSTOM_GRAD; ++i)
+ if(src->customGradient[i] && src->customGradient[i]->numStops>0)
+ {
+ dest->customGradient[i]=malloc(sizeof(Gradient));
+ dest->customGradient[i]->numStops=src->customGradient[i]->numStops;
+ dest->customGradient[i]->stops=malloc(sizeof(GradientStop) * dest->customGradient[i]->numStops);
+ memcpy(dest->customGradient[i]->stops, src->customGradient[i]->stops,
+ sizeof(GradientStop) * dest->customGradient[i]->numStops);
+ dest->customGradient[i]->border=src->customGradient[i]->border;
+ }
+ else
+ dest->customGradient[i]=NULL;
+ }
+}
+
+static void copyOpts(Options *src, Options *dest)
+{
+ if(src && dest && src!=dest)
+ {
+ memcpy(dest, src, sizeof(Options));
+ dest->noBgndGradientApps=src->noBgndGradientApps;
+ dest->noBgndOpacityApps=src->noBgndOpacityApps;
+ dest->noMenuBgndOpacityApps=src->noMenuBgndOpacityApps;
+ dest->noBgndImageApps=src->noBgndImageApps;
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ dest->noDlgFixApps=src->noDlgFixApps;
+ src->noDlgFixApps=NULL;
#endif
+ dest->noMenuStripeApps=src->noMenuStripeApps;
+ src->noBgndGradientApps=src->noBgndOpacityApps=src->noMenuBgndOpacityApps=src->noBgndImageApps=src->noMenuStripeApps=NULL;
+ memcpy(dest->customShades, src->customShades, sizeof(double)*NUM_STD_SHADES);
+ memcpy(dest->customAlphas, src->customAlphas, sizeof(double)*NUM_STD_ALPHAS);
+ copyGradients(src, dest);
+ }
+}
+static void freeOpts(Options *opts)
+{
+ if(opts)
+ {
+ int i;
+
+ if(opts->noBgndGradientApps)
+ g_strfreev(opts->noBgndGradientApps);
+ if(opts->noBgndOpacityApps)
+ g_strfreev(opts->noBgndOpacityApps);
+ if(opts->noMenuBgndOpacityApps)
+ g_strfreev(opts->noMenuBgndOpacityApps);
+ if(opts->noBgndImageApps)
+ g_strfreev(opts->noBgndImageApps);
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ if(opts->noDlgFixApps)
+ g_strfreev(opts->noDlgFixApps);
+ opts->noDlgFixApps=NULL
+#endif
+ if(opts->noMenuStripeApps)
+ g_strfreev(opts->noMenuStripeApps);
+ opts->noBgndGradientApps=opts->noBgndOpacityApps=opts->noMenuBgndOpacityApps=opts->noBgndImageApps=opts->noMenuStripeApps=NULL;
+ for(i=0; i<NUM_CUSTOM_GRAD; ++i)
+ if(opts->customGradient[i])
+ {
+ if(opts->customGradient[i]->stops)
+ free(opts->customGradient[i]->stops);
+ free(opts->customGradient[i]);
+ opts->customGradient[i]=NULL;
+ }
+ }
+}
+#endif
+
+static void checkConfig(Options *opts)
+{
+ /* **Must** check appearance first, as the rest will default to this */
+ checkAppearance(&opts->appearance, opts);
+ checkAppearance(&opts->bgndAppearance, opts);
+ checkAppearance(&opts->menuBgndAppearance, opts);
+ checkAppearance(&opts->menubarAppearance, opts);
+ checkAppearance(&opts->menuitemAppearance, opts);
+ checkAppearance(&opts->toolbarAppearance, opts);
+ checkAppearance(&opts->lvAppearance, opts);
+ checkAppearance(&opts->tabAppearance, opts);
+ checkAppearance(&opts->activeTabAppearance, opts);
+ checkAppearance(&opts->sliderAppearance, opts);
+ checkAppearance(&opts->selectionAppearance, opts);
+ checkAppearance(&opts->titlebarAppearance, opts);
+ checkAppearance(&opts->inactiveTitlebarAppearance, opts);
#ifdef __cplusplus
-static bool readConfig(const QString &file, Options *opts, Options *def)
+ checkAppearance(&opts->titlebarButtonAppearance, opts);
+ checkAppearance(&opts->selectionAppearance, opts);
+ checkAppearance(&opts->dwtAppearance, opts);
+#endif
+ checkAppearance(&opts->menuStripeAppearance, opts);
+ checkAppearance(&opts->progressAppearance, opts);
+ checkAppearance(&opts->progressGrooveAppearance, opts);
+ checkAppearance(&opts->grooveAppearance, opts);
+ checkAppearance(&opts->sunkenAppearance, opts);
+ checkAppearance(&opts->sbarBgndAppearance, opts);
+ checkAppearance(&opts->sliderFill, opts);
+ checkAppearance(&opts->tooltipAppearance, opts);
+
+ if(SHADE_BLEND_SELECTED==opts->shadeCheckRadio)
+ opts->shadeCheckRadio=SHADE_SELECTED;
+
+ checkColor(&opts->shadeMenubars, &opts->customMenubarsColor);
+ checkColor(&opts->shadeSliders, &opts->customSlidersColor);
+ checkColor(&opts->shadeCheckRadio, &opts->customCheckRadioColor);
+ checkColor(&opts->menuStripe, &opts->customMenuStripeColor);
+ checkColor(&opts->comboBtn, &opts->customComboBtnColor);
+ checkColor(&opts->sortedLv, &opts->customSortedLvColor);
+ if(APPEARANCE_BEVELLED==opts->toolbarAppearance)
+ opts->toolbarAppearance=APPEARANCE_GRADIENT;
+ else if(APPEARANCE_RAISED==opts->toolbarAppearance)
+ opts->toolbarAppearance=APPEARANCE_FLAT;
+
+ if(APPEARANCE_BEVELLED==opts->menubarAppearance)
+ opts->menubarAppearance=APPEARANCE_GRADIENT;
+ else if(APPEARANCE_RAISED==opts->menubarAppearance)
+ opts->menubarAppearance=APPEARANCE_FLAT;
+
+ if(APPEARANCE_BEVELLED==opts->sliderAppearance)
+ opts->sliderAppearance=APPEARANCE_GRADIENT;
+
+ if(APPEARANCE_BEVELLED==opts->tabAppearance)
+ opts->tabAppearance=APPEARANCE_GRADIENT;
+
+ if(APPEARANCE_BEVELLED==opts->activeTabAppearance)
+ opts->activeTabAppearance=APPEARANCE_GRADIENT;
+
+ if(APPEARANCE_RAISED==opts->selectionAppearance)
+ opts->selectionAppearance=APPEARANCE_FLAT;
+ else if(APPEARANCE_BEVELLED==opts->selectionAppearance)
+ opts->selectionAppearance=APPEARANCE_GRADIENT;
+
+ if(APPEARANCE_RAISED==opts->menuStripeAppearance)
+ opts->menuStripeAppearance=APPEARANCE_FLAT;
+ else if(APPEARANCE_BEVELLED==opts->menuStripeAppearance)
+ opts->menuStripeAppearance=APPEARANCE_GRADIENT;
+
+ if(opts->highlightFactor<MIN_HIGHLIGHT_FACTOR || opts->highlightFactor>MAX_HIGHLIGHT_FACTOR)
+ opts->highlightFactor=DEFAULT_HIGHLIGHT_FACTOR;
+
+ if(opts->crHighlight<MIN_HIGHLIGHT_FACTOR || opts->crHighlight>MAX_HIGHLIGHT_FACTOR)
+ opts->crHighlight=DEFAULT_CR_HIGHLIGHT_FACTOR;
+
+ if(opts->splitterHighlight<MIN_HIGHLIGHT_FACTOR || opts->splitterHighlight>MAX_HIGHLIGHT_FACTOR)
+ opts->splitterHighlight=DEFAULT_SPLITTER_HIGHLIGHT_FACTOR;
+
+#if !defined __cplusplus || defined CONFIG_DIALOG
+ if(opts->expanderHighlight<MIN_HIGHLIGHT_FACTOR || opts->expanderHighlight>MAX_HIGHLIGHT_FACTOR)
+ opts->expanderHighlight=DEFAULT_EXPANDER_HIGHLIGHT_FACTOR;
+#endif
+
+ if(opts->menuDelay<MIN_MENU_DELAY || opts->menuDelay>MAX_MENU_DELAY)
+ opts->menuDelay=DEFAULT_MENU_DELAY;
+
+ if(0==opts->sliderWidth%2)
+ opts->sliderWidth++;
+
+ if(opts->sliderWidth<MIN_SLIDER_WIDTH || opts->sliderWidth>MAX_SLIDER_WIDTH)
+ opts->sliderWidth=DEFAULT_SLIDER_WIDTH;
+
+ if(opts->sliderWidth<DEFAULT_SLIDER_WIDTH)
+ opts->sliderThumbs=LINE_NONE;
+
+ if(opts->lighterPopupMenuBgnd<MIN_LIGHTER_POPUP_MENU || opts->lighterPopupMenuBgnd>MAX_LIGHTER_POPUP_MENU)
+ opts->lighterPopupMenuBgnd=DEF_POPUPMENU_LIGHT_FACTOR;
+
+ if(opts->tabBgnd<MIN_TAB_BGND || opts->tabBgnd>MAX_TAB_BGND)
+ opts->tabBgnd=DEF_TAB_BGND;
+
+ if(opts->animatedProgress && !opts->stripedProgress)
+ opts->animatedProgress=false;
+
+ if(0==opts->gbFactor)
+ opts->groupBox=FRAME_PLAIN;
+
+ if(opts->gbFactor<MIN_GB_FACTOR || opts->gbFactor>MAX_GB_FACTOR)
+ opts->gbFactor=DEF_GB_FACTOR;
+
+#if defined __cplusplus && defined QT_VERSION && QT_VERSION < 0x040000 && !defined CONFIG_DIALOG
+ opts->crSize=CR_SMALL_SIZE;
+ if(SLIDER_CIRCULAR==opts->sliderStyle)
+ opts->sliderStyle=SLIDER_ROUND;
+ if(STRIPE_FADE==opts->stripedProgress)
+ opts->stripedProgress=STRIPE_PLAIN;
+#endif
+ /* For now, only 2 sizes... */
+ if(opts->crSize!=CR_SMALL_SIZE && opts->crSize!=CR_LARGE_SIZE)
+ opts->crSize=CR_SMALL_SIZE;
+
+/*
+??
+ if(SHADE_CUSTOM==opts->shadeMenubars || SHADE_BLEND_SELECTED==opts->shadeMenubars || !opts->borderMenuitems)
+ opts->colorMenubarMouseOver=true;
+*/
+
+#if defined __cplusplus && defined QT_VERSION && QT_VERSION < 0x040000 && !defined CONFIG_DIALOG
+ if(opts->round>ROUND_FULL)
+ opts->round=ROUND_FULL;
+#endif
+#ifndef CONFIG_DIALOG
+ if(MO_GLOW==opts->coloredMouseOver && EFFECT_NONE==opts->buttonEffect)
+ opts->coloredMouseOver=MO_COLORED_THICK;
+
+ if(IND_GLOW==opts->defBtnIndicator && EFFECT_NONE==opts->buttonEffect)
+ opts->defBtnIndicator=IND_TINT;
+
+ if(opts->round>ROUND_EXTRA && FOCUS_GLOW!=opts->focus)
+ opts->focus=FOCUS_LINE;
+
+ if(EFFECT_NONE==opts->buttonEffect)
+ {
+ opts->etchEntry=false;
+ if(FOCUS_GLOW==opts->focus)
+ opts->focus=FOCUS_FULL;
+ }
+
+// if(opts->squareScrollViews)
+// opts->highlightScrollViews=false;
+
+ if(SHADE_WINDOW_BORDER==opts->shadeMenubars)
+ opts->shadeMenubarOnlyWhenActive=true;
+
+ if(MO_GLOW==opts->coloredMouseOver)
+ opts->coloredTbarMo=true;
+
+ if(opts->round<ROUND_SLIGHT)
+ opts->square|=SQUARE_POPUP_MENUS|SQUARE_TOOLTIPS;
+#endif
+
+ if(opts->bgndOpacity<0 || opts->bgndOpacity>100)
+ opts->bgndOpacity=100;
+ if(opts->dlgOpacity<0 || opts->dlgOpacity>100)
+ opts->dlgOpacity=100;
+ if(opts->menuBgndOpacity<0 || opts->menuBgndOpacity>100)
+ opts->menuBgndOpacity=100;
+
+#ifndef CONFIG_DIALOG
+ opts->bgndAppearance=MODIFY_AGUA(opts->bgndAppearance);
+ opts->selectionAppearance=MODIFY_AGUA(opts->selectionAppearance);
+ opts->lvAppearance=MODIFY_AGUA_X(opts->lvAppearance, APPEARANCE_LV_AGUA);
+ opts->sbarBgndAppearance=MODIFY_AGUA(opts->sbarBgndAppearance);
+ opts->tooltipAppearance=MODIFY_AGUA(opts->tooltipAppearance);
+ opts->progressGrooveAppearance=MODIFY_AGUA(opts->progressGrooveAppearance);
+ opts->menuBgndAppearance=MODIFY_AGUA(opts->menuBgndAppearance);
+ opts->menuStripeAppearance=MODIFY_AGUA(opts->menuStripeAppearance);
+ opts->grooveAppearance=MODIFY_AGUA(opts->grooveAppearance);
+ opts->progressAppearance=MODIFY_AGUA(opts->progressAppearance);
+ opts->sliderFill=MODIFY_AGUA(opts->sliderFill);
+ opts->tabAppearance=MODIFY_AGUA(opts->tabAppearance);
+ opts->activeTabAppearance=MODIFY_AGUA(opts->activeTabAppearance);
+ opts->menuitemAppearance=MODIFY_AGUA(opts->menuitemAppearance);
+
+ if(!opts->borderProgress && (!opts->fillProgress || !(opts->square&SQUARE_PROGRESS)))
+ opts->borderProgress=true;
+
+ opts->titlebarAppearance=MODIFY_AGUA(opts->titlebarAppearance);
+ opts->inactiveTitlebarAppearance=MODIFY_AGUA(opts->inactiveTitlebarAppearance);
+
+ if(opts->shadePopupMenu && SHADE_NONE==opts->shadeMenubars)
+ opts->shadePopupMenu=false;
+
+ if(opts->shadePopupMenu)
+ opts->lighterPopupMenuBgnd=0;
+#ifdef __cplusplus
+
+#if defined QT_VERSION && QT_VERSION >= 0x040000
+ if(!(opts->titlebarButtons&TITLEBAR_BUTTON_ROUND))
+#endif
+ opts->titlebarButtonAppearance=MODIFY_AGUA(opts->titlebarButtonAppearance);
+ opts->dwtAppearance=MODIFY_AGUA(opts->dwtAppearance);
+#endif
+ if(opts->windowBorder&WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR &&
+ (opts->windowBorder&WINDOW_BORDER_BLEND_TITLEBAR || SHADE_WINDOW_BORDER==opts->shadeMenubars))
+ opts->windowBorder-=WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR;
+
+ if(APPEARANCE_FLAT==opts->tabAppearance)
+ opts->tabAppearance=APPEARANCE_RAISED;
+ if(EFFECT_NONE==opts->buttonEffect)
+ opts->etchEntry=false;
+ if(opts->colorSliderMouseOver &&
+ (SHADE_NONE==opts->shadeSliders || SHADE_DARKEN==opts->shadeSliders))
+ opts->colorSliderMouseOver=false;
+#endif /* ndef CONFIG_DIALOG */
+
+ if(LINE_1DOT==opts->toolbarSeparators)
+ opts->toolbarSeparators=LINE_DOTS;
+}
+
+#ifdef __cplusplus
+static bool readConfig(const QString &file, Options *opts, Options *defOpts=0L)
#else
-static bool readConfig(const char *file, Options *opts, Options *def)
+static bool readConfig(const char *file, Options *opts, Options *defOpts)
#endif
{
#ifdef __cplusplus
if(file.isEmpty())
{
- const char *xdg=xdgConfigFolder();
+ const char *env=getenv("QTCURVE_CONFIG_FILE");
- if(xdg)
+ if(NULL!=env)
+ return readConfig(env, opts, defOpts);
+ else
{
- QString filename(xdg);
+ const char *cfgDir=qtcConfDir();
+
+ if(cfgDir)
+ {
+ QString filename(QFile::decodeName(cfgDir)+CONFIG_FILE);
- filename+="/"QTC_FILE;
- return readConfig(filename, opts, def);
+ if(!QFile::exists(filename))
+ filename=QFile::decodeName(cfgDir)+"../"OLD_CONFIG_FILE;
+ return readConfig(filename, opts, defOpts);
+ }
}
}
#else
if(!file)
{
- const char *xdg=xdgConfigFolder();
+ const char *env=getenv("QTCURVE_CONFIG_FILE");
- if(xdg)
+ if(NULL!=env)
+ return readConfig(env, opts, defOpts);
+ else
{
- char filename[QTC_MAX_FILENAME_LEN];
+ const char *cfgDir=qtcConfDir();
- sprintf(filename, "%s/"QTC_FILE, xdg);
- return readConfig(filename, opts, def);
+ if(cfgDir)
+ {
+ char *filename=(char *)malloc(strlen(cfgDir)+strlen(OLD_CONFIG_FILE)+4);
+ bool rv=false;
+
+ sprintf(filename, "%s"CONFIG_FILE, cfgDir);
+ if(!qtcFileExists(filename))
+ sprintf(filename, "%s../"OLD_CONFIG_FILE, cfgDir);
+ rv=readConfig(filename, opts, defOpts);
+ free(filename);
+ return rv;
+ }
}
}
#endif
@@ -666,117 +1656,638 @@ static bool readConfig(const char *file, Options *opts, Options *def)
if(cfg)
{
#endif
- QTC_CFG_READ_NUM(passwordChar)
- QTC_CFG_READ_ROUND(round)
- QTC_CFG_READ_DI(highlightFactor)
- QTC_CFG_READ_TB_BORDER(toolbarBorders)
- QTC_CFG_READ_APPEARANCE(appearance, def->appearance)
- QTC_CFG_READ_BOOL(fixParentlessDialogs)
- QTC_CFG_READ_STRIPE(stripedProgress)
- QTC_CFG_READ_SLIDER(sliderStyle)
- QTC_CFG_READ_BOOL(animatedProgress)
- QTC_CFG_READ_BOOL(lighterPopupMenuBgnd)
- QTC_CFG_READ_BOOL(embolden)
- QTC_CFG_READ_DEF_BTN(defBtnIndicator)
- QTC_CFG_READ_LINE(sliderThumbs)
- QTC_CFG_READ_LINE(handles)
- QTC_CFG_READ_BOOL(highlightTab)
- QTC_CFG_READ_BOOL(colorSelTab)
- QTC_CFG_READ_SHADE(shadeSliders, false)
- QTC_CFG_READ_SHADE(shadeMenubars, true)
- QTC_CFG_READ_SHADE(shadeCheckRadio, false)
- QTC_CFG_READ_APPEARANCE(menubarAppearance, def->menubarAppearance)
- QTC_CFG_READ_APPEARANCE(menuitemAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(toolbarAppearance, def->toolbarAppearance)
- QTC_CFG_READ_LINE(toolbarSeparators)
- QTC_CFG_READ_LINE(splitters)
- QTC_CFG_READ_BOOL(customMenuTextColor)
- QTC_CFG_READ_MOUSE_OVER(coloredMouseOver)
- QTC_CFG_READ_BOOL(menubarMouseOver)
- QTC_CFG_READ_BOOL(shadeMenubarOnlyWhenActive)
- QTC_CFG_READ_BOOL(thinnerMenuItems)
- QTC_CFG_READ_COLOR(customSlidersColor)
- QTC_CFG_READ_COLOR(customMenubarsColor)
- QTC_CFG_READ_COLOR(customMenuSelTextColor)
- QTC_CFG_READ_COLOR(customMenuNormTextColor)
- QTC_CFG_READ_COLOR(customCheckRadioColor)
- QTC_CFG_READ_SCROLLBAR(scrollbarType)
- QTC_CFG_READ_EFFECT(buttonEffect)
- QTC_CFG_READ_APPEARANCE(lvAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(tabAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(sliderAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(progressAppearance, opts->appearance)
-#ifndef QTC_PLAIN_FOCUS_ONLY
- QTC_CFG_READ_BOOL(stdFocus)
-#endif
- QTC_CFG_READ_BOOL(lvLines)
- QTC_CFG_READ_BOOL(drawStatusBarFrames)
- QTC_CFG_READ_BOOL(fillSlider)
- QTC_CFG_READ_BOOL(roundMbTopOnly)
- QTC_CFG_READ_BOOL(borderMenuitems)
- QTC_CFG_READ_BOOL(gradientPbGroove)
- QTC_CFG_READ_BOOL(darkerBorders)
- QTC_CFG_READ_BOOL(vArrows)
- QTC_CFG_READ_BOOL(xCheck)
- QTC_CFG_READ_BOOL(framelessGroupBoxes)
- QTC_CFG_READ_BOOL(inactiveHighlight)
- QTC_CFG_READ_BOOL(colorMenubarMouseOver)
+ int i;
+
+ opts->version=readVersionEntry(cfg, VERSION_KEY);
+
#ifdef __cplusplus
- QTC_CFG_READ_BOOL(stdSidebarButtons)
- QTC_CFG_READ_BOOL(gtkScrollViews)
- QTC_CFG_READ_BOOL(gtkComboMenus)
-/*
+ Options newOpts;
+
+ if(defOpts)
+ newOpts=*defOpts;
+ else
+ defaultSettings(&newOpts);
+
+ Options *def=&newOpts;
+
+ if(opts!=def)
+ opts->customGradient=def->customGradient;
+
#else
- QTC_CFG_READ_BOOL(setDialogButtonOrder)
-*/
-#endif
-#if !defined __cplusplus || defined QTC_CONFIG_DIALOG
- QTC_CFG_READ_BOOL(mapKdeIcons)
+ Options newOpts;
+ Options *def=&newOpts;
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ opts->noDlgFixApps=NULL;
#endif
-#if defined QTC_CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
- QTC_CFG_READ_BOOL(gtkButtonOrder)
+ opts->noBgndGradientApps=opts->noBgndOpacityApps=opts->noMenuBgndOpacityApps=opts->noBgndImageApps=opts->noMenuStripeApps=NULL;
+ for(i=0; i<NUM_CUSTOM_GRAD; ++i)
+ opts->customGradient[i]=NULL;
+
+ if(defOpts)
+ copyOpts(defOpts, &newOpts);
+ else
+ defaultSettings(&newOpts);
+ if(opts!=def)
+ copyGradients(def, opts);
#endif
- QTC_CFG_READ_SHADING(shading, shading);
-#ifndef __cplusplus
- releaseConfig(cfg);
+ /* Check if the config file expects old default values... */
+ if(opts->version<MAKE_VERSION(1, 6))
+ {
+ bool framelessGroupBoxes=readBoolEntry(cfg, "framelessGroupBoxes", true),
+ groupBoxLine=readBoolEntry(cfg, "groupBoxLine", true);
+ opts->groupBox=framelessGroupBoxes ? (groupBoxLine ? FRAME_LINE : FRAME_NONE) : FRAME_PLAIN;
+ opts->gbLabel=framelessGroupBoxes ? GB_LBL_BOLD : 0;
+ opts->gbFactor=0;
+ def->focus=FOCUS_LINE;
+ def->crHighlight=3;
+ }
+ else
+ {
+ CFG_READ_FRAME(groupBox)
+ CFG_READ_INT(gbLabel)
+ }
+
+ if(opts->version<MAKE_VERSION(1, 5))
+ {
+ opts->windowBorder=
+ (readBoolEntry(cfg, "colorTitlebarOnly", def->windowBorder&WINDOW_BORDER_COLOR_TITLEBAR_ONLY)
+ ? WINDOW_BORDER_COLOR_TITLEBAR_ONLY : 0)+
+ (readBoolEntry(cfg, "titlebarBorder", def->windowBorder&WINDOW_BORDER_ADD_LIGHT_BORDER)
+ ? WINDOW_BORDER_ADD_LIGHT_BORDER : 0)+
+ (readBoolEntry(cfg, "titlebarBlend", def->windowBorder&WINDOW_BORDER_BLEND_TITLEBAR)
+ ? WINDOW_BORDER_BLEND_TITLEBAR : 0);
+ }
+ else
+ CFG_READ_INT(windowBorder);
+
+ if(opts->version<MAKE_VERSION(1, 4))
+ {
+ opts->square=
+ (readBoolEntry(cfg, "squareLvSelection", def->square&SQUARE_LISTVIEW_SELECTION) ? SQUARE_LISTVIEW_SELECTION : SQUARE_NONE)+
+ (readBoolEntry(cfg, "squareScrollViews", def->square&SQUARE_SCROLLVIEW) ? SQUARE_SCROLLVIEW : SQUARE_NONE)+
+ (readBoolEntry(cfg, "squareProgress", def->square&SQUARE_PROGRESS) ? SQUARE_PROGRESS : SQUARE_NONE)+
+ (readBoolEntry(cfg, "squareEntry", def->square&SQUARE_ENTRY)? SQUARE_ENTRY : SQUARE_NONE);
+ }
+ else
+ CFG_READ_INT(square)
+
+ if(opts->version<MAKE_VERSION(1, 6))
+ opts->square|=SQUARE_TOOLTIPS;
+ if(opts->version<MAKE_VERSION3(1, 6, 1))
+ opts->square|=SQUARE_POPUP_MENUS;
+ if(opts->version<MAKE_VERSION(1, 2))
+ def->crSize=CR_SMALL_SIZE;
+ if(opts->version<MAKE_VERSION(1, 0))
+ {
+ def->roundAllTabs=false;
+ def->smallRadio=false;
+ def->splitters=LINE_FLAT;
+ def->handles=LINE_SUNKEN;
+ def->crHighlight=0;
+#ifdef __cplusplus
+ def->dwtAppearance=APPEARANCE_FLAT;
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ def->dwtSettings=0;
#endif
- if(SHADE_SELECTED==opts->shadeCheckRadio)
- opts->shadeCheckRadio=SHADE_BLEND_SELECTED;
+#endif
+ def->inactiveTitlebarAppearance=APPEARANCE_CUSTOM2;
+ }
+ if(opts->version<MAKE_VERSION(0, 67))
+ def->doubleGtkComboArrow=false;
+ if(opts->version<MAKE_VERSION(0, 66))
+ {
+ def->menuStripeAppearance=APPEARANCE_GRADIENT;
+ def->etchEntry=true;
+ def->gtkScrollViews=false;
+ def->thinSbarGroove=false;
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ def->titlebarButtons=TITLEBAR_BUTTON_HOVER_FRAME;
+ def->titlebarIcon=TITLEBAR_ICON_MENU_BUTTON;
+#endif
+ }
+ if(opts->version<MAKE_VERSION(0, 65))
+ {
+ def->tabMouseOver=TAB_MO_BOTTOM;
+ def->activeTabAppearance=APPEARANCE_FLAT;
+ def->unifySpin=false;
+ def->unifyCombo=false;
+ def->borderTab=false;
+ def->thinnerBtns=false;
+ }
+ if(opts->version<MAKE_VERSION(0, 63))
+ {
+ def->tabMouseOver=TAB_MO_TOP;
+ def->sliderStyle=SLIDER_TRIANGULAR;
+#ifdef __cplusplus
+ def->titlebarAlignment=ALIGN_LEFT;
+#endif
+ }
+ if(opts->version<MAKE_VERSION(0, 62))
+ {
+ def->titlebarAppearance=APPEARANCE_GRADIENT;
+ def->inactiveTitlebarAppearance=APPEARANCE_GRADIENT;
+ def->round=ROUND_FULL;
+ def->appearance=APPEARANCE_DULL_GLASS;
+ def->sliderAppearance=APPEARANCE_DULL_GLASS;
+ def->menuitemAppearance=APPEARANCE_DULL_GLASS;
+ def->useHighlightForMenu=true;
+ def->tabAppearance=APPEARANCE_GRADIENT;
+ def->highlightFactor=5;
+ def->toolbarSeparators=LINE_NONE;
+ def->menubarAppearance=APPEARANCE_SOFT_GRADIENT;
+ def->crButton=false;
+ def->customShades[0]=0;
+ def->stripedProgress=STRIPE_DIAGONAL;
+ def->sunkenAppearance=APPEARANCE_INVERTED;
+ def->focus=FOCUS_FILLED;
+ }
+ if(opts->version<MAKE_VERSION(0, 61))
+ {
+ def->coloredMouseOver=MO_PLASTIK;
+ def->buttonEffect=EFFECT_NONE;
+ def->defBtnIndicator=IND_TINT;
+ def->vArrows=false;
+ def->toolbarAppearance=APPEARANCE_GRADIENT;
+ def->focus=FOCUS_STANDARD;
+ def->selectionAppearance=APPEARANCE_FLAT;
+ def->flatSbarButtons=false;
+ def->comboSplitter=true;
+ def->handles=LINE_DOTS;
+ def->lighterPopupMenuBgnd=15;
+ def->activeTabAppearance=APPEARANCE_GRADIENT;
+ def->gbLabel=GB_LBL_BOLD;
+ def->groupBox=FRAME_NONE;
+ def->shadeSliders=SHADE_BLEND_SELECTED;
+ def->progressGrooveColor=ECOLOR_BASE;
+ def->shadeMenubars=SHADE_DARKEN;
+ opts->highlightTab=true;
+ }
- checkColor(&opts->shadeMenubars, &opts->customMenubarsColor);
- checkColor(&opts->shadeSliders, &opts->customSlidersColor);
- checkColor(&opts->shadeCheckRadio, &opts->customCheckRadioColor);
+ if(opts!=def)
+ {
+ opts->customShades[0]=0;
+ opts->customAlphas[0]=0;
+ if(USE_CUSTOM_SHADES(*def))
+ memcpy(opts->customShades, def->customShades, sizeof(double)*NUM_STD_SHADES);
+ }
- if(APPEARANCE_BEVELLED==opts->toolbarAppearance)
- opts->toolbarAppearance=APPEARANCE_GRADIENT;
- else if(APPEARANCE_RAISED==opts->toolbarAppearance)
- opts->toolbarAppearance=APPEARANCE_FLAT;
+ CFG_READ_INT(gbFactor)
+ CFG_READ_INT(passwordChar)
+ CFG_READ_ROUND(round)
+ CFG_READ_INT(highlightFactor)
+ CFG_READ_INT(menuDelay)
+ CFG_READ_INT(sliderWidth)
+ CFG_READ_INT_BOOL(lighterPopupMenuBgnd, def->lighterPopupMenuBgnd)
+ CFG_READ_INT(tabBgnd)
+ CFG_READ_TB_BORDER(toolbarBorders)
+ CFG_READ_APPEARANCE(appearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(bgndAppearance, APP_ALLOW_STRIPED)
+ CFG_READ_GRAD_TYPE(bgndGrad)
+ CFG_READ_GRAD_TYPE(menuBgndGrad)
+ CFG_READ_APPEARANCE(menuBgndAppearance, APP_ALLOW_STRIPED)
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ CFG_READ_BOOL(fixParentlessDialogs)
+ CFG_READ_STRING_LIST(noDlgFixApps)
+#endif
+ CFG_READ_STRIPE(stripedProgress)
+ CFG_READ_SLIDER(sliderStyle)
+ CFG_READ_BOOL(animatedProgress)
+ CFG_READ_BOOL(embolden)
+ CFG_READ_DEF_BTN(defBtnIndicator)
+ CFG_READ_LINE(sliderThumbs)
+ CFG_READ_LINE(handles)
+ CFG_READ_BOOL(highlightTab)
+ CFG_READ_INT_BOOL(colorSelTab, DEF_COLOR_SEL_TAB_FACTOR)
+ CFG_READ_BOOL(roundAllTabs)
+ CFG_READ_TAB_MO(tabMouseOver)
+ CFG_READ_SHADE(shadeSliders, true, false, &opts->customSlidersColor)
+ CFG_READ_SHADE(shadeMenubars, true, false, &opts->customMenubarsColor)
+ CFG_READ_SHADE(shadeCheckRadio, false, false, &opts->customCheckRadioColor)
+ CFG_READ_SHADE(sortedLv, true, false, &opts->customSortedLvColor)
+ CFG_READ_SHADE(crColor, true, false, &opts->customCrBgndColor)
+ CFG_READ_SHADE(progressColor, false, false, &opts->customProgressColor)
+ CFG_READ_APPEARANCE(menubarAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(menuitemAppearance, APP_ALLOW_FADE)
+ CFG_READ_APPEARANCE(toolbarAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(selectionAppearance, APP_ALLOW_BASIC)
+#ifdef __cplusplus
+ CFG_READ_APPEARANCE(dwtAppearance, APP_ALLOW_BASIC)
+#endif
+ CFG_READ_LINE(toolbarSeparators)
+ CFG_READ_LINE(splitters)
+ CFG_READ_BOOL(customMenuTextColor)
+ CFG_READ_MOUSE_OVER(coloredMouseOver)
+ CFG_READ_BOOL(menubarMouseOver)
+ CFG_READ_BOOL(useHighlightForMenu)
+ CFG_READ_BOOL(shadeMenubarOnlyWhenActive)
+ CFG_READ_BOOL(thinnerMenuItems)
+ CFG_READ_BOOL(thinnerBtns)
+ if(opts->version<MAKE_VERSION(0, 63))
+ {
+ if(IS_BLACK(opts->customSlidersColor))
+ CFG_READ_COLOR(customSlidersColor)
+ if(IS_BLACK(opts->customMenubarsColor))
+ CFG_READ_COLOR(customMenubarsColor)
+ if(IS_BLACK(opts->customCheckRadioColor))
+ CFG_READ_COLOR(customCheckRadioColor)
+ }
+ CFG_READ_COLOR(customMenuSelTextColor)
+ CFG_READ_COLOR(customMenuNormTextColor)
+ CFG_READ_SCROLLBAR(scrollbarType)
+ CFG_READ_EFFECT(buttonEffect)
+ CFG_READ_APPEARANCE(lvAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(tabAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(activeTabAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(sliderAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(progressAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(progressGrooveAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(grooveAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(sunkenAppearance, APP_ALLOW_BASIC)
+ CFG_READ_APPEARANCE(sbarBgndAppearance, APP_ALLOW_BASIC)
+ if(opts->version<MAKE_VERSION(1, 6))
+ opts->tooltipAppearance=APPEARANCE_FLAT;
+ else
+ {
+ CFG_READ_APPEARANCE(tooltipAppearance, APP_ALLOW_BASIC)
+ }
- if(APPEARANCE_BEVELLED==opts->menubarAppearance)
- opts->menubarAppearance=APPEARANCE_GRADIENT;
- else if(APPEARANCE_RAISED==opts->menubarAppearance)
- opts->menubarAppearance=APPEARANCE_FLAT;
+ if(opts->version<MAKE_VERSION(0, 63))
+ opts->sliderFill=IS_FLAT(opts->appearance) ? opts->grooveAppearance : APPEARANCE_GRADIENT;
+ else
+ {
+ CFG_READ_APPEARANCE(sliderFill, APP_ALLOW_BASIC)
+ }
+ CFG_READ_ECOLOR(progressGrooveColor)
+ CFG_READ_FOCUS(focus)
+ CFG_READ_BOOL(lvButton)
+ CFG_READ_LV_LINES(lvLines)
+ CFG_READ_BOOL(drawStatusBarFrames)
+ CFG_READ_BOOL(fillSlider)
+ CFG_READ_BOOL(roundMbTopOnly)
+ CFG_READ_BOOL(borderMenuitems)
+ CFG_READ_BOOL(darkerBorders)
+ CFG_READ_BOOL(vArrows)
+ CFG_READ_BOOL(xCheck)
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+ CFG_READ_BOOL(fadeLines)
+ CFG_READ_GLOW(glowProgress)
+#endif
+ CFG_READ_BOOL(colorMenubarMouseOver)
+ CFG_READ_INT_BOOL(crHighlight, opts->highlightFactor)
+ CFG_READ_BOOL(crButton)
+ CFG_READ_BOOL(smallRadio)
+ CFG_READ_BOOL(fillProgress)
+ CFG_READ_BOOL(comboSplitter)
+ CFG_READ_BOOL(highlightScrollViews)
+ CFG_READ_BOOL(etchEntry)
+ CFG_READ_INT_BOOL(splitterHighlight, opts->highlightFactor)
+ CFG_READ_INT(crSize)
+ CFG_READ_BOOL(flatSbarButtons)
+ CFG_READ_BOOL(borderSbarGroove)
+ CFG_READ_BOOL(borderProgress)
+ CFG_READ_BOOL(popupBorder)
+ CFG_READ_BOOL(unifySpinBtns)
+ CFG_READ_BOOL(unifySpin)
+ CFG_READ_BOOL(unifyCombo)
+ CFG_READ_BOOL(borderTab)
+ CFG_READ_BOOL(borderInactiveTab)
+ CFG_READ_BOOL(thinSbarGroove)
+ CFG_READ_BOOL(colorSliderMouseOver)
+ CFG_READ_BOOL(menuIcons)
+ CFG_READ_BOOL(forceAlternateLvCols)
+ CFG_READ_BOOL(invertBotTab)
+ CFG_READ_INT_BOOL(menubarHiding, HIDE_KEYBOARD)
+ CFG_READ_INT_BOOL(statusbarHiding, HIDE_KEYBOARD)
+ CFG_READ_BOOL(boldProgress)
+ CFG_READ_BOOL(coloredTbarMo)
+ CFG_READ_BOOL(borderSelection)
+ CFG_READ_BOOL(stripedSbar)
+ CFG_READ_INT_BOOL(windowDrag, WM_DRAG_MENUBAR)
+ CFG_READ_BOOL(shadePopupMenu)
+
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ CFG_READ_BOOL(stdBtnSizes)
+ CFG_READ_INT(titlebarButtons)
+ CFG_READ_TB_ICON(titlebarIcon)
+#endif
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ CFG_READ_BOOL(xbar)
+ CFG_READ_INT(dwtSettings)
+#endif
+ CFG_READ_INT(bgndOpacity)
+ CFG_READ_INT(menuBgndOpacity)
+ CFG_READ_INT(dlgOpacity)
+ CFG_READ_SHADE(menuStripe, true, true, &opts->customMenuStripeColor)
+ CFG_READ_APPEARANCE(menuStripeAppearance, APP_ALLOW_BASIC)
+ if(opts->version<MAKE_VERSION(0, 63) && IS_BLACK(opts->customMenuStripeColor))
+ CFG_READ_COLOR(customMenuStripeColor)
+ CFG_READ_SHADE(comboBtn, true, false, &opts->customComboBtnColor);
+ CFG_READ_BOOL(gtkScrollViews)
+ CFG_READ_BOOL(doubleGtkComboArrow)
+ CFG_READ_BOOL(stdSidebarButtons)
+ CFG_READ_BOOL(toolbarTabs)
+#ifdef __cplusplus
+ CFG_READ_ALIGN(titlebarAlignment)
+ CFG_READ_EFFECT(titlebarEffect)
+ CFG_READ_BOOL(gtkComboMenus)
+ CFG_READ_BOOL(centerTabText)
+/*
+#else
+ CFG_READ_BOOL(setDialogButtonOrder)
+*/
+#endif
+#if !defined __cplusplus || defined CONFIG_DIALOG
+ CFG_READ_INT(expanderHighlight)
+ CFG_READ_BOOL(mapKdeIcons)
+#endif
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+ CFG_READ_BOOL(gtkButtonOrder)
+#endif
+#if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
+ CFG_READ_BOOL(reorderGtkButtons)
+#endif
+ CFG_READ_APPEARANCE(titlebarAppearance, APP_ALLOW_NONE)
+ CFG_READ_APPEARANCE(inactiveTitlebarAppearance, APP_ALLOW_NONE)
+
+ if(APPEARANCE_BEVELLED==opts->titlebarAppearance)
+ opts->titlebarAppearance=APPEARANCE_GRADIENT;
+ else if(APPEARANCE_RAISED==opts->titlebarAppearance)
+ opts->titlebarAppearance=APPEARANCE_FLAT;
+ if((opts->windowBorder&WINDOW_BORDER_BLEND_TITLEBAR) && !(opts->windowBorder&WINDOW_BORDER_COLOR_TITLEBAR_ONLY))
+ opts->windowBorder-=WINDOW_BORDER_BLEND_TITLEBAR;
+ if(APPEARANCE_BEVELLED==opts->inactiveTitlebarAppearance)
+ opts->inactiveTitlebarAppearance=APPEARANCE_GRADIENT;
+ else if(APPEARANCE_RAISED==opts->inactiveTitlebarAppearance)
+ opts->inactiveTitlebarAppearance=APPEARANCE_FLAT;
+#ifdef __cplusplus
+ CFG_READ_APPEARANCE(titlebarButtonAppearance, APP_ALLOW_BASIC)
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ if(opts->xbar && opts->menubarHiding)
+ opts->xbar=false;
+#endif
+#endif
+ CFG_READ_SHADING(shading)
+ CFG_READ_IMAGE(bgndImage)
+ CFG_READ_IMAGE(menuBgndImage)
+ CFG_READ_STRING_LIST(noMenuStripeApps)
+#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ CFG_READ_STRING_LIST(noBgndGradientApps)
+ CFG_READ_STRING_LIST(noBgndOpacityApps)
+ CFG_READ_STRING_LIST(noMenuBgndOpacityApps)
+ CFG_READ_STRING_LIST(noBgndImageApps)
+#endif
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ CFG_READ_STRING_LIST(menubarApps)
+ CFG_READ_STRING_LIST(statusbarApps)
+ CFG_READ_STRING_LIST(useQtFileDialogApps)
+ CFG_READ_STRING_LIST(windowDragWhiteList)
+ CFG_READ_STRING_LIST(windowDragBlackList)
+#endif
+ readDoubleList(cfg, "customShades", opts->customShades, NUM_STD_SHADES);
+ readDoubleList(cfg, "customAlphas", opts->customAlphas, NUM_STD_ALPHAS);
+
+#ifdef __cplusplus
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ if(opts->titlebarButtons&TITLEBAR_BUTTON_COLOR || opts->titlebarButtons&TITLEBAR_BUTTON_ICON_COLOR)
+ {
+#if (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ QStringList cols(readStringEntry(cfg, "titlebarButtonColors").split(',', QString::SkipEmptyParts));
+#else
+ QStringList cols(QStringList::split(',', readStringEntry(cfg, "titlebarButtonColors")));
+#endif
+ if(cols.count() && 0==(cols.count()%NUM_TITLEBAR_BUTTONS) && cols.count()<=(NUM_TITLEBAR_BUTTONS*3))
+ {
+ QStringList::ConstIterator it(cols.begin()),
+ end(cols.end());
+
+ for(int i=0; it!=end; ++it, ++i)
+ {
+ QColor col;
+ setRgb(&col, TO_LATIN1((*it)));
+ opts->titlebarButtonColors[i]=col;
+ }
+ if(cols.count()<(NUM_TITLEBAR_BUTTONS+1))
+ opts->titlebarButtons&=~TITLEBAR_BUTTON_ICON_COLOR;
+ }
+ else
+ {
+ opts->titlebarButtons&=~TITLEBAR_BUTTON_COLOR;
+ opts->titlebarButtons&=~TITLEBAR_BUTTON_ICON_COLOR;
+ }
+ }
+#endif
- if(APPEARANCE_BEVELLED==opts->sliderAppearance)
- opts->sliderAppearance=APPEARANCE_GRADIENT;
+ for(i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
+ {
+ QString gradKey;
- if(APPEARANCE_BEVELLED==opts->tabAppearance)
- opts->tabAppearance=APPEARANCE_GRADIENT;
+ gradKey.sprintf("customgradient%d", (i-APPEARANCE_CUSTOM1)+1);
- if(opts->highlightFactor<((100.0+MIN_HIGHLIGHT_FACTOR)/100.0) ||
- opts->highlightFactor>((100.0+MAX_HIGHLIGHT_FACTOR)/100.0))
- opts->highlightFactor=DEFAULT_HIGHLIGHT_FACTOR;
+#if (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ QStringList vals(readStringEntry(cfg, gradKey).split(',', QString::SkipEmptyParts));
+#else
+ QStringList vals(QStringList::split(',', readStringEntry(cfg, gradKey)));
+#endif
- if(opts->animatedProgress && !opts->stripedProgress)
- opts->animatedProgress=false;
+ if(vals.size())
+ opts->customGradient.erase((EAppearance)i);
+
+ if(vals.size()>=5)
+ {
+ QStringList::ConstIterator it(vals.begin()),
+ end(vals.end());
+ bool ok(true),
+ haveAlpha(false);
+ Gradient grad;
+ int j;
+
+ grad.border=toGradientBorder(TO_LATIN1((*it)), &haveAlpha);
+ ok=vals.size()%(haveAlpha ? 3 : 2);
+
+ for(++it, j=0; it!=end && ok; ++it, ++j)
+ {
+ double pos=(*it).toDouble(&ok),
+ val=ok ? (*(++it)).toDouble(&ok) : 0.0,
+ alpha=haveAlpha && ok ? (*(++it)).toDouble(&ok) : 1.0;
+
+ ok=ok && (pos>=0 && pos<=1.0) && (val>=0.0 && val<=2.0) && (alpha>=0.0 && alpha<=1.0);
+
+ if(ok)
+ grad.stops.insert(GradientStop(pos, val, alpha));
+ }
+
+ if(ok)
+ {
+ opts->customGradient[(EAppearance)i]=grad;
+ opts->customGradient[(EAppearance)i].stops=grad.stops.fix();
+ }
+ }
+ }
+#else
+ for(i=0; i<NUM_CUSTOM_GRAD; ++i)
+ {
+ char gradKey[18];
+ char *str;
+
+ sprintf(gradKey, "customgradient%d", i+1);
+ if((str=readStringEntry(cfg, gradKey)))
+ {
+ int j,
+ comma=0;
+
+ for(j=0; str[j]; ++j)
+ if(','==str[j])
+ comma++;
+
+ if(comma && opts->customGradient[i])
+ {
+ if(opts->customGradient[i]->stops)
+ free(opts->customGradient[i]->stops);
+ free(opts->customGradient[i]);
+ opts->customGradient[i]=0L;
+ }
+
+ if(comma>=4)
+ {
+ char *c=strchr(str, ',');
+
+ if(c)
+ {
+ bool haveAlpha=false;
+ EGradientBorder border=toGradientBorder(str, &haveAlpha);
+ int parts=haveAlpha ? 3 : 2;
+ bool ok=0==comma%parts;
+
+ *c='\0';
+
+ if(ok)
+ {
+ opts->customGradient[i]=malloc(sizeof(Gradient));
+ opts->customGradient[i]->numStops=comma/parts;
+ opts->customGradient[i]->stops=malloc(sizeof(GradientStop) * opts->customGradient[i]->numStops);
+ opts->customGradient[i]->border=border;
+ str=c+1;
+ for(j=0; j<comma && str && ok; j+=parts)
+ {
+ int stop=j/parts;
+ c=strchr(str, ',');
+
+ if(c)
+ {
+ *c='\0';
+ opts->customGradient[i]->stops[stop].pos=g_ascii_strtod(str, NULL);
+ str=c+1;
+ c=str ? strchr(str, ',') : 0L;
+
+ if(c || str)
+ {
+ if(c)
+ *c='\0';
+ opts->customGradient[i]->stops[stop].val=g_ascii_strtod(str, NULL);
+ str=c ? c+1 : c;
+ if(haveAlpha)
+ {
+ c=str ? strchr(str, ',') : 0L;
+ if(c || str)
+ {
+ if(c)
+ *c='\0';
+ opts->customGradient[i]->stops[stop].alpha=g_ascii_strtod(str, NULL);
+ str=c ? c+1 : c;
+ }
+ else
+ ok=false;
+ }
+ else
+ opts->customGradient[i]->stops[stop].alpha=1.0;
+ }
+ else
+ ok=false;
+ }
+ else
+ ok=false;
+
+ ok=ok &&
+ (opts->customGradient[i]->stops[stop].pos>=0 && opts->customGradient[i]->stops[stop].pos<=1.0) &&
+ (opts->customGradient[i]->stops[stop].val>=0.0 && opts->customGradient[i]->stops[stop].val<=2.0) &&
+ (opts->customGradient[i]->stops[stop].alpha>=0.0 && opts->customGradient[i]->stops[stop].alpha<=1.0);
+ }
+
+ if(ok)
+ {
+ int addStart=0,
+ addEnd=0;
+ if(opts->customGradient[i]->stops[0].pos>0.001)
+ addStart=1;
+ if(opts->customGradient[i]->stops[opts->customGradient[i]->numStops-1].pos<0.999)
+ addEnd=1;
+
+ if(addStart || addEnd)
+ {
+ int newSize=opts->customGradient[i]->numStops+addStart+addEnd;
+ GradientStop *stops=malloc(sizeof(GradientStop) * newSize);
+
+ if(addStart)
+ {
+ stops[0].pos=0.0;
+ stops[0].val=1.0;
+ stops[0].alpha=1.0;
+ }
+ memcpy(&stops[addStart], opts->customGradient[i]->stops, sizeof(GradientStop) * opts->customGradient[i]->numStops);
+ if(addEnd)
+ {
+ stops[opts->customGradient[i]->numStops+addStart].pos=1.0;
+ stops[opts->customGradient[i]->numStops+addStart].val=1.0;
+ stops[opts->customGradient[i]->numStops+addStart].alpha=1.0;
+ }
+ opts->customGradient[i]->numStops=newSize;
+ free(opts->customGradient[i]->stops);
+ opts->customGradient[i]->stops=stops;
+ }
+ }
+ else
+ {
+ free(opts->customGradient[i]->stops);
+ free(opts->customGradient[i]);
+ opts->customGradient[i]=0L;
+ }
+ }
+ }
+ }
+ }
+ }
+#endif
- if(opts->colorSelTab && APPEARANCE_GRADIENT!=opts->tabAppearance)
- opts->colorSelTab=false;
+ checkConfig(opts);
- if(SHADE_CUSTOM==opts->shadeMenubars || SHADE_BLEND_SELECTED==opts->shadeMenubars || !opts->borderMenuitems)
- opts->colorMenubarMouseOver=true;
+#ifndef __cplusplus
+ if(!defOpts)
+ {
+ int i;
+ for(i=0; i<NUM_CUSTOM_GRAD; ++i)
+ if(def->customGradient[i])
+ free(def->customGradient[i]);
+ }
+ releaseConfig(cfg);
+ freeOpts(defOpts);
+#endif
+ return true;
+ }
+ else
+ {
+#ifdef __cplusplus
+ if(defOpts)
+ *opts=*defOpts;
+ else
+ defaultSettings(opts);
+#else
+ if(defOpts)
+ copyOpts(defOpts, opts);
+ else
+ defaultSettings(opts);
+#endif
return true;
}
}
@@ -793,7 +2304,7 @@ static bool fileExists(const char *path)
static const char * getSystemConfigFile()
{
- static const char * constFiles[]={ "/etc/qt4/"QTC_FILE, "/etc/qt3/"QTC_FILE, "/etc/qt/"QTC_FILE, NULL };
+ static const char * constFiles[]={ /*"/etc/qt4/"OLD_CONFIG_FILE, "/etc/qt3/"OLD_CONFIG_FILE, "/etc/qt/"OLD_CONFIG_FILE,*/ "/etc/"OLD_CONFIG_FILE, NULL };
int i;
@@ -806,70 +2317,199 @@ static const char * getSystemConfigFile()
static void defaultSettings(Options *opts)
{
/* Set hard-coded defaults... */
+#ifndef __cplusplus
+ int i;
+
+ for(i=0; i<NUM_CUSTOM_GRAD; ++i)
+ opts->customGradient[i]=0L;
+ opts->customGradient[APPEARANCE_CUSTOM1]=malloc(sizeof(Gradient));
+ opts->customGradient[APPEARANCE_CUSTOM2]=malloc(sizeof(Gradient));
+ setupGradient(opts->customGradient[APPEARANCE_CUSTOM1], GB_3D,3,0.0,1.2,0.5,1.0,1.0,1.0);
+ setupGradient(opts->customGradient[APPEARANCE_CUSTOM2], GB_3D,3,0.0,0.9,0.5,1.0,1.0,1.0);
+#else
+ // Setup titlebar gradients...
+ setupGradient(&(opts->customGradient[APPEARANCE_CUSTOM1]), GB_3D,3,0.0,1.2,0.5,1.0,1.0,1.0);
+ setupGradient(&(opts->customGradient[APPEARANCE_CUSTOM2]), GB_3D,3,0.0,0.9,0.5,1.0,1.0,1.0);
+#endif
+ opts->customShades[0]=1.16;
+ opts->customShades[1]=1.07;
+ opts->customShades[2]=0.9;
+ opts->customShades[3]=0.78;
+ opts->customShades[4]=0.84;
+ opts->customShades[5]=0.75;
+ opts->customAlphas[0]=0;
opts->contrast=7;
opts->passwordChar=0x25CF;
+ opts->gbFactor=DEF_GB_FACTOR;
opts->highlightFactor=DEFAULT_HIGHLIGHT_FACTOR;
+ opts->crHighlight=DEFAULT_CR_HIGHLIGHT_FACTOR;
+ opts->splitterHighlight=DEFAULT_SPLITTER_HIGHLIGHT_FACTOR;
+ opts->crSize=CR_LARGE_SIZE;
+ opts->menuDelay=DEFAULT_MENU_DELAY;
+ opts->sliderWidth=DEFAULT_SLIDER_WIDTH;
+ opts->selectionAppearance=APPEARANCE_HARSH_GRADIENT;
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+ opts->round=ROUND_EXTRA;
+ opts->fadeLines=true;
+ opts->glowProgress=GLOW_NONE;
+ opts->gtkButtonOrder=false;
+#else
opts->round=ROUND_FULL;
- opts->lighterPopupMenuBgnd=true;
- opts->animatedProgress=true;
- opts->stripedProgress=STRIPE_DIAGONAL;
- opts->sliderStyle=SLIDER_TRIANGULAR;
- opts->highlightTab=true;
- opts->colorSelTab=false;
+#endif
+#ifdef __cplusplus
+ opts->dwtAppearance=APPEARANCE_CUSTOM1;
+#endif
+#if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
+ opts->reorderGtkButtons=false;
+#endif
+ opts->bgndImage.type=IMG_NONE;
+ opts->menuBgndImage.type=IMG_NONE;
+ opts->lighterPopupMenuBgnd=DEF_POPUPMENU_LIGHT_FACTOR;
+ opts->tabBgnd=DEF_TAB_BGND;
+ opts->animatedProgress=false;
+ opts->stripedProgress=STRIPE_NONE;
+ opts->sliderStyle=SLIDER_PLAIN;
+ opts->highlightTab=false;
+ opts->colorSelTab=0;
+ opts->roundAllTabs=true;
+ opts->tabMouseOver=TAB_MO_GLOW;
opts->embolden=false;
- opts->appearance=APPEARANCE_DULL_GLASS;
+ opts->bgndGrad=GT_HORIZ;
+ opts->menuBgndGrad=GT_HORIZ;
+ opts->appearance=APPEARANCE_SOFT_GRADIENT;
+ opts->bgndAppearance=APPEARANCE_FLAT;
+ opts->menuBgndAppearance=APPEARANCE_FLAT;
opts->lvAppearance=APPEARANCE_BEVELLED;
- opts->tabAppearance=APPEARANCE_GRADIENT;
- opts->sliderAppearance=APPEARANCE_DULL_GLASS;
- opts->menubarAppearance=APPEARANCE_GRADIENT;
- opts->menuitemAppearance=APPEARANCE_DULL_GLASS;
+ opts->tabAppearance=APPEARANCE_SOFT_GRADIENT;
+ opts->activeTabAppearance=APPEARANCE_SOFT_GRADIENT;
+ opts->sliderAppearance=APPEARANCE_SOFT_GRADIENT;
+ opts->menubarAppearance=APPEARANCE_FLAT;
+ opts->menuitemAppearance=APPEARANCE_FADE;
opts->toolbarAppearance=APPEARANCE_FLAT;
opts->progressAppearance=APPEARANCE_DULL_GLASS;
- opts->defBtnIndicator=IND_COLORED;
+ opts->progressGrooveAppearance=APPEARANCE_INVERTED;
+ opts->progressGrooveColor=ECOLOR_DARK;
+ opts->grooveAppearance=APPEARANCE_INVERTED;
+ opts->sunkenAppearance=APPEARANCE_SOFT_GRADIENT;
+ opts->sbarBgndAppearance=APPEARANCE_FLAT;
+ opts->tooltipAppearance=APPEARANCE_GRADIENT;
+ opts->sliderFill=APPEARANCE_GRADIENT;
+ opts->defBtnIndicator=IND_GLOW;
opts->sliderThumbs=LINE_FLAT;
- opts->handles=LINE_SUNKEN;
- opts->shadeSliders=SHADE_BLEND_SELECTED;
+ opts->handles=LINE_1DOT;
+ opts->shadeSliders=SHADE_NONE;
opts->shadeMenubars=SHADE_NONE;
opts->shadeCheckRadio=SHADE_NONE;
+ opts->sortedLv=SHADE_NONE;
opts->toolbarBorders=TB_NONE;
- opts->toolbarSeparators=LINE_NONE;
- opts->splitters=LINE_FLAT;
+ opts->toolbarSeparators=LINE_SUNKEN;
+ opts->splitters=LINE_1DOT;
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
opts->fixParentlessDialogs=false;
+#ifdef __cplusplus
+ opts->noDlgFixApps << "kate" << "plasma" << "plasma-desktop" << "plasma-netbook";
+#else
+ opts->noDlgFixApps=NULL;
+#endif
+#endif
opts->customMenuTextColor=false;
- opts->coloredMouseOver=MO_PLASTIK;
+ opts->coloredMouseOver=MO_GLOW;
opts->menubarMouseOver=true;
- opts->shadeMenubarOnlyWhenActive=true;
+ opts->useHighlightForMenu=false;
+ opts->shadeMenubarOnlyWhenActive=false;
opts->thinnerMenuItems=false;
+ opts->thinnerBtns=true;
opts->scrollbarType=SCROLLBAR_KDE;
- opts->buttonEffect=EFFECT_NONE;
-#ifndef QTC_PLAIN_FOCUS_ONLY
- opts->stdFocus=true;
-#endif
- opts->lvLines=false;
+ opts->buttonEffect=EFFECT_SHADOW;
+ opts->focus=FOCUS_GLOW;
+ opts->lvButton=false;
+ opts->lvLines=LV_NONE;
opts->drawStatusBarFrames=false;
opts->fillSlider=true;
opts->roundMbTopOnly=true;
- opts->borderMenuitems=true;
- opts->gradientPbGroove=true;
+ opts->borderMenuitems=false;
opts->darkerBorders=false;
- opts->vArrows=false;
+ opts->vArrows=true;
opts->xCheck=false;
- opts->framelessGroupBoxes=false;
- opts->colorMenubarMouseOver=false;
- opts->inactiveHighlight=false;
-#ifdef QTC_CONFIG_DIALOG
- opts->shading=SHADING_HSL;
+ opts->colorMenubarMouseOver=true;
+ opts->crButton=true;
+ opts->crColor=SHADE_NONE;
+ opts->progressColor=SHADE_SELECTED;
+ opts->smallRadio=true;
+ opts->fillProgress=true;
+ opts->comboSplitter=false;
+ opts->highlightScrollViews=false;
+ opts->etchEntry=false;
+ opts->flatSbarButtons=true;
+ opts->borderSbarGroove=true;
+ opts->borderProgress=true;
+ opts->popupBorder=true;
+ opts->unifySpinBtns=false;
+ opts->unifySpin=true;
+ opts->unifyCombo=true;
+ opts->borderTab=true;
+ opts->borderInactiveTab=false;
+ opts->thinSbarGroove=true;
+ opts->colorSliderMouseOver=false;
+ opts->menuIcons=true;
+ opts->forceAlternateLvCols=false;
+ opts->invertBotTab=true;
+ opts->menubarHiding=HIDE_NONE;
+ opts->statusbarHiding=HIDE_NONE;
+ opts->boldProgress=true;
+ opts->coloredTbarMo=false;
+ opts->borderSelection=false;
+ opts->square=SQUARE_POPUP_MENUS;
+ opts->stripedSbar=false;
+ opts->windowDrag=WM_DRAG_NONE;
+ opts->shadePopupMenu=false;
+ opts->windowBorder=WINDOW_BORDER_ADD_LIGHT_BORDER;
+ opts->groupBox=FRAME_FADED;
+ opts->gbFactor=DEF_GB_FACTOR;
+ opts->gbLabel=GB_LBL_BOLD|GB_LBL_OUTSIDE;
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ opts->stdBtnSizes=false;
+ opts->titlebarButtons=TITLEBAR_BUTTON_ROUND|TITLEBAR_BUTTON_HOVER_SYMBOL;
+ opts->titlebarIcon=TITLEBAR_ICON_NEXT_TO_TITLE;
#endif
-#ifdef __cplusplus
+ opts->menuStripe=SHADE_NONE;
+ opts->menuStripeAppearance=APPEARANCE_DARK_INVERTED;
+ opts->shading=SHADING_HSL;
+ opts->gtkScrollViews=true;
+ opts->comboBtn=SHADE_NONE;
+ opts->doubleGtkComboArrow=true;
opts->stdSidebarButtons=false;
- opts->gtkScrollViews=false;
+ opts->toolbarTabs=false;
+ opts->bgndOpacity=opts->dlgOpacity=opts->menuBgndOpacity=100;
+#ifdef __cplusplus
opts->gtkComboMenus=false;
opts->customMenubarsColor.setRgb(0, 0, 0);
opts->customSlidersColor.setRgb(0, 0, 0);
opts->customMenuNormTextColor.setRgb(0, 0, 0);
opts->customMenuSelTextColor.setRgb(0, 0, 0);
opts->customCheckRadioColor.setRgb(0, 0, 0);
+ opts->customComboBtnColor.setRgb(0, 0, 0);
+ opts->customMenuStripeColor.setRgb(0, 0, 0);
+ opts->customProgressColor.setRgb(0, 0, 0);
+ opts->titlebarAlignment=ALIGN_FULL_CENTER;
+ opts->titlebarEffect=EFFECT_SHADOW;
+ opts->centerTabText=false;
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ opts->xbar=false;
+ opts->dwtSettings=DWT_BUTTONS_AS_PER_TITLEBAR|DWT_ROUND_TOP_ONLY;
+ opts->menubarApps << "amarok" << "arora" << "kaffeine" << "kcalc" << "smplayer" << "VirtualBox";
+ opts->statusbarApps << "kde";
+ opts->useQtFileDialogApps << "googleearth-bin";
+ opts->noMenuBgndOpacityApps << "inkscape" << "inkscape" << "sonata" << "totem";
+ opts->noBgndOpacityApps << "smplayer" << "kaffeine" << "dragon" << "kscreenlocker" << "inkscape" << "inkscape" << "sonata" << "totem";
+#endif
+ opts->noMenuStripeApps << "gtk" << "soffice.bin";
#else
+ opts->noBgndGradientApps=NULL;
+ opts->noBgndOpacityApps=g_strsplit("inkscape,sonata,totem",",", -1);;
+ opts->noBgndImageApps=NULL;
+ opts->noMenuStripeApps=g_strsplit("gtk",",", -1);
+ opts->noMenuBgndOpacityApps=g_strsplit("inkscape,sonata,totem",",", -1);
/*
opts->setDialogButtonOrder=false;
*/
@@ -878,15 +2518,20 @@ static void defaultSettings(Options *opts)
opts->customMenuNormTextColor.red=opts->customMenuNormTextColor.green=opts->customMenuNormTextColor.blue=0;
opts->customMenuSelTextColor.red=opts->customMenuSelTextColor.green=opts->customMenuSelTextColor.blue=0;
opts->customCheckRadioColor.red=opts->customCheckRadioColor.green=opts->customCheckRadioColor.blue=0;
+ opts->customComboBtnColor.red=opts->customCheckRadioColor.green=opts->customCheckRadioColor.blue=0;
+ opts->customMenuStripeColor.red=opts->customMenuStripeColor.green=opts->customMenuStripeColor.blue=0;
+ opts->customProgressColor.red=opts->customProgressColor.green=opts->customProgressColor.blue=0;
#endif
-#if !defined __cplusplus || defined QTC_CONFIG_DIALOG
+#if !defined __cplusplus || defined CONFIG_DIALOG
opts->mapKdeIcons=true;
+ opts->expanderHighlight=DEFAULT_EXPANDER_HIGHLIGHT_FACTOR;
#endif
-#if defined QTC_CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
- opts->gtkButtonOrder=false;
+ opts->titlebarAppearance=APPEARANCE_CUSTOM1;
+ opts->inactiveTitlebarAppearance=APPEARANCE_CUSTOM1;
+#ifdef __cplusplus
+ opts->titlebarButtonAppearance=APPEARANCE_GRADIENT;
#endif
-
/* Read system config file... */
{
static const char * systemFilename=NULL;
@@ -897,6 +2542,11 @@ static void defaultSettings(Options *opts)
if(systemFilename)
readConfig(systemFilename, opts, opts);
}
+
+#if !defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION < 0x040000)
+ if(FOCUS_FILLED==opts->focus)
+ opts->focus=FOCUS_FULL;
+#endif
}
#endif
@@ -912,19 +2562,31 @@ static const char *toStr(EDefBtnIndicator ind)
return "fontcolor";
case IND_CORNER:
return "corner";
+ case IND_TINT:
+ return "tint";
+ case IND_GLOW:
+ return "glow";
+ case IND_DARKEN:
+ return "darken";
+ case IND_SELECTED:
+ return "origselected";
default:
return "colored";
}
}
-static const char *toStr(ELine ind, bool none)
+static const char *toStr(ELine ind, bool dashes)
{
switch(ind)
{
+ case LINE_1DOT:
+ return "1dot";
case LINE_DOTS:
return "dots";
case LINE_DASHES:
- return none ? "none" : "dashes";
+ return dashes ? "dashes" : "none";
+ case LINE_NONE:
+ return "none";
case LINE_FLAT:
return "flat";
default:
@@ -955,14 +2617,18 @@ static const char *toStr(EMouseOver mo)
{
case MO_COLORED:
return "colored";
+ case MO_COLORED_THICK:
+ return "thickcolored";
case MO_NONE:
return "none";
+ case MO_GLOW:
+ return "glow";
default:
return "plastik";
}
}
-static const char *toStr(EAppearance exp)
+static QString toStr(EAppearance exp, EAppAllow allow)
{
switch(exp)
{
@@ -970,22 +2636,56 @@ static const char *toStr(EAppearance exp)
return "flat";
case APPEARANCE_RAISED:
return "raised";
+ case APPEARANCE_DULL_GLASS:
+ return "dullglass";
+ case APPEARANCE_SHINY_GLASS:
+ return "shinyglass";
+ case APPEARANCE_AGUA:
+ return "agua";
+ case APPEARANCE_SOFT_GRADIENT:
+ return "soft";
case APPEARANCE_GRADIENT:
return "gradient";
+ case APPEARANCE_HARSH_GRADIENT:
+ return "harsh";
+ case APPEARANCE_INVERTED:
+ return "inverted";
+ case APPEARANCE_DARK_INVERTED:
+ return "darkinverted";
case APPEARANCE_SPLIT_GRADIENT:
return "splitgradient";
- case APPEARANCE_DULL_GLASS:
- return "dullglass";
case APPEARANCE_BEVELLED:
return "bevelled";
- case APPEARANCE_INVERTED:
- return "inverted";
+ case APPEARANCE_FADE:
+ switch(allow)
+ {
+ case APP_ALLOW_BASIC: // Should not get here!
+ case APP_ALLOW_FADE:
+ return "fade";
+ case APP_ALLOW_STRIPED:
+ return "striped";
+ case APP_ALLOW_NONE:
+ return "none";
+ }
default:
- return "shinyglass";
+ {
+ QString app;
+
+ app.sprintf("customgradient%d", (exp-APPEARANCE_CUSTOM1)+1);
+ return app;
+ }
}
}
-static const char *toStr(EShade exp, bool dark, bool convertBlendSelToSel)
+static QString toStr(const QColor &col)
+{
+ QString colorStr;
+
+ colorStr.sprintf("#%02X%02X%02X", col.red(), col.green(), col.blue());
+ return colorStr;
+}
+
+static QString toStr(EShade exp, const QColor &col)
{
switch(exp)
{
@@ -993,12 +2693,15 @@ static const char *toStr(EShade exp, bool dark, bool convertBlendSelToSel)
case SHADE_NONE:
return "none";
case SHADE_BLEND_SELECTED:
- return dark || !convertBlendSelToSel ? "selected" : "origselected";
+ return "selected";
case SHADE_CUSTOM:
- return "custom";
- /* case SHADE_SELECTED */
+ return toStr(col);
+ case SHADE_SELECTED:
+ return "origselected";
case SHADE_DARKEN:
- return dark ? "darken" : "origselected";
+ return "darken";
+ case SHADE_WINDOW_BORDER:
+ return "wborder";
}
}
@@ -1010,6 +2713,10 @@ static const char *toStr(ERound exp)
return "none";
case ROUND_SLIGHT:
return "slight";
+ case ROUND_EXTRA:
+ return "extra";
+ case ROUND_MAX:
+ return "max";
default:
case ROUND_FULL:
return "full";
@@ -1034,6 +2741,24 @@ static const char *toStr(EScrollbar sb)
}
}
+static const char *toStr(EFrame sb)
+{
+ switch(sb)
+ {
+ case FRAME_NONE:
+ return "none";
+ case FRAME_PLAIN:
+ return "plain";
+ case FRAME_LINE:
+ return "line";
+ case FRAME_SHADED:
+ return "shaded";
+ case FRAME_FADED:
+ default:
+ return "faded";
+ }
+}
+
static const char *toStr(EEffect e)
{
switch(e)
@@ -1050,14 +2775,6 @@ static const char *toStr(EEffect e)
inline const char * toStr(bool b) { return b ? "true" : "false"; }
-static QString toStr(const QColor &col)
-{
- QString colorStr;
-
- colorStr.sprintf("#%02X%02X%02X", col.red(), col.green(), col.blue());
- return colorStr;
-}
-
static const char *toStr(EShading s)
{
switch(s)
@@ -1069,6 +2786,8 @@ static const char *toStr(EShading s)
return "hsl";
case SHADING_HSV:
return "hsv";
+ case SHADING_HCY:
+ return "hcy";
}
}
@@ -1083,6 +2802,8 @@ static const char *toStr(EStripe s)
return "none";
case STRIPE_DIAGONAL:
return "diagonal";
+ case STRIPE_FADE:
+ return "fade";
}
}
@@ -1094,13 +2815,176 @@ static const char *toStr(ESliderStyle s)
return "plain";
case SLIDER_TRIANGULAR:
return "triangular";
+ case SLIDER_ROUND_ROTATED:
+ return "r-round";
+ case SLIDER_PLAIN_ROTATED:
+ return "r-plain";
+ case SLIDER_CIRCULAR:
+ return "circular";
default:
case SLIDER_ROUND:
return "round";
}
}
+static const char *toStr(EColor s)
+{
+ switch(s)
+ {
+ case ECOLOR_BACKGROUND:
+ return "background";
+ case ECOLOR_DARK:
+ return "dark";
+ default:
+ case ECOLOR_BASE:
+ return "base";
+ }
+}
+
+static const char *toStr(EFocus f)
+{
+ switch(f)
+ {
+ default:
+ case FOCUS_STANDARD:
+ return "standard";
+ case FOCUS_RECTANGLE:
+ return "rect";
+ case FOCUS_FILLED:
+ return "filled";
+ case FOCUS_FULL:
+ return "full";
+ case FOCUS_LINE:
+ return "line";
+ case FOCUS_GLOW:
+ return "glow";
+ }
+}
+
+static const char *toStr(ETabMo f)
+{
+ switch(f)
+ {
+ default:
+ case TAB_MO_BOTTOM:
+ return "bot";
+ case TAB_MO_TOP:
+ return "top";
+ case TAB_MO_GLOW:
+ return "glow";
+ }
+}
+
+static const char *toStr(EGradientBorder g)
+{
+ switch(g)
+ {
+ case GB_NONE:
+ return "none";
+ case GB_LIGHT:
+ return "light";
+ case GB_3D_FULL:
+ return "3dfull";
+ case GB_SHINE:
+ return "shine";
+ default:
+ case GB_3D:
+ return "3d";
+ }
+}
+
+static const char *toStr(EAlign ind)
+{
+ switch(ind)
+ {
+ default:
+ case ALIGN_LEFT:
+ return "left";
+ case ALIGN_CENTER:
+ return "center";
+ case ALIGN_FULL_CENTER:
+ return "center-full";
+ case ALIGN_RIGHT:
+ return "right";
+ }
+}
+
+static const char * toStr(ETitleBarIcon icn)
+{
+ switch(icn)
+ {
+ case TITLEBAR_ICON_NONE:
+ return "none";
+ default:
+ case TITLEBAR_ICON_MENU_BUTTON:
+ return "menu";
+ case TITLEBAR_ICON_NEXT_TO_TITLE:
+ return "title";
+ }
+}
+
+static const char * toStr(EGradType gt)
+{
+ switch(gt)
+ {
+ case GT_VERT:
+ return "vert";
+ default:
+ case GT_HORIZ:
+ return "horiz";
+ }
+}
+
+static const char * toStr(ELvLines lv)
+{
+ switch(lv)
+ {
+ case LV_NEW:
+ return "new";
+ case LV_OLD:
+ return "old";
+ default:
+ case LV_NONE:
+ return "none";
+ }
+}
+
+static const char * toStr(EImageType lv)
+{
+ switch(lv)
+ {
+ default:
+ case IMG_NONE:
+ return "none";
+ case IMG_PLAIN_RINGS:
+ return "plainrings";
+ case IMG_BORDERED_RINGS:
+ return "rings";
+ case IMG_SQUARE_RINGS:
+ return "squarerings";
+ case IMG_FILE:
+ return "file";
+ }
+}
+
+static const char * toStr(EGlow lv)
+{
+ switch(lv)
+ {
+ default:
+ case GLOW_NONE:
+ return "none";
+ case GLOW_START:
+ return "start";
+ case GLOW_MIDDLE:
+ return "middle";
+ case GLOW_END:
+ return "end";
+ }
+}
+
#if QT_VERSION >= 0x040000
+#include <QTextStream>
#define CFG config
#else
#define CFG (*cfg)
@@ -1112,124 +2996,362 @@ static const char *toStr(ESliderStyle s)
else \
CFG.writeEntry(#ENTRY, toStr(opts.ENTRY));
-#define CFG_WRITE_ENTRY_FORCE(ENTRY) \
- CFG.writeEntry(#ENTRY, toStr(opts.ENTRY));
-
+#define CFG_WRITE_APPEARANCE_ENTRY(ENTRY, ALLOW) \
+ if (!exportingStyle && def.ENTRY==opts.ENTRY) \
+ CFG.deleteEntry(#ENTRY); \
+ else \
+ CFG.writeEntry(#ENTRY, toStr(opts.ENTRY, ALLOW));
+
#define CFG_WRITE_ENTRY_B(ENTRY, B) \
if (!exportingStyle && def.ENTRY==opts.ENTRY) \
CFG.deleteEntry(#ENTRY); \
else \
CFG.writeEntry(#ENTRY, toStr(opts.ENTRY, B));
-#define CFG_WRITE_ENTRY_SHADE(ENTRY, DARK, CONVERT_SHADE) \
+#define CFG_WRITE_ENTRY_NUM(ENTRY) \
if (!exportingStyle && def.ENTRY==opts.ENTRY) \
CFG.deleteEntry(#ENTRY); \
else \
- CFG.writeEntry(#ENTRY, toStr(opts.ENTRY, DARK, CONVERT_SHADE));
+ CFG.writeEntry(#ENTRY, opts.ENTRY);
-#define CFG_WRITE_ENTRY_D(ENTRY) \
+#define CFG_WRITE_SHADE_ENTRY(ENTRY, COL) \
if (!exportingStyle && def.ENTRY==opts.ENTRY) \
CFG.deleteEntry(#ENTRY); \
else \
- CFG.writeEntry(#ENTRY, ((int)(opts.ENTRY*100))-100);
+ CFG.writeEntry(#ENTRY, toStr(opts.ENTRY, opts.COL));
-#define CFG_WRITE_ENTRY_NUM(ENTRY) \
+#define CFG_WRITE_IMAGE_ENTRY(ENTRY) \
+ if (!exportingStyle && def.ENTRY.type==opts.ENTRY.type) \
+ CFG.deleteEntry(#ENTRY); \
+ else \
+ CFG.writeEntry(#ENTRY, toStr(opts.ENTRY.type)); \
+ if(IMG_FILE!=opts.ENTRY.type) \
+ { \
+ CFG.deleteEntry(#ENTRY ".file"); \
+ CFG.deleteEntry(#ENTRY ".width"); \
+ CFG.deleteEntry(#ENTRY ".height"); \
+ } \
+ else \
+ { \
+ CFG.writeEntry(#ENTRY ".file", opts.ENTRY.file); \
+ CFG.writeEntry(#ENTRY ".width", opts.ENTRY.width); \
+ CFG.writeEntry(#ENTRY ".height", opts.ENTRY.height); \
+ }
+
+#define CFG_WRITE_STRING_LIST_ENTRY(ENTRY) \
if (!exportingStyle && def.ENTRY==opts.ENTRY) \
CFG.deleteEntry(#ENTRY); \
else \
- CFG.writeEntry(#ENTRY, opts.ENTRY);
+ CFG.writeEntry(#ENTRY, QStringList(opts.ENTRY.toList()).join(",")); \
bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, bool exportingStyle=false)
{
if(!cfg)
{
- const char *xdg=xdgConfigFolder();
+ const char *cfgDir=qtcConfDir();
- if(xdg)
+ if(cfgDir)
{
- char filename[QTC_MAX_FILENAME_LEN];
-
- sprintf(filename, "%s/"QTC_FILE, xdg);
-
#if QT_VERSION >= 0x040000
- KConfig defCfg(filename, KConfig::SimpleConfig);
+ KConfig defCfg(QFile::decodeName(cfgDir)+CONFIG_FILE, KConfig::SimpleConfig);
#else
- KConfig defCfg(filename, false, false);
+ KConfig defCfg(QFile::decodeName(cfgDir)+CONFIG_FILE, false, false);
#endif
- return writeConfig(&defCfg, opts, def, exportingStyle);
+ if(writeConfig(&defCfg, opts, def, exportingStyle))
+ {
+ const char *oldFiles[]={ OLD_CONFIG_FILE, "qtcurve.gtk-icons", 0};
+
+ for(int i=0; oldFiles[i]; ++i)
+ {
+ QString oldFileName(QFile::decodeName(cfgDir)+QString("../")+oldFiles[i]);
+
+ if(QFile::exists(oldFileName))
+ QFile::remove(oldFileName);
+ }
+ }
}
}
else
{
#if QT_VERSION >= 0x040000
- KConfigGroup config(cfg, QTC_GROUP);
+ KConfigGroup config(cfg, SETTINGS_GROUP);
#else
- cfg->setGroup(QTC_GROUP);
+ cfg->setGroup(SETTINGS_GROUP);
#endif
+ CFG.writeEntry(VERSION_KEY, VERSION);
CFG_WRITE_ENTRY_NUM(passwordChar)
+ CFG_WRITE_ENTRY_NUM(gbFactor)
CFG_WRITE_ENTRY(round)
- CFG_WRITE_ENTRY_D(highlightFactor)
+ CFG_WRITE_ENTRY_NUM(highlightFactor)
+ CFG_WRITE_ENTRY_NUM(menuDelay)
+ CFG_WRITE_ENTRY_NUM(sliderWidth)
CFG_WRITE_ENTRY(toolbarBorders)
- CFG_WRITE_ENTRY_FORCE(appearance)
+ CFG_WRITE_APPEARANCE_ENTRY(appearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(bgndAppearance, APP_ALLOW_STRIPED)
+ CFG_WRITE_ENTRY(bgndGrad)
+ CFG_WRITE_ENTRY(menuBgndGrad)
+ CFG_WRITE_APPEARANCE_ENTRY(menuBgndAppearance, APP_ALLOW_STRIPED)
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
CFG_WRITE_ENTRY(fixParentlessDialogs)
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ CFG_WRITE_STRING_LIST_ENTRY(noDlgFixApps)
+#endif
+#endif
CFG_WRITE_ENTRY(stripedProgress)
CFG_WRITE_ENTRY(sliderStyle)
CFG_WRITE_ENTRY(animatedProgress)
- CFG_WRITE_ENTRY(lighterPopupMenuBgnd)
+ CFG_WRITE_ENTRY_NUM(lighterPopupMenuBgnd)
+ CFG_WRITE_ENTRY_NUM(tabBgnd)
CFG_WRITE_ENTRY(embolden)
CFG_WRITE_ENTRY(defBtnIndicator)
- CFG_WRITE_ENTRY_B(sliderThumbs, true)
- CFG_WRITE_ENTRY_B(handles, false)
+ CFG_WRITE_ENTRY_B(sliderThumbs, false)
+ CFG_WRITE_ENTRY_B(handles, true)
CFG_WRITE_ENTRY(highlightTab)
- CFG_WRITE_ENTRY(colorSelTab)
- CFG_WRITE_ENTRY_SHADE(shadeSliders, false, false)
- CFG_WRITE_ENTRY_SHADE(shadeMenubars, true, false)
- CFG_WRITE_ENTRY_SHADE(shadeCheckRadio, false, true)
- CFG_WRITE_ENTRY_FORCE(menubarAppearance)
- CFG_WRITE_ENTRY_FORCE(menuitemAppearance)
- CFG_WRITE_ENTRY_FORCE(toolbarAppearance)
- CFG_WRITE_ENTRY_B(toolbarSeparators, true)
- CFG_WRITE_ENTRY_B(splitters, false)
+ CFG_WRITE_ENTRY_NUM(colorSelTab)
+ CFG_WRITE_ENTRY(roundAllTabs)
+ CFG_WRITE_ENTRY(tabMouseOver)
+ CFG_WRITE_APPEARANCE_ENTRY(menubarAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(menuitemAppearance, APP_ALLOW_FADE)
+ CFG_WRITE_APPEARANCE_ENTRY(toolbarAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(selectionAppearance, APP_ALLOW_BASIC)
+#ifdef __cplusplus
+ CFG_WRITE_APPEARANCE_ENTRY(dwtAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_ENTRY(titlebarEffect)
+#endif
+ CFG_WRITE_APPEARANCE_ENTRY(menuStripeAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_ENTRY_B(toolbarSeparators, false)
+ CFG_WRITE_ENTRY_B(splitters, true)
CFG_WRITE_ENTRY(customMenuTextColor)
CFG_WRITE_ENTRY(coloredMouseOver)
CFG_WRITE_ENTRY(menubarMouseOver)
+ CFG_WRITE_ENTRY(useHighlightForMenu)
CFG_WRITE_ENTRY(shadeMenubarOnlyWhenActive)
CFG_WRITE_ENTRY(thinnerMenuItems)
- CFG_WRITE_ENTRY(customSlidersColor)
- CFG_WRITE_ENTRY(customMenubarsColor)
+ CFG_WRITE_ENTRY(thinnerBtns)
+ CFG_WRITE_SHADE_ENTRY(shadeSliders, customSlidersColor)
+ CFG_WRITE_SHADE_ENTRY(shadeMenubars, customMenubarsColor)
+ CFG_WRITE_SHADE_ENTRY(sortedLv, customSortedLvColor)
CFG_WRITE_ENTRY(customMenuSelTextColor)
CFG_WRITE_ENTRY(customMenuNormTextColor)
- CFG_WRITE_ENTRY(customCheckRadioColor)
+ CFG_WRITE_SHADE_ENTRY(shadeCheckRadio, customCheckRadioColor)
CFG_WRITE_ENTRY(scrollbarType)
CFG_WRITE_ENTRY(buttonEffect)
- CFG_WRITE_ENTRY_FORCE(lvAppearance)
- CFG_WRITE_ENTRY_FORCE(tabAppearance)
- CFG_WRITE_ENTRY_FORCE(sliderAppearance)
- CFG_WRITE_ENTRY_FORCE(progressAppearance)
-#ifndef QTC_PLAIN_FOCUS_ONLY
- CFG_WRITE_ENTRY(stdFocus)
-#endif
+ CFG_WRITE_APPEARANCE_ENTRY(lvAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(tabAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(activeTabAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(sliderAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(progressAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(progressGrooveAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(grooveAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(sunkenAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(sbarBgndAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_APPEARANCE_ENTRY(tooltipAppearance, APP_ALLOW_BASIC)
+ CFG_WRITE_ENTRY(sliderFill)
+ CFG_WRITE_ENTRY(progressGrooveColor)
+ CFG_WRITE_ENTRY(focus)
+ CFG_WRITE_ENTRY(lvButton)
CFG_WRITE_ENTRY(lvLines)
CFG_WRITE_ENTRY(drawStatusBarFrames)
CFG_WRITE_ENTRY(fillSlider)
CFG_WRITE_ENTRY(roundMbTopOnly)
CFG_WRITE_ENTRY(borderMenuitems)
- CFG_WRITE_ENTRY(gradientPbGroove)
CFG_WRITE_ENTRY(darkerBorders)
CFG_WRITE_ENTRY(vArrows)
CFG_WRITE_ENTRY(xCheck)
- CFG_WRITE_ENTRY(framelessGroupBoxes)
- CFG_WRITE_ENTRY(inactiveHighlight)
-#ifdef __cplusplus
- CFG_WRITE_ENTRY(stdSidebarButtons)
+ CFG_WRITE_ENTRY(groupBox)
+ CFG_WRITE_ENTRY_NUM(gbLabel)
+ CFG_WRITE_ENTRY(fadeLines)
+ CFG_WRITE_ENTRY(glowProgress)
+ CFG_WRITE_IMAGE_ENTRY(bgndImage)
+ CFG_WRITE_IMAGE_ENTRY(menuBgndImage)
+ CFG_WRITE_ENTRY(colorMenubarMouseOver)
+ CFG_WRITE_ENTRY_NUM(crHighlight)
+ CFG_WRITE_ENTRY(crButton)
+ CFG_WRITE_SHADE_ENTRY(crColor, customCrBgndColor)
+ CFG_WRITE_SHADE_ENTRY(progressColor, customProgressColor)
+ CFG_WRITE_ENTRY(smallRadio)
+ CFG_WRITE_ENTRY(fillProgress)
+ CFG_WRITE_ENTRY(comboSplitter)
+ CFG_WRITE_ENTRY(highlightScrollViews)
+ CFG_WRITE_ENTRY(etchEntry)
+ CFG_WRITE_ENTRY_NUM(splitterHighlight)
+ CFG_WRITE_ENTRY_NUM(expanderHighlight)
+ CFG_WRITE_ENTRY_NUM(crSize)
+ CFG_WRITE_ENTRY(flatSbarButtons)
+ CFG_WRITE_ENTRY(borderSbarGroove)
+ CFG_WRITE_ENTRY(borderProgress)
+ CFG_WRITE_ENTRY(popupBorder)
+ CFG_WRITE_ENTRY(unifySpinBtns)
+ CFG_WRITE_ENTRY(unifySpin)
+ CFG_WRITE_ENTRY(unifyCombo)
+ CFG_WRITE_ENTRY(borderTab)
+ CFG_WRITE_ENTRY(borderInactiveTab)
+ CFG_WRITE_ENTRY(thinSbarGroove)
+ CFG_WRITE_ENTRY(colorSliderMouseOver)
+ CFG_WRITE_ENTRY(menuIcons)
+ CFG_WRITE_ENTRY(forceAlternateLvCols)
+ CFG_WRITE_ENTRY_NUM(square)
+ CFG_WRITE_ENTRY(invertBotTab)
+ CFG_WRITE_ENTRY_NUM(menubarHiding)
+ CFG_WRITE_ENTRY_NUM(statusbarHiding)
+ CFG_WRITE_ENTRY(boldProgress)
+ CFG_WRITE_ENTRY(coloredTbarMo)
+ CFG_WRITE_ENTRY(borderSelection)
+ CFG_WRITE_ENTRY(stripedSbar)
+ CFG_WRITE_ENTRY_NUM(windowDrag)
+ CFG_WRITE_ENTRY(shadePopupMenu)
+ CFG_WRITE_ENTRY_NUM(windowBorder)
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ CFG_WRITE_ENTRY(xbar)
+ CFG_WRITE_ENTRY_NUM(dwtSettings)
#endif
-
+ CFG_WRITE_ENTRY_NUM(bgndOpacity)
+ CFG_WRITE_ENTRY_NUM(menuBgndOpacity)
+ CFG_WRITE_ENTRY_NUM(dlgOpacity)
+#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+ CFG_WRITE_ENTRY(stdBtnSizes)
+ CFG_WRITE_ENTRY_NUM(titlebarButtons)
+ CFG_WRITE_ENTRY(titlebarIcon)
+
+ if((opts.titlebarButtons&TITLEBAR_BUTTON_COLOR || opts.titlebarButtons&TITLEBAR_BUTTON_ICON_COLOR) &&
+ opts.titlebarButtonColors.size() && 0==(opts.titlebarButtonColors.size()%NUM_TITLEBAR_BUTTONS))
+ {
+ QString val;
+#if QT_VERSION >= 0x040000
+ QTextStream str(&val);
+#else
+ QTextStream str(&val, IO_WriteOnly);
+#endif
+ for(unsigned int i=0; i<opts.titlebarButtonColors.size(); ++i)
+ {
+ TBCols::const_iterator c(opts.titlebarButtonColors.find((ETitleBarButtons)i));
+
+ if(c!=opts.titlebarButtonColors.end())
+ {
+ if(i)
+ str << ',';
+ str << toStr((*c).second);
+ }
+ }
+ CFG.writeEntry("titlebarButtonColors", val);
+ }
+ else
+ CFG.deleteEntry("titlebarButtonColors");
+#endif
+ CFG_WRITE_SHADE_ENTRY(menuStripe, customMenuStripeColor)
+ CFG_WRITE_SHADE_ENTRY(comboBtn, customComboBtnColor)
+ CFG_WRITE_ENTRY(stdSidebarButtons)
+ CFG_WRITE_ENTRY(toolbarTabs)
+ CFG_WRITE_APPEARANCE_ENTRY(titlebarAppearance, APP_ALLOW_NONE)
+ CFG_WRITE_APPEARANCE_ENTRY(inactiveTitlebarAppearance, APP_ALLOW_NONE)
+ CFG_WRITE_APPEARANCE_ENTRY(titlebarButtonAppearance, APP_ALLOW_BASIC)
CFG_WRITE_ENTRY(gtkScrollViews)
CFG_WRITE_ENTRY(gtkComboMenus)
+ CFG_WRITE_ENTRY(doubleGtkComboArrow)
CFG_WRITE_ENTRY(gtkButtonOrder)
+#if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
+ CFG_WRITE_ENTRY(reorderGtkButtons)
+#endif
CFG_WRITE_ENTRY(mapKdeIcons)
CFG_WRITE_ENTRY(shading)
+ CFG_WRITE_ENTRY(titlebarAlignment)
+ CFG_WRITE_ENTRY(centerTabText)
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+ CFG_WRITE_STRING_LIST_ENTRY(noBgndGradientApps)
+ CFG_WRITE_STRING_LIST_ENTRY(noBgndOpacityApps)
+ CFG_WRITE_STRING_LIST_ENTRY(noMenuBgndOpacityApps)
+ CFG_WRITE_STRING_LIST_ENTRY(noBgndImageApps)
+ CFG_WRITE_STRING_LIST_ENTRY(noMenuStripeApps)
+ CFG_WRITE_STRING_LIST_ENTRY(menubarApps)
+ CFG_WRITE_STRING_LIST_ENTRY(statusbarApps)
+ CFG_WRITE_STRING_LIST_ENTRY(useQtFileDialogApps)
+#endif
+
+ for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
+ {
+ GradientCont::const_iterator cg(opts.customGradient.find((EAppearance)i));
+ QString gradKey;
+
+ gradKey.sprintf("customgradient%d", (i-APPEARANCE_CUSTOM1)+1);
+
+ if(cg==opts.customGradient.end())
+ CFG.deleteEntry(gradKey);
+ else
+ {
+ GradientCont::const_iterator d;
+
+ if(exportingStyle || (d=def.customGradient.find((EAppearance)i))==def.customGradient.end() || !((*d)==(*cg)))
+ {
+ QString gradVal;
+#if QT_VERSION >= 0x040000
+ QTextStream str(&gradVal);
+#else
+ QTextStream str(&gradVal, IO_WriteOnly);
+#endif
+ GradientStopCont stops((*cg).second.stops.fix());
+ GradientStopCont::const_iterator it(stops.begin()),
+ end(stops.end());
+ bool haveAlpha(false);
+
+ for(; it!=end && !haveAlpha; ++it)
+ if((*it).alpha<1.0)
+ haveAlpha=true;
+
+ str << toStr((*cg).second.border);
+ if(haveAlpha)
+ str << "-alpha";
+
+ for(it=stops.begin(); it!=end; ++it)
+ if(haveAlpha)
+ str << ',' << (*it).pos << ',' << (*it).val << ',' << (*it).alpha;
+ else
+ str << ',' << (*it).pos << ',' << (*it).val;
+ CFG.writeEntry(gradKey, gradVal);
+ }
+ else
+ CFG.deleteEntry(gradKey);
+ }
+ }
+
+ if(opts.customShades[0]==0 ||
+ exportingStyle ||
+ opts.customShades[0]!=def.customShades[0] ||
+ opts.customShades[1]!=def.customShades[1] ||
+ opts.customShades[2]!=def.customShades[2] ||
+ opts.customShades[3]!=def.customShades[3] ||
+ opts.customShades[4]!=def.customShades[4] ||
+ opts.customShades[5]!=def.customShades[5])
+ {
+ QString shadeVal;
+#if QT_VERSION >= 0x040000
+ QTextStream str(&shadeVal);
+#else
+ QTextStream str(&shadeVal, IO_WriteOnly);
+#endif
+ if(0==opts.customShades[0])
+ str << 0;
+ else
+ for(int i=0; i<NUM_STD_SHADES; ++i)
+ if(0==i)
+ str << opts.customShades[i];
+ else
+ str << ',' << opts.customShades[i];
+ CFG.writeEntry("customShades", shadeVal);
+ }
+ else
+ CFG.deleteEntry("customShades");
+
+ // Removed from 1.5 onwards...
+ CFG.deleteEntry("colorTitlebarOnly");
+ CFG.deleteEntry("titlebarBorder");
+ CFG.deleteEntry("titlebarBlend");
+ // Removed from 1.4 onwards..
+ CFG.deleteEntry("squareLvSelection");
+ CFG.deleteEntry("squareScrollViews");
+ CFG.deleteEntry("squareProgress");
+ CFG.deleteEntry("squareEntry");
+
cfg->sync();
return true;
}
diff --git a/common/dot.png b/common/dot.png
new file mode 100644
index 0000000..c1ba664
--- /dev/null
+++ b/common/dot.png
Binary files differ
diff --git a/common/radio_inner.png b/common/radio_inner.png
new file mode 100644
index 0000000..94201cd
--- /dev/null
+++ b/common/radio_inner.png
Binary files differ
diff --git a/common/radio_on.png b/common/radio_on.png
index 22236ac..7584dbf 100644
--- a/common/radio_on.png
+++ b/common/radio_on.png
Binary files differ
diff --git a/common/radio_on_small.png b/common/radio_on_small.png
new file mode 100644
index 0000000..72dc158
--- /dev/null
+++ b/common/radio_on_small.png
Binary files differ
diff --git a/config.h.cmake b/config.h.cmake
index 0ecd358..05fb811 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -4,4 +4,10 @@
#define VERSION "@QTCURVE_VERSION_FULL@"
#define KDE3PREFIX "@KDE3PREFIX@"
#define KDE4PREFIX "@KDE4PREFIX@"
+
+#cmakedefine QTC_QT_ONLY
+#cmakedefine QTC_DEFAULT_TO_KDE3
+#cmakedefine QTC_STYLE_SUPPORT
+#cmakedefine QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+
#endif
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index b9b391f..3c02ea9 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -1,7 +1,12 @@
-set(kstyle_qtcurve_config_PART_SRCS qtcurveconfig.cpp exportthemedialog.cpp)
+if (QTC_STYLE_SUPPORT)
+ set(kstyle_qtcurve_config_PART_SRCS qtcurveconfig.cpp exportthemedialog.cpp)
+else (QTC_STYLE_SUPPORT)
+ set(kstyle_qtcurve_config_PART_SRCS qtcurveconfig.cpp)
+endif (QTC_STYLE_SUPPORT)
+
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/common ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR})
kde3_add_ui_files(kstyle_qtcurve_config_PART_SRCS qtcurveconfigbase.ui)
kde3_add_kpart(kstyle_qtcurve_config ${kstyle_qtcurve_config_PART_SRCS})
kde3_automoc(${kstyle_qtcurve_config_PART_SRCS})
-target_link_libraries(kstyle_qtcurve_config ${KDE3_KDEUI_LIBS} ${KDE3_KIO_LIBS} ${KDE3_KDECORE_LIBS} ${QT_QTGUI_LIBRARY})
+target_link_libraries(kstyle_qtcurve_config ${QT_AND_KDECORE_LIBS} kio kdeui)
install(TARGETS kstyle_qtcurve_config DESTINATION ${KDE3_LIB_DIR}/kde3)
diff --git a/config/exportthemedialog.cpp b/config/exportthemedialog.cpp
index 4d1eaf1..a677cb8 100644
--- a/config/exportthemedialog.cpp
+++ b/config/exportthemedialog.cpp
@@ -1,5 +1,5 @@
/*
- QtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
+ QtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -64,7 +64,7 @@ void CExportThemeDialog::slotOk()
KMessageBox::error(this, i18n("Name is empty!"));
else
{
- QString fileName(themeUrl->url()+"/"QTC_THEME_PREFIX+name+".themerc");
+ QString fileName(themeUrl->url()+"/"THEME_PREFIX+name+".themerc");
KConfig cfg(fileName, false, false);
bool rv(!cfg.isReadOnly());
@@ -75,7 +75,7 @@ void CExportThemeDialog::slotOk()
cfg.writeEntry("Name", themeName->text().stripWhiteSpace());
cfg.writeEntry("Comment", themeComment->text());
cfg.setGroup("KDE");
- cfg.writeEntry("WidgetStyle", QTC_THEME_PREFIX+name);
+ cfg.writeEntry("WidgetStyle", THEME_PREFIX+name);
rv=writeConfig(&cfg, opts, opts, true);
}
diff --git a/config/exportthemedialog.h b/config/exportthemedialog.h
index 0301b9e..2657dd3 100644
--- a/config/exportthemedialog.h
+++ b/config/exportthemedialog.h
@@ -2,7 +2,7 @@
#define __EXPORT_THEME_DIALOG_H__
/*
- QtCurve (C) Craig Drummond, 2007 [email protected]
+ QtCurve (C) Craig Drummond, 2007 - 2010 [email protected]
----
@@ -22,7 +22,7 @@
*/
#include <kdialogbase.h>
-#define QTC_CONFIG_DIALOG
+#define CONFIG_DIALOG
#include "common.h"
class KURLRequester;
diff --git a/config/qtcurveconfig.cpp b/config/qtcurveconfig.cpp
index b9b36a6..b08fa2d 100644
--- a/config/qtcurveconfig.cpp
+++ b/config/qtcurveconfig.cpp
@@ -1,5 +1,5 @@
/*
- QtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
+ QtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -19,7 +19,9 @@
*/
#include "qtcurveconfig.h"
+#ifdef QTC_STYLE_SUPPORT
#include "exportthemedialog.h"
+#endif
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qgroupbox.h>
@@ -30,6 +32,11 @@
#include <qtabwidget.h>
#include <qpopupmenu.h>
#include <qfileinfo.h>
+#include <qlistview.h>
+#include <qpainter.h>
+#include <qregexp.h>
+#include <qsettings.h>
+#include <qwidgetstack.h>
#include <klocale.h>
#include <kcolorbutton.h>
#include <kconfig.h>
@@ -39,23 +46,100 @@
#include <kcharselect.h>
#include <kdialogbase.h>
#include <knuminput.h>
+#include <kguiitem.h>
+#include <kinputdialog.h>
+#include <knuminput.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
#include <unistd.h>
+#include <errno.h>
#include "config.h"
#define CONFIG_READ
#define CONFIG_WRITE
#include "config_file.c"
-#define QTC_EXTENSION ".qtcurve"
+#define EXTENSION ".qtcurve"
extern "C"
{
QWidget * allocate_kstyle_config(QWidget *parent)
{
- KGlobal::locale()->insertCatalogue("kstyle_qtcurve_config");
+ KGlobal::locale()->insertCatalogue("qtcurve");
return new QtCurveConfig(parent);
}
}
+static void drawGradient(const QColor &top, const QColor &bot, bool increase,
+ QPainter *p, QRect const &r, bool horiz)
+{
+ if(r.width()>0 && r.height()>0)
+ {
+ if(top==bot)
+ p->fillRect(r, top);
+ else
+ {
+ int rh(r.height()), rw(r.width()),
+ rTop(top.red()), gTop(top.green()), bTop(top.blue()),
+ rx, ry, rx2, ry2,
+ size(horiz ? rh : rw);
+
+ r.coords(&rx, &ry, &rx2, &ry2);
+
+ register int rl(rTop << 16);
+ register int gl(gTop << 16);
+ register int bl(bTop << 16);
+ register int i;
+
+ int dr(((1<<16) * (bot.red() - rTop)) / size),
+ dg(((1<<16) * (bot.green() - gTop)) / size),
+ db(((1<<16) * (bot.blue() - bTop)) / size);
+
+ if(increase)
+ if(horiz)
+ {
+ for (i=0; i < size; i++)
+ {
+ p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->drawLine(rx, ry+i, rx2, ry+i);
+ rl += dr;
+ gl += dg;
+ bl += db;
+ }
+ }
+ else
+ for(i=0; i < size; i++)
+ {
+ p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->drawLine(rx+i, ry, rx+i, ry2);
+ rl += dr;
+ gl += dg;
+ bl += db;
+ }
+ else
+ if(horiz)
+ {
+ for(i=size-1; i>=0; i--)
+ {
+ p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->drawLine(rx, ry+i, rx2, ry+i);
+ rl += dr;
+ gl += dg;
+ bl += db;
+ }
+ }
+ else
+ for(i=size-1; i>=0; i--)
+ {
+ p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->drawLine(rx+i, ry, rx+i, ry2);
+ rl += dr;
+ gl += dg;
+ bl += db;
+ }
+ }
+ }
+}
+
class CharSelectDialog : public KDialogBase
{
public:
@@ -79,54 +163,268 @@ class CharSelectDialog : public KDialogBase
KCharSelect *itsSelector;
};
+class CStackItem : public QListViewItem
+{
+ public:
+
+ CStackItem(QListView *p, const QString &text, int s)
+ : QListViewItem(p, text),
+ stackId(s)
+ {
+ }
+
+ int compare(QListViewItem *i, int, bool) const
+ {
+ int b=((CStackItem *)i)->stackId;
+
+ return stackId==b
+ ? 0
+ : stackId<b
+ ? -1
+ : 1;
+ }
+
+ int stack() { return stackId; }
+
+ private:
+
+ int stackId;
+};
+
+//
+// QString.toDouble returns ok=true for "xx" ???
+static double toDouble(const QString &str, bool *ok)
+{
+ if(ok)
+ {
+ QString stripped(str.stripWhiteSpace());
+ int size(stripped.length());
+
+ for(int i=0; i<size; ++i)
+ if(!stripped[i].isNumber() && stripped[i]!='.')
+ {
+ *ok=false;
+ return 0.0;
+ }
+ }
+
+ return str.toDouble(ok);
+}
+
+class CGradItem : public QListViewItem
+{
+ public:
+
+ CGradItem(QListView *p, const QString &a, const QString &b)
+ : QListViewItem(p, a, b)
+ {
+ setRenameEnabled(0, true);
+ setRenameEnabled(1, true);
+ }
+
+ virtual ~CGradItem() { }
+
+ void okRename(int col)
+ {
+ QString prevStr(text(col));
+
+ prev=prevStr.toDouble();
+ QListViewItem::okRename(col);
+
+ bool ok(false);
+ double val=toDouble(text(col), &ok)/100.0;
+
+ if(!ok || (0==col && (val<0.0 || val>1.0)) || (1==col && (val<0.0 || val>2.0)))
+ {
+ setText(col, prevStr);
+ startRename(col);
+ }
+ }
+
+ int compare(QListViewItem *i, int col, bool) const
+ {
+ double a(text(col).toDouble()),
+ b(i->text(col).toDouble());
+
+ return equal(a, b)
+ ? 0
+ : a<b
+ ? -1
+ : 1;
+ }
+
+ double prevVal() const { return prev; }
+
+ private:
+
+ double prev;
+};
+
+CGradientPreview::CGradientPreview(QtCurveConfig *c, QWidget *p)
+ : QWidget(p),
+ cfg(c)
+{
+ setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
+}
+
+QSize CGradientPreview::sizeHint() const
+{
+ return QSize(64, 64);
+}
+
+QSize CGradientPreview::minimumSizeHint() const
+{
+ return sizeHint();
+}
+
+void CGradientPreview::paintEvent(QPaintEvent *)
+{
+ QRect r(rect());
+ QPainter p(this);
+
+ if(stops.size())
+ {
+ GradientStopCont st(stops.fix());
+ GradientStopCont::const_iterator it(st.begin()),
+ end(st.end());
+ QColor bot;
+ bool horiz(true);
+ int lastPos(horiz ? r.y() : r.x()),
+ size(horiz ? r.height() : r.width());
+ Options opts;
+
+ opts.shading=cfg->currentShading();
+
+ for(int i=0; it!=end; ++it, ++i)
+ {
+ if(0==i)
+ {
+ lastPos=(int)(((*it).pos*size)+0.5);
+ shade(&opts, color, &bot, (*it).val);
+ }
+ else
+ {
+ QColor top(bot);
+ int pos((int)(((*it).pos*size)+0.5));
+
+ shade(&opts, color, &bot, (*it).val);
+ drawGradient(top, bot, true, &p,
+ horiz
+ ? QRect(r.x(), lastPos, r.width(), pos-lastPos)
+ : QRect(lastPos, r.y(), pos-lastPos, r.height()),
+ horiz);
+ lastPos=pos;
+ }
+ }
+ }
+ else
+ p.fillRect(r, color);
+ p.end();
+}
+
+void CGradientPreview::setGrad(const GradientStopCont &s)
+{
+ stops=s;
+ repaint();
+}
+
+void CGradientPreview::setColor(const QColor &col)
+{
+ if(col!=color)
+ {
+ color=col;
+ repaint();
+ }
+}
+
static int toInt(const QString &str)
{
return str.length()>1 ? str[0].unicode() : 0;
}
-static void insertShadeEntries(QComboBox *combo, bool withDarken, bool checkRadio=false)
+enum ShadeWidget
{
- combo->insertItem(checkRadio ? i18n("Text")
- : withDarken ? i18n("Background")
- : i18n("Button"));
- combo->insertItem(i18n("Custom:"));
+ SW_MENUBAR,
+ SW_SLIDER,
+ SW_CHECK_RADIO,
+ SW_MENU_STRIPE,
+ SW_COMBO,
+ SW_LV_HEADER
+};
- if(checkRadio) // For check/radio, we dont blend, and dont allow darken
- combo->insertItem(i18n("Selected background"));
- else if(withDarken)
+static void insertShadeEntries(QComboBox *combo, ShadeWidget sw)
+{
+ switch(sw)
{
- // For menubars we dont actually blend...
- combo->insertItem(i18n("Selected background"));
- combo->insertItem(i18n("Darken"));
+ case SW_MENUBAR:
+ combo->insertItem(i18n("Background"));
+ break;
+ case SW_COMBO:
+ case SW_SLIDER:
+ combo->insertItem(i18n("Button"));
+ break;
+ case SW_CHECK_RADIO:
+ combo->insertItem(i18n("Text"));
+ break;
+ case SW_LV_HEADER:
+ case SW_MENU_STRIPE:
+ combo->insertItem(i18n("None"));
+ break;
}
- else
+
+ combo->insertItem(i18n("Custom:"));
+ combo->insertItem(i18n("Selected background"));
+ if(SW_CHECK_RADIO!=sw) // For check/radio, we dont blend, and dont allow darken
{
combo->insertItem(i18n("Blended selected background"));
- combo->insertItem(i18n("Selected background"));
+ combo->insertItem(SW_MENU_STRIPE==sw ? i18n("Menu background") : i18n("Darken"));
}
+
+ if(SW_MENUBAR==sw)
+ combo->insertItem(i18n("Titlebar border"));
}
-static void insertAppearanceEntries(QComboBox *combo, bool all=true)
+static void insertAppearanceEntries(QComboBox *combo, bool split=true, bool bev=true, bool fade=false, bool striped=false)
{
+ for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
+ combo->insertItem(i18n("Custom gradient %1").arg((i-APPEARANCE_CUSTOM1)+1));
+
combo->insertItem(i18n("Flat"));
combo->insertItem(i18n("Raised"));
combo->insertItem(i18n("Dull glass"));
combo->insertItem(i18n("Shiny glass"));
- combo->insertItem(i18n("Gradient"));
+ combo->insertItem(i18n("Agua"));
+ combo->insertItem(i18n("Soft gradient"));
+ combo->insertItem(i18n("Standard gradient"));
+ combo->insertItem(i18n("Harsh gradient"));
combo->insertItem(i18n("Inverted gradient"));
- if(all)
+ combo->insertItem(i18n("Dark inverted gradient"));
+ if(split)
{
combo->insertItem(i18n("Split gradient"));
- combo->insertItem(i18n("Bevelled"));
+ if(bev)
+ {
+ combo->insertItem(i18n("Bevelled"));
+ if(fade)
+ combo->insertItem(i18n("Fade out (popup menuitems)"));
+ else if(striped)
+ combo->insertItem(i18n("Striped"));
+ }
}
}
-static void insertLineEntries(QComboBox *combo, bool none)
+static void insertLineEntries(QComboBox *combo, bool singleDot, bool dashes)
{
+ combo->insertItem(i18n("None"));
combo->insertItem(i18n("Sunken lines"));
combo->insertItem(i18n("Flat lines"));
combo->insertItem(i18n("Dots"));
- combo->insertItem(none ? i18n("None") : i18n("Dashes"));
+ if(singleDot)
+ {
+ combo->insertItem(i18n("Single dot (KDE4 & Gtk2 Only)"));
+ if(dashes)
+ combo->insertItem(i18n("Dashes"));
+ }
}
static void insertDefBtnEntries(QComboBox *combo)
@@ -134,15 +432,19 @@ static void insertDefBtnEntries(QComboBox *combo)
combo->insertItem(i18n("Corner indicator"));
combo->insertItem(i18n("Font color thin border"));
combo->insertItem(i18n("Selected background thick border"));
- combo->insertItem(i18n("None"));
+ combo->insertItem(i18n("Selected background tinting"));
+ combo->insertItem(i18n("A slight glow"));
+ combo->insertItem(i18n("Darken"));
+ combo->insertItem(i18n("Use selected background color"));
+ combo->insertItem(i18n("No indicator"));
}
static void insertScrollbarEntries(QComboBox *combo)
{
combo->insertItem(i18n("KDE"));
- combo->insertItem(i18n("Windows"));
+ combo->insertItem(i18n("MS Windows"));
combo->insertItem(i18n("Platinum"));
- combo->insertItem(i18n("Next"));
+ combo->insertItem(i18n("NeXT"));
combo->insertItem(i18n("No buttons"));
}
@@ -151,13 +453,17 @@ static void insertRoundEntries(QComboBox *combo)
combo->insertItem(i18n("Square"));
combo->insertItem(i18n("Slightly rounded"));
combo->insertItem(i18n("Fully rounded"));
+ combo->insertItem(i18n("Extra rounded (KDE4 & Gtk2)"));
+ combo->insertItem(i18n("Max rounded (KDE4 & Gtk2)"));
}
static void insertMouseOverEntries(QComboBox *combo)
{
combo->insertItem(i18n("No coloration"));
combo->insertItem(i18n("Color border"));
+ combo->insertItem(i18n("Thick color border"));
combo->insertItem(i18n("Plastik style"));
+ combo->insertItem(i18n("Glow"));
}
static void insertToolbarBorderEntries(QComboBox *combo)
@@ -181,42 +487,120 @@ static void insertShadingEntries(QComboBox *combo)
combo->insertItem(i18n("Simple"));
combo->insertItem(i18n("Use HSL color space"));
combo->insertItem(i18n("Use HSV color space"));
+ combo->insertItem(i18n("Use HCY color space"));
}
static void insertStripeEntries(QComboBox *combo)
{
combo->insertItem(i18n("Plain"));
- combo->insertItem(i18n("Striped"));
+ combo->insertItem(i18n("Stripes"));
combo->insertItem(i18n("Diagonal stripes"));
+ combo->insertItem(i18n("Faded stripes"));
}
static void insertSliderStyleEntries(QComboBox *combo)
{
combo->insertItem(i18n("Plain"));
combo->insertItem(i18n("Round"));
+ combo->insertItem(i18n("Plain - rotated"));
+ combo->insertItem(i18n("Round - rotated"));
combo->insertItem(i18n("Triangular"));
+ combo->insertItem(i18n("Circular"));
+}
+
+static void insertEColorEntries(QComboBox *combo)
+{
+ combo->insertItem(i18n("Base color"));
+ combo->insertItem(i18n("Background color"));
+ combo->insertItem(i18n("Darkened background color"));
+}
+
+static void insertFocusEntries(QComboBox *combo)
+{
+ combo->insertItem(i18n("Standard (dotted)"));
+ combo->insertItem(i18n("Highlight color"));
+ combo->insertItem(i18n("Highlight color (full size)"));
+ combo->insertItem(i18n("Highlight color, full, and fill (Gtk2 & KDE4 only)"));
+ combo->insertItem(i18n("Line drawn with highlight color"));
+}
+
+static void insertGradBorderEntries(QComboBox *combo)
+{
+ combo->insertItem(i18n("No border"));
+ combo->insertItem(i18n("Light border"));
+ combo->insertItem(i18n("3D border (light only)"));
+ combo->insertItem(i18n("3D border (dark and light)"));
+ combo->insertItem(i18n("Shine"));
+}
+
+static void insertAlignEntries(QComboBox *combo)
+{
+ combo->insertItem(i18n("Left"));
+ combo->insertItem(i18n("Center (between controls)"));
+ combo->insertItem(i18n("Center (full width)"));
+ combo->insertItem(i18n("Right"));
+}
+
+static void insertTabMoEntriess(QComboBox *combo)
+{
+ combo->insertItem(i18n("Highlight on top"));
+ combo->insertItem(i18n("Highlight on bottom"));
+ combo->insertItem(i18n("Add a slight glow"));
+}
+
+static void insertGradTypeEntries(QComboBox *combo)
+{
+ combo->insertItem(i18n("Top to bottom"));
+ combo->insertItem(i18n("Left to right"));
+}
+
+static void insertLvLinesEntries(QComboBox *combo)
+{
+ combo->insertItem(i18n("None"));
+ combo->insertItem(i18n("New style (KDE and Gtk2 similar)"));
+ combo->insertItem(i18n("Old style (KDE and Gtk2 different)"));
}
QtCurveConfig::QtCurveConfig(QWidget *parent)
: QtCurveConfigBase(parent),
- exportDialog(NULL)
+#ifdef QTC_STYLE_SUPPORT
+ exportDialog(NULL),
+#endif
+ gradPreview(NULL),
+ lastCategory(NULL)
{
- titleLabel->setText("QtCurve " VERSION " - (C) Craig Drummond, 2003-2007");
- insertShadeEntries(shadeSliders, false);
- insertShadeEntries(shadeMenubars, true);
- insertShadeEntries(shadeCheckRadio, false, true);
+ titleLabel->setText("QtCurve " VERSION " - (C) Craig Drummond, 2003-2009");
+ insertShadeEntries(shadeSliders, SW_SLIDER);
+ insertShadeEntries(shadeMenubars, SW_MENUBAR);
+ insertShadeEntries(shadeCheckRadio, SW_CHECK_RADIO);
+ insertShadeEntries(menuStripe, SW_MENU_STRIPE);
+ insertShadeEntries(comboBtn, SW_COMBO);
+ insertShadeEntries(sortedLv, SW_LV_HEADER);
insertAppearanceEntries(appearance);
insertAppearanceEntries(menubarAppearance);
insertAppearanceEntries(toolbarAppearance);
insertAppearanceEntries(lvAppearance);
insertAppearanceEntries(sliderAppearance);
- insertAppearanceEntries(tabAppearance, false);
+ insertAppearanceEntries(tabAppearance, false, false);
+ insertAppearanceEntries(activeTabAppearance, false, false);
insertAppearanceEntries(progressAppearance);
- insertAppearanceEntries(menuitemAppearance);
- insertLineEntries(handles, false);
- insertLineEntries(sliderThumbs, true);
- insertLineEntries(toolbarSeparators, true);
- insertLineEntries(splitters, false);
+ insertAppearanceEntries(progressGrooveAppearance);
+ insertAppearanceEntries(grooveAppearance);
+ insertAppearanceEntries(sunkenAppearance);
+ insertAppearanceEntries(menuitemAppearance, true, true, true);
+ insertAppearanceEntries(titlebarAppearance, true, false);
+ insertAppearanceEntries(inactiveTitlebarAppearance, true, false);
+ insertAppearanceEntries(titlebarButtonAppearance);
+ insertAppearanceEntries(selectionAppearance, true, false);
+ insertAppearanceEntries(menuStripeAppearance, true, false);
+ insertAppearanceEntries(sbarBgndAppearance);
+ insertAppearanceEntries(sliderFill);
+ insertAppearanceEntries(menuBgndAppearance, true, true, false, true);
+ insertAppearanceEntries(dwtAppearance);
+ insertLineEntries(handles, true, true);
+ insertLineEntries(sliderThumbs, true, false);
+ insertLineEntries(toolbarSeparators, false, false);
+ insertLineEntries(splitters, true, true);
insertDefBtnEntries(defBtnIndicator);
insertScrollbarEntries(scrollbarType);
insertRoundEntries(round);
@@ -226,58 +610,118 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
insertShadingEntries(shading);
insertStripeEntries(stripedProgress);
insertSliderStyleEntries(sliderStyle);
-
- highlightFactor->setMinValue(MIN_HIGHLIGHT_FACTOR);
- highlightFactor->setMaxValue(MAX_HIGHLIGHT_FACTOR);
- highlightFactor->setValue(((int)(DEFAULT_HIGHLIGHT_FACTOR*100))-100);
-
- connect(lighterPopupMenuBgnd, SIGNAL(toggled(bool)), SLOT(updateChanged()));
- connect(round, SIGNAL(activated(int)), SLOT(updateChanged()));
+ insertEColorEntries(progressGrooveColor);
+ insertFocusEntries(focus);
+ insertGradBorderEntries(gradBorder);
+ insertAlignEntries(titlebarAlignment);
+ insertTabMoEntriess(tabMouseOver);
+ insertGradTypeEntries(menuBgndGrad);
+ insertLvLinesEntries(lvLines);
+
+ highlightFactor->setRange(MIN_HIGHLIGHT_FACTOR, MAX_HIGHLIGHT_FACTOR);
+ highlightFactor->setValue(DEFAULT_HIGHLIGHT_FACTOR);
+
+ crHighlight->setRange(MIN_HIGHLIGHT_FACTOR, MAX_HIGHLIGHT_FACTOR);
+ crHighlight->setValue(DEFAULT_CR_HIGHLIGHT_FACTOR);
+
+ splitterHighlight->setRange(MIN_HIGHLIGHT_FACTOR, MAX_HIGHLIGHT_FACTOR);
+ splitterHighlight->setValue(DEFAULT_SPLITTER_HIGHLIGHT_FACTOR);
+
+ lighterPopupMenuBgnd->setRange(MIN_LIGHTER_POPUP_MENU, MAX_LIGHTER_POPUP_MENU, 1, false);
+ lighterPopupMenuBgnd->setValue(DEF_POPUPMENU_LIGHT_FACTOR);
+
+ menuDelay->setRange(MIN_MENU_DELAY, MAX_MENU_DELAY, 1, false);
+ menuDelay->setValue(DEFAULT_MENU_DELAY);
+
+ sliderWidth->setRange(MIN_SLIDER_WIDTH, MAX_SLIDER_WIDTH, 2, false);
+ sliderWidth->setValue(DEFAULT_SLIDER_WIDTH);
+ sliderWidth->setSuffix(i18n(" pixels"));
+
+ tabBgnd->setRange(MIN_TAB_BGND, MAX_TAB_BGND, 1, false);
+ tabBgnd->setValue(DEF_TAB_BGND);
+
+ colorSelTab->setRange(MIN_COLOR_SEL_TAB_FACTOR, MAX_COLOR_SEL_TAB_FACTOR, 5, false);
+ colorSelTab->setValue(DEF_COLOR_SEL_TAB_FACTOR);
+
+ connect(lighterPopupMenuBgnd, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
+ connect(tabBgnd, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
+ connect(menuDelay, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
+ connect(sliderWidth, SIGNAL(valueChanged(int)), SLOT(sliderWidthChanged()));
+ connect(menuStripe, SIGNAL(activated(int)), SLOT(menuStripeChanged()));
+ connect(customMenuStripeColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
+ connect(menuStripeAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(menuBgndAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(menuBgndGrad, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(round, SIGNAL(activated(int)), SLOT(roundChanged()));
connect(toolbarBorders, SIGNAL(activated(int)), SLOT(updateChanged()));
- connect(sliderThumbs, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(sliderThumbs, SIGNAL(activated(int)), SLOT(sliderThumbChanged()));
connect(handles, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(appearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(customMenuTextColor, SIGNAL(toggled(bool)), SLOT(customMenuTextColorChanged()));
connect(stripedProgress, SIGNAL(activated(int)), SLOT(stripedProgressChanged()));
connect(animatedProgress, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(embolden, SIGNAL(toggled(bool)), SLOT(emboldenToggled()));
- connect(defBtnIndicator, SIGNAL(activated(int)), SLOT(dbiChanged()));
+ connect(defBtnIndicator, SIGNAL(activated(int)), SLOT(defBtnIndicatorChanged()));
connect(highlightTab, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(menubarAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(toolbarAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(lvAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(sliderAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
- connect(tabAppearance, SIGNAL(activated(int)), SLOT(tabAppearanceChanged()));
+ connect(tabAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(activeTabAppearance, SIGNAL(activated(int)), SLOT(activeTabAppearanceChanged()));
connect(toolbarSeparators, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(splitters, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(fixParentlessDialogs, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(fillSlider, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(sliderStyle, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(roundMbTopOnly, SIGNAL(toggled(bool)), SLOT(updateChanged()));
- connect(gradientPbGroove, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(fillProgress, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(darkerBorders, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(comboSplitter, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(comboBtn, SIGNAL(activated(int)), SLOT(comboBtnChanged()));
+ connect(sortedLv, SIGNAL(activated(int)), SLOT(sortedLvChanged()));
+ connect(customComboBtnColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
+ connect(customSortedLvColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
+ connect(unifySpinBtns, SIGNAL(toggled(bool)), SLOT(unifySpinBtnsToggled()));
+ connect(unifySpin, SIGNAL(toggled(bool)), SLOT(unifySpinToggled()));
+ connect(unifyCombo, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(vArrows, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(xCheck, SIGNAL(toggled(bool)), SLOT(updateChanged()));
- connect(colorSelTab, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(crHighlight, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
+ connect(crButton, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(colorSelTab, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
+ connect(roundAllTabs, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(borderTab, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(borderInactiveTab, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(invertBotTab, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(doubleGtkComboArrow, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(tabMouseOver, SIGNAL(activated(int)), SLOT(tabMoChanged()));
connect(stdSidebarButtons, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(borderMenuitems, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(popupBorder, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(progressAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(progressGrooveAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(grooveAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(sunkenAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(progressGrooveColor, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(menuitemAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(titlebarAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(inactiveTitlebarAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(titlebarButtonAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(colorTitlebarOnly, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(selectionAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(shadeCheckRadio, SIGNAL(activated(int)), SLOT(shadeCheckRadioChanged()));
connect(customCheckRadioColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
-
-#ifdef QTC_PLAIN_FOCUS_ONLY
- delete stdFocus;
-#else
- connect(stdFocus, SIGNAL(toggled(bool)), SLOT(updateChanged()));
-#endif
- connect(lvLines, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(focus, SIGNAL(activated(int)), SLOT(focusChanged()));
+ connect(lvLines, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(lvButton, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(drawStatusBarFrames, SIGNAL(toggled(bool)), SLOT(updateChanged()));
- connect(buttonEffect, SIGNAL(activated(int)), SLOT(updateChanged()));
- connect(coloredMouseOver, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(buttonEffect, SIGNAL(activated(int)), SLOT(buttonEffectChanged()));
+ connect(coloredMouseOver, SIGNAL(activated(int)), SLOT(coloredMouseOverChanged()));
connect(menubarMouseOver, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(shadeMenubarOnlyWhenActive, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(thinnerMenuItems, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(thinnerBtns, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(customSlidersColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
connect(customMenubarsColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
connect(customMenuSelTextColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
@@ -286,19 +730,41 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
connect(shadeMenubars, SIGNAL(activated(int)), SLOT(shadeMenubarsChanged()));
connect(highlightFactor, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
connect(scrollbarType, SIGNAL(activated(int)), SLOT(updateChanged()));
- connect(shading, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(shading, SIGNAL(activated(int)), SLOT(shadingChanged()));
connect(gtkScrollViews, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(squareScrollViews, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(highlightScrollViews, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(etchEntry, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(flatSbarButtons, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(thinSbarGroove, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(colorSliderMouseOver, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(titlebarBorder, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(sbarBgndAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(sliderFill, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(dwtAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
+ connect(crColor, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(smallRadio, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(splitterHighlight, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
connect(gtkComboMenus, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(gtkButtonOrder, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(mapKdeIcons, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(passwordChar, SIGNAL(clicked()), SLOT(passwordCharClicked()));
connect(framelessGroupBoxes, SIGNAL(toggled(bool)), SLOT(updateChanged()));
- connect(inactiveHighlight, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(colorMenubarMouseOver, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(useHighlightForMenu, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(groupBoxLine, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(fadeLines, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(menuIcons, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(stdBtnSizes, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(forceAlternateLvCols, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(squareLvSelection, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+ connect(titlebarAlignment, SIGNAL(activated(int)), SLOT(updateChanged()));
defaultSettings(&defaultStyle);
if(!readConfig(NULL, &currentStyle, &defaultStyle))
currentStyle=defaultStyle;
+ setupShadesTab();
setWidgetOptions(currentStyle);
QPopupMenu *menu=new QPopupMenu(this),
@@ -310,10 +776,15 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
menu->insertSeparator();
menu->insertItem(i18n("Import..."), this, SLOT(importStyle()));
menu->insertItem(i18n("Export..."), this, SLOT(exportStyle()));
+#ifdef QTC_STYLE_SUPPORT
menu->insertSeparator();
menu->insertItem(i18n("Export Theme..."), this, SLOT(exportTheme()));
+#endif
loadStyles(subMenu);
+ setupGradientsTab();
+ setupStack();
+ resize(600, 400);
}
QtCurveConfig::~QtCurveConfig()
@@ -322,7 +793,7 @@ QtCurveConfig::~QtCurveConfig()
void QtCurveConfig::loadStyles(QPopupMenu *menu)
{
- QStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"QTC_EXTENSION, false, true));
+ QStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true));
files.sort();
@@ -332,7 +803,7 @@ void QtCurveConfig::loadStyles(QPopupMenu *menu)
for(; it!=end; ++it)
if(readConfig(*it, &opts, &defaultStyle))
- styles[menu->insertItem(QFileInfo(*it).fileName().remove(QTC_EXTENSION).replace('_', ' '),
+ styles[menu->insertItem(QFileInfo(*it).fileName().remove(EXTENSION).replace('_', ' '),
this, SLOT(setStyle(int)))]=*it;
}
@@ -374,14 +845,42 @@ void QtCurveConfig::setStyle(int s)
void QtCurveConfig::emboldenToggled()
{
if(!embolden->isChecked() && IND_NONE==defBtnIndicator->currentItem())
- defBtnIndicator->setCurrentItem(IND_COLORED);
+ defBtnIndicator->setCurrentItem(IND_TINT);
updateChanged();
}
-void QtCurveConfig::dbiChanged()
+void QtCurveConfig::defBtnIndicatorChanged()
{
if(IND_NONE==defBtnIndicator->currentItem() && !embolden->isChecked())
embolden->setChecked(true);
+ else if(IND_GLOW==defBtnIndicator->currentItem() && EFFECT_NONE==buttonEffect->currentItem())
+ buttonEffect->setCurrentItem(EFFECT_SHADOW);
+
+ if(IND_COLORED==defBtnIndicator->currentItem() && round->currentItem()>ROUND_FULL)
+ round->setCurrentItem(ROUND_FULL);
+
+ updateChanged();
+}
+
+void QtCurveConfig::buttonEffectChanged()
+{
+ if(EFFECT_NONE==buttonEffect->currentItem())
+ {
+ if(IND_GLOW==defBtnIndicator->currentItem())
+ defBtnIndicator->setCurrentItem(IND_TINT);
+ if(MO_GLOW==coloredMouseOver->currentItem())
+ coloredMouseOver->setCurrentItem(MO_PLASTIK);
+ }
+
+ updateChanged();
+}
+
+void QtCurveConfig::coloredMouseOverChanged()
+{
+ if(MO_GLOW==coloredMouseOver->currentItem() &&
+ EFFECT_NONE==buttonEffect->currentItem())
+ buttonEffect->setCurrentItem(EFFECT_SHADOW);
+
updateChanged();
}
@@ -410,29 +909,425 @@ void QtCurveConfig::customMenuTextColorChanged()
updateChanged();
}
+void QtCurveConfig::menuStripeChanged()
+{
+ customMenuStripeColor->setEnabled(SHADE_CUSTOM==menuStripe->currentItem());
+ menuStripeAppearance->setEnabled(SHADE_NONE!=menuStripe->currentItem());
+ updateChanged();
+}
+
+void QtCurveConfig::comboBtnChanged()
+{
+ customComboBtnColor->setEnabled(SHADE_CUSTOM==comboBtn->currentItem());
+ updateChanged();
+}
+
+void QtCurveConfig::sortedLvChanged()
+{
+ customSortedLvColor->setEnabled(SHADE_CUSTOM==sortedLv->currentItem());
+ updateChanged();
+}
+
void QtCurveConfig::stripedProgressChanged()
{
- animatedProgress->setEnabled(STRIPE_NONE!=stripedProgress->currentItem());
- if(animatedProgress->isChecked() && STRIPE_NONE==stripedProgress->currentItem())
+ bool allowAnimation=STRIPE_NONE!=stripedProgress->currentItem() &&
+ STRIPE_FADE!=stripedProgress->currentItem();
+
+ animatedProgress->setEnabled(allowAnimation);
+ if(animatedProgress->isChecked() && !allowAnimation)
animatedProgress->setChecked(false);
updateChanged();
}
-void QtCurveConfig::tabAppearanceChanged()
+void QtCurveConfig::activeTabAppearanceChanged()
{
- if(colorSelTab->isChecked() && APPEARANCE_GRADIENT!=tabAppearance->currentItem())
- colorSelTab->setChecked(false);
- colorSelTab->setEnabled(APPEARANCE_GRADIENT==tabAppearance->currentItem());
+ int current(activeTabAppearance->currentItem());
+ bool disableCol(APPEARANCE_FLAT==current && APPEARANCE_RAISED==current);
+
+ if(colorSelTab->value() && disableCol)
+ colorSelTab->setValue(MIN_COLOR_SEL_TAB_FACTOR);
+ colorSelTab->setEnabled(!disableCol);
updateChanged();
}
+void QtCurveConfig::tabMoChanged()
+{
+ if(TAB_MO_GLOW==tabMouseOver->currentItem())
+ roundAllTabs->setChecked(true);
+ roundAllTabs->setEnabled(TAB_MO_GLOW!=tabMouseOver->currentItem());
+ updateChanged();
+}
+
+void QtCurveConfig::shadingChanged()
+{
+ updateChanged();
+ if(gradPreview)
+ gradPreview->repaint();
+}
+
void QtCurveConfig::passwordCharClicked()
{
int cur(toInt(passwordChar->text()));
CharSelectDialog dlg(this, cur);
if(QDialog::Accepted==dlg.exec() && dlg.currentChar()!=cur)
+ {
setPasswordChar(dlg.currentChar());
+ updateChanged();
+ }
+}
+
+void QtCurveConfig::unifySpinBtnsToggled()
+{
+ if(unifySpinBtns->isChecked())
+ unifySpin->setChecked(false);
+ unifySpin->setDisabled(unifySpinBtns->isChecked());
+ updateChanged();
+}
+
+void QtCurveConfig::unifySpinToggled()
+{
+ if(unifySpin->isChecked())
+ unifySpinBtns->setChecked(false);
+ unifySpinBtns->setDisabled(unifySpin->isChecked());
+ updateChanged();
+}
+
+void QtCurveConfig::sliderThumbChanged()
+{
+ if(LINE_NONE!=sliderThumbs->currentItem() && sliderWidth->value()<DEFAULT_SLIDER_WIDTH)
+ sliderWidth->setValue(DEFAULT_SLIDER_WIDTH);
+ updateChanged();
+}
+
+void QtCurveConfig::sliderWidthChanged()
+{
+ if(0==sliderWidth->value()%2)
+ sliderWidth->setValue(sliderWidth->value()+1);
+
+ if(LINE_NONE!=sliderThumbs->currentItem() && sliderWidth->value()<DEFAULT_SLIDER_WIDTH)
+ sliderThumbs->setCurrentItem(LINE_NONE);
+ updateChanged();
+}
+
+void QtCurveConfig::setupStack()
+{
+ int i=0;
+ lastCategory=new CStackItem(stackList, i18n("General"), i++);
+ new CStackItem(stackList, i18n("Combos"), i++);
+ new CStackItem(stackList, i18n("Spin Buttons"), i++);
+ new CStackItem(stackList, i18n("Splitters"), i++);
+ new CStackItem(stackList, i18n("Sliders and Scrollbars"), i++);
+ new CStackItem(stackList, i18n("Progressbars"), i++);
+ new CStackItem(stackList, i18n("Default Button"),i++);
+ new CStackItem(stackList, i18n("Mouse-over"), i++);
+ new CStackItem(stackList, i18n("Listviews"), i++);
+ new CStackItem(stackList, i18n("Scrollviews"), i++);
+ new CStackItem(stackList, i18n("Tabs"), i++);
+ new CStackItem(stackList, i18n("Checks and Radios"), i++);
+ new CStackItem(stackList, i18n("Windows"), i++);
+ new CStackItem(stackList, i18n("Menus and Toolbars"), i++);
+ new CStackItem(stackList, i18n("Dock windows"), i++);
+ new CStackItem(stackList, i18n("Advanced Settings"), i++);
+ new CStackItem(stackList, i18n("Custom Gradients"), i++);
+ new CStackItem(stackList, i18n("Custom Shades"), i++);
+
+ stackList->setSelected(lastCategory, true);
+ stackList->setCurrentItem(lastCategory);
+ stackList->setResizeMode(QListView::LastColumn);
+ connect(stackList, SIGNAL(selectionChanged()), SLOT(changeStack()));
+}
+
+void QtCurveConfig::changeStack()
+{
+ CStackItem *item=(CStackItem *)(stackList->selectedItem());
+
+ if(item)
+ lastCategory=item;
+ else
+ {
+ item=lastCategory;
+ if(item)
+ {
+ stackList->setSelected(item, true);
+ stackList->setCurrentItem(item);
+ }
+ }
+
+ if(item)
+ stack->raiseWidget(item->stack());
+}
+
+void QtCurveConfig::gradChanged(int i)
+{
+ GradientCont::const_iterator it(customGradient.find((EAppearance)i));
+
+ gradStops->clear();
+
+ if(it!=customGradient.end())
+ {
+ gradPreview->setGrad((*it).second.stops);
+ gradBorder->setCurrentItem((*it).second.border);
+
+ GradientStopCont::const_iterator git((*it).second.stops.begin()),
+ gend((*it).second.stops.end());
+
+ for(; git!=gend; ++git)
+ new CGradItem(gradStops, QString().setNum((*git).pos*100.0),
+ QString().setNum((*git).val*100.0));
+ }
+ else
+ {
+ gradPreview->setGrad(GradientStopCont());
+ gradBorder->setCurrentItem(GB_3D);
+ }
+
+ gradBorder->setEnabled(NUM_CUSTOM_GRAD!=i);
+}
+
+void QtCurveConfig::itemChanged(QListViewItem *i, int col)
+{
+ GradientCont::iterator it=customGradient.find((EAppearance)gradCombo->currentItem());
+
+ if(it!=customGradient.end())
+ {
+ bool ok;
+ double newVal=toDouble(i->text(col), &ok)/100.0;
+
+ if(ok && ((0==col && (newVal>=0.0 && newVal<=1.0)) ||
+ (1==col && newVal>=0.0 && newVal<=2.0)) )
+ {
+ double pos=0==(col ? newVal : i->text(0).toDouble())/100.0,
+ val=1==(col ? newVal : i->text(1).toDouble())/100.0,
+ prev=((CGradItem *)i)->prevVal();
+
+ (*it).second.stops.erase(GradientStop(col ? pos : prev, col ? prev : val));
+ (*it).second.stops.insert(GradientStop(pos, val));
+ gradPreview->setGrad((*it).second.stops);
+ i->setText(col, QString().setNum(val));
+ emit changed(true);
+ }
+ }
+}
+
+void QtCurveConfig::addGradStop()
+{
+ GradientCont::iterator cg=customGradient.find((EAppearance)gradCombo->currentItem());
+
+ if(cg==customGradient.end())
+ {
+ Gradient cust;
+
+ cust.border=(EGradientBorder)gradBorder->currentItem();
+ cust.stops.insert(GradientStop(stopPosition->value()/100.0, stopValue->value()/100.0));
+ customGradient[(EAppearance)gradCombo->currentItem()]=cust;
+ gradChanged(gradCombo->currentItem());
+ emit changed(true);
+ }
+ else
+ {
+ GradientStopCont::const_iterator it((*cg).second.stops.begin()),
+ end((*cg).second.stops.end());
+ double pos(stopPosition->value()/100.0),
+ val(stopValue->value()/100.0);
+
+ for(; it!=end; ++it)
+ if(equal(pos, (*it).pos))
+ if(equal(val, (*it).val))
+ return;
+ else
+ {
+ (*cg).second.stops.erase(it);
+ break;
+ }
+
+ unsigned int b4=(*cg).second.stops.size();
+ (*cg).second.stops.insert(GradientStop(pos, val));
+
+ if((*cg).second.stops.size()!=b4)
+ {
+ gradPreview->setGrad((*cg).second.stops);
+
+ QListViewItem *prev=gradStops->selectedItem();
+
+ if(prev)
+ gradStops->setSelected(prev, false);
+
+ CGradItem *i=new CGradItem(gradStops, QString().setNum(pos*100.0),
+ QString().setNum(val*100.0));
+
+ gradStops->setSelected(i, true);
+ emit changed(true);
+ }
+ }
+}
+
+void QtCurveConfig::removeGradStop()
+{
+ QListViewItem *cur=gradStops->selectedItem();
+
+ if(cur)
+ {
+ QListViewItem *next=cur->itemBelow();
+
+ if(!next)
+ next=cur->itemAbove();
+
+ GradientCont::iterator it=customGradient.find((EAppearance)gradCombo->currentItem());
+
+ if(it!=customGradient.end())
+ {
+ double pos=cur->text(0).toDouble()/100.0,
+ val=cur->text(1).toDouble()/100.0;
+
+ (*it).second.stops.erase(GradientStop(pos, val));
+ gradPreview->setGrad((*it).second.stops);
+ emit changed(true);
+
+ delete cur;
+ if(next)
+ gradStops->setCurrentItem(next);
+ }
+ }
+}
+
+void QtCurveConfig::updateGradStop()
+{
+ QListViewItem *i=gradStops->selectedItem();
+
+ GradientCont::iterator cg=customGradient.find((EAppearance)gradCombo->currentItem());
+
+ if(i)
+ {
+ double curPos=i->text(0).toDouble()/100.0,
+ curVal=i->text(1).toDouble()/100.0,
+ newPos(stopPosition->value()/100.0),
+ newVal(stopValue->value()/100.0);
+
+ if(!equal(newPos, curPos) || !equal(newVal, curVal))
+ {
+ (*cg).second.stops.erase(GradientStop(curPos, curVal));
+ (*cg).second.stops.insert(GradientStop(newPos, newVal));
+
+ i->setText(0, QString().setNum(stopPosition->value()));
+ i->setText(1, QString().setNum(stopValue->value()));
+ gradPreview->setGrad((*cg).second.stops);
+ emit changed(true);
+ }
+ }
+ else
+ addGradStop();
+}
+
+void QtCurveConfig::stopSelected()
+{
+ QListViewItem *i=gradStops->selectedItem();
+
+ removeButton->setEnabled(i);
+ updateButton->setEnabled(i);
+
+ if(i)
+ {
+ stopPosition->setValue(i->text(0).toInt());
+ stopValue->setValue(i->text(1).toInt());
+ }
+ else
+ {
+ stopPosition->setValue(0);
+ stopValue->setValue(0);
+ }
+}
+
+void QtCurveConfig::setupGradientsTab()
+{
+ for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
+ gradCombo->insertItem(i18n("Custom gradient %1").arg((i-APPEARANCE_CUSTOM1)+1));
+
+ gradCombo->setCurrentItem(APPEARANCE_CUSTOM1);
+
+ gradPreview=new CGradientPreview(this, previewWidgetContainer);
+ QVBoxLayout *layout=new QVBoxLayout(previewWidgetContainer);
+ layout->addWidget(gradPreview);
+ layout->setMargin(0);
+ layout->setSpacing(0);
+ QColor col(palette().color(QPalette::Active, QColorGroup::Button));
+ previewColor->setColor(col);
+ gradPreview->setColor(col);
+ gradChanged(APPEARANCE_CUSTOM1);
+ addButton->setGuiItem(KGuiItem(i18n("Add"), "add"));
+ removeButton->setGuiItem(KGuiItem(i18n("Remove"), "remove"));
+ updateButton->setGuiItem(KGuiItem(i18n("Update"), "button_ok"));
+
+ gradStops->setDefaultRenameAction(QListView::Reject);
+ gradStops->setAllColumnsShowFocus(true);
+ gradStops->setSortColumn(0);
+ stopPosition->setRange(0, 100, 5);
+ stopValue->setRange(0, 200, 5);
+ removeButton->setEnabled(false);
+ updateButton->setEnabled(false);
+ gradStops->setResizeMode(QListView::AllColumns);
+ connect(gradCombo, SIGNAL(activated(int)), SLOT(gradChanged(int)));
+ connect(previewColor, SIGNAL(changed(const QColor &)), gradPreview, SLOT(setColor(const QColor &)));
+ connect(gradStops, SIGNAL(itemRenamed(QListViewItem *, int)), SLOT(itemChanged(QListViewItem *, int)));
+ connect(addButton, SIGNAL(clicked()), SLOT(addGradStop()));
+ connect(removeButton, SIGNAL(clicked()), SLOT(removeGradStop()));
+ connect(updateButton, SIGNAL(clicked()), SLOT(updateGradStop()));
+ connect(gradStops, SIGNAL(selectionChanged()), SLOT(stopSelected()));
+}
+
+void QtCurveConfig::setupShadesTab()
+{
+ int shade(0);
+
+ setupShade(shade0, shade++);
+ setupShade(shade1, shade++);
+ setupShade(shade2, shade++);
+ setupShade(shade3, shade++);
+ setupShade(shade4, shade++);
+ setupShade(shade5, shade++);
+ connect(customShading, SIGNAL(toggled(bool)), SLOT(updateChanged()));
+}
+
+void QtCurveConfig::setupShade(KDoubleNumInput *w, int shade)
+{
+ w->setRange(0.0, 2.0, 0.05, false);
+ connect(w, SIGNAL(valueChanged(double)), SLOT(updateChanged()));
+ shadeVals[shade]=w;
+}
+
+void QtCurveConfig::populateShades(const Options &opts)
+{
+ SHADES
+ int contrast=QSettings().readNumEntry("/Qt/KDE/contrast", 7);
+
+ if(contrast<0 || contrast>10)
+ contrast=7;
+
+ customShading->setChecked(USE_CUSTOM_SHADES(opts));
+
+ for(int i=0; i<NUM_STD_SHADES; ++i)
+ shadeVals[i]->setValue(USE_CUSTOM_SHADES(opts)
+ ? opts.customShades[i]
+ : shades[SHADING_SIMPLE==shading->currentItem()
+ ? 1 : 0]
+ [contrast]
+ [i]);
+}
+
+bool QtCurveConfig::diffShades(const Options &opts)
+{
+ if( (!USE_CUSTOM_SHADES(opts) && customShading->isChecked()) ||
+ (USE_CUSTOM_SHADES(opts) && !customShading->isChecked()) )
+ return true;
+
+ if(customShading->isChecked())
+ {
+ for(int i=0; i<NUM_STD_SHADES; ++i)
+ if(!equal(shadeVals[i]->value(), opts.customShades[i]))
+ return true;
+ }
+
+ return false;
}
void QtCurveConfig::setPasswordChar(int ch)
@@ -451,11 +1346,28 @@ void QtCurveConfig::updateChanged()
emit changed(true);
}
+void QtCurveConfig::focusChanged()
+{
+ if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem())
+ round->setCurrentItem(ROUND_EXTRA);
+ updateChanged();
+}
+
+void QtCurveConfig::roundChanged()
+{
+ if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem())
+ focus->setCurrentItem(FOCUS_LINE);
+
+ if(round->currentItem()>ROUND_FULL && IND_COLORED==defBtnIndicator->currentItem())
+ defBtnIndicator->setCurrentItem(IND_TINT);
+ updateChanged();
+}
+
void QtCurveConfig::importStyle()
{
QString file(KFileDialog::getOpenFileName(QString::null,
- i18n("*"QTC_EXTENSION"|QtCurve Settings Files\n"
- QTC_THEME_PREFIX"*"QTC_THEME_SUFFIX"|QtCurve KDE Theme Files"),
+ i18n("*"EXTENSION"|QtCurve Settings Files\n"
+ THEME_PREFIX"*"THEME_SUFFIX"|QtCurve KDE Theme Files"),
this));
if(!file.isEmpty())
@@ -464,7 +1376,7 @@ void QtCurveConfig::importStyle()
void QtCurveConfig::exportStyle()
{
- QString file(KFileDialog::getSaveFileName(QString::null, i18n("*"QTC_EXTENSION"|QtCurve Settings Files"), this));
+ QString file(KFileDialog::getSaveFileName(QString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this));
if(!file.isEmpty())
{
@@ -486,6 +1398,7 @@ void QtCurveConfig::exportStyle()
void QtCurveConfig::exportTheme()
{
+#ifdef QTC_STYLE_SUPPORT
if(!exportDialog)
exportDialog=new CExportThemeDialog(this);
@@ -493,6 +1406,7 @@ void QtCurveConfig::exportTheme()
setOptions(opts);
exportDialog->run(opts);
+#endif
}
void QtCurveConfig::loadStyle(const QString &file)
@@ -512,20 +1426,28 @@ void QtCurveConfig::setOptions(Options &opts)
opts.round=(ERound)round->currentItem();
opts.toolbarBorders=(ETBarBorder)toolbarBorders->currentItem();
opts.appearance=(EAppearance)appearance->currentItem();
-#ifndef QTC_PLAIN_FOCUS_ONLY
- opts.stdFocus=stdFocus->isChecked();
-#endif
- opts.lvLines=lvLines->isChecked();
+ opts.focus=(EFocus)focus->currentItem();
+ opts.lvLines=(ELvLines)lvLines->currentItem();
+ opts.lvButton=lvButton->isChecked();
opts.drawStatusBarFrames=drawStatusBarFrames->isChecked();
opts.buttonEffect=(EEffect)buttonEffect->currentItem();
opts.coloredMouseOver=(EMouseOver)coloredMouseOver->currentItem();
opts.menubarMouseOver=menubarMouseOver->isChecked();
opts.shadeMenubarOnlyWhenActive=shadeMenubarOnlyWhenActive->isChecked();
opts.thinnerMenuItems=thinnerMenuItems->isChecked();
+ opts.thinnerBtns=thinnerBtns->isChecked();
opts.fixParentlessDialogs=fixParentlessDialogs->isChecked();
opts.animatedProgress=animatedProgress->isChecked();
opts.stripedProgress=(EStripe)stripedProgress->currentItem();
- opts.lighterPopupMenuBgnd=lighterPopupMenuBgnd->isChecked();
+ opts.lighterPopupMenuBgnd=lighterPopupMenuBgnd->value();
+ opts.tabBgnd=tabBgnd->value();
+ opts.menuDelay=menuDelay->value();
+ opts.sliderWidth=sliderWidth->value();
+ opts.menuStripe=(EShade)menuStripe->currentItem();
+ opts.customMenuStripeColor=customMenuStripeColor->color();
+ opts.menuStripeAppearance=(EAppearance)menuStripeAppearance->currentItem();
+ opts.menuBgndAppearance=(EAppearance)menuBgndAppearance->currentItem();
+ opts.menuBgndGrad=(EGradType)menuBgndGrad->currentItem();
opts.embolden=embolden->isChecked();
opts.scrollbarType=(EScrollbar)scrollbarType->currentItem();
opts.defBtnIndicator=(EDefBtnIndicator)defBtnIndicator->currentItem();
@@ -539,57 +1461,120 @@ void QtCurveConfig::setOptions(Options &opts)
opts.lvAppearance=(EAppearance)lvAppearance->currentItem();
opts.sliderAppearance=(EAppearance)sliderAppearance->currentItem();
opts.tabAppearance=(EAppearance)tabAppearance->currentItem();
+ opts.activeTabAppearance=(EAppearance)activeTabAppearance->currentItem();
opts.toolbarSeparators=(ELine)toolbarSeparators->currentItem();
opts.splitters=(ELine)splitters->currentItem();
opts.customSlidersColor=customSlidersColor->color();
opts.customMenubarsColor=customMenubarsColor->color();
- opts.highlightFactor=((double)(highlightFactor->value()+100))/100.0;
+ opts.highlightFactor=highlightFactor->value();
opts.customMenuNormTextColor=customMenuNormTextColor->color();
opts.customMenuSelTextColor=customMenuSelTextColor->color();
opts.customMenuTextColor=customMenuTextColor->isChecked();
opts.fillSlider=fillSlider->isChecked();
opts.sliderStyle=(ESliderStyle)sliderStyle->currentItem();
opts.roundMbTopOnly=roundMbTopOnly->isChecked();
- opts.gradientPbGroove=gradientPbGroove->isChecked();
+ opts.fillProgress=fillProgress->isChecked();
opts.darkerBorders=darkerBorders->isChecked();
+ opts.comboSplitter=comboSplitter->isChecked();
+ opts.comboBtn=(EShade)comboBtn->currentItem();
+ opts.customComboBtnColor=customComboBtnColor->color();
+ opts.sortedLv=(EShade)sortedLv->currentItem();
+ opts.customSortedLvColor=customSortedLvColor->color();
+ opts.unifySpinBtns=unifySpinBtns->isChecked();
+ opts.unifySpin=unifySpin->isChecked();
+ opts.unifyCombo=unifyCombo->isChecked();
opts.vArrows=vArrows->isChecked();
opts.xCheck=xCheck->isChecked();
- opts.colorSelTab=colorSelTab->isChecked();
+ opts.crHighlight=crHighlight->value();
+ opts.crButton=crButton->isChecked();
+ opts.colorSelTab=colorSelTab->value();
+ opts.roundAllTabs=roundAllTabs->isChecked();
+ opts.borderTab=borderTab->isChecked();
+ opts.doubleGtkComboArrow=doubleGtkComboArrow->isChecked();
+ opts.borderInactiveTab=borderInactiveTab->isChecked();
+ opts.invertBotTab=invertBotTab->isChecked();
+ opts.tabMouseOver=(ETabMo)tabMouseOver->currentItem();
opts.stdSidebarButtons=stdSidebarButtons->isChecked();
opts.borderMenuitems=borderMenuitems->isChecked();
+ opts.popupBorder=popupBorder->isChecked();
opts.progressAppearance=(EAppearance)progressAppearance->currentItem();
+ opts.progressGrooveAppearance=(EAppearance)progressGrooveAppearance->currentItem();
+ opts.grooveAppearance=(EAppearance)grooveAppearance->currentItem();
+ opts.sunkenAppearance=(EAppearance)sunkenAppearance->currentItem();
+ opts.progressGrooveColor=(EColor)progressGrooveColor->currentItem();
opts.menuitemAppearance=(EAppearance)menuitemAppearance->currentItem();
+ opts.titlebarAppearance=(EAppearance)titlebarAppearance->currentItem();
+ opts.inactiveTitlebarAppearance=(EAppearance)inactiveTitlebarAppearance->currentItem();
+ opts.titlebarButtonAppearance=(EAppearance)titlebarButtonAppearance->currentItem();
+ opts.selectionAppearance=(EAppearance)selectionAppearance->currentItem();
opts.shadeCheckRadio=(EShade)shadeCheckRadio->currentItem();
opts.customCheckRadioColor=customCheckRadioColor->color();
opts.shading=(EShading)shading->currentItem();
opts.gtkScrollViews=gtkScrollViews->isChecked();
+ opts.highlightScrollViews=highlightScrollViews->isChecked();
+ opts.etchEntry=etchEntry->isChecked();
+ opts.flatSbarButtons=flatSbarButtons->isChecked();
+ opts.thinSbarGroove=thinSbarGroove->isChecked();
+ opts.colorSliderMouseOver=colorSliderMouseOver->isChecked();
+ opts.sbarBgndAppearance=(EAppearance)sbarBgndAppearance->currentItem();
+ opts.sliderFill=(EAppearance)sliderFill->currentItem();
+ opts.dwtAppearance=(EAppearance)dwtAppearance->currentItem();
+ opts.crColor=crColor->isChecked() ? SHADE_BLEND_SELECTED : SHADE_NONE;
+ opts.smallRadio=smallRadio->isChecked();
+ opts.splitterHighlight=splitterHighlight->value();
opts.gtkComboMenus=gtkComboMenus->isChecked();
opts.gtkButtonOrder=gtkButtonOrder->isChecked();
opts.mapKdeIcons=mapKdeIcons->isChecked();
opts.passwordChar=toInt(passwordChar->text());
opts.framelessGroupBoxes=framelessGroupBoxes->isChecked();
- opts.inactiveHighlight=inactiveHighlight->isChecked();
+ opts.customGradient=customGradient;
+ opts.colorMenubarMouseOver=colorMenubarMouseOver->isChecked();
+ opts.useHighlightForMenu=useHighlightForMenu->isChecked();
+ opts.groupBoxLine=groupBoxLine->isChecked();
+ opts.fadeLines=fadeLines->isChecked();
+ opts.menuIcons=menuIcons->isChecked();
+ opts.stdBtnSizes=stdBtnSizes->isChecked();
+ opts.forceAlternateLvCols=forceAlternateLvCols->isChecked();
+ opts.titlebarAlignment=(EAlign)titlebarAlignment->currentItem();
+ opts.square=getSquareFlags();
+ opts.windowBorder=getWindowBorderFlags();
+
+ if(customShading->isChecked())
+ {
+ for(int i=0; i<NUM_STD_SHADES; ++i)
+ opts.customShades[i]=shadeVals[i]->value();
+ }
+ else
+ opts.customShades[0]=0;
}
void QtCurveConfig::setWidgetOptions(const Options &opts)
{
round->setCurrentItem(opts.round);
scrollbarType->setCurrentItem(opts.scrollbarType);
- lighterPopupMenuBgnd->setChecked(opts.lighterPopupMenuBgnd);
+ lighterPopupMenuBgnd->setValue(opts.lighterPopupMenuBgnd);
+ tabBgnd->setValue(opts.tabBgnd);
+ menuDelay->setValue(opts.menuDelay);
+ sliderWidth->setValue(opts.sliderWidth);
+ menuStripe->setCurrentItem(opts.menuStripe);
+ customMenuStripeColor->setColor(opts.customMenuStripeColor);
+ menuStripeAppearance->setCurrentItem(opts.menuStripeAppearance);
+ menuBgndAppearance->setCurrentItem(opts.menuBgndAppearance);
+ menuBgndGrad->setCurrentItem(opts.menuBgndGrad);
toolbarBorders->setCurrentItem(opts.toolbarBorders);
sliderThumbs->setCurrentItem(opts.sliderThumbs);
handles->setCurrentItem(opts.handles);
appearance->setCurrentItem(opts.appearance);
-#ifndef QTC_PLAIN_FOCUS_ONLY
- stdFocus->setChecked(opts.stdFocus);
-#endif
- lvLines->setChecked(opts.lvLines);
+ focus->setCurrentItem(opts.focus);
+ lvLines->setCurrentItem(opts.lvLines);
+ lvButton->setChecked(opts.lvButton);
drawStatusBarFrames->setChecked(opts.drawStatusBarFrames);
buttonEffect->setCurrentItem(opts.buttonEffect);
coloredMouseOver->setCurrentItem(opts.coloredMouseOver);
menubarMouseOver->setChecked(opts.menubarMouseOver);
shadeMenubarOnlyWhenActive->setChecked(opts.shadeMenubarOnlyWhenActive);
thinnerMenuItems->setChecked(opts.thinnerMenuItems);
+ thinnerBtns->setChecked(opts.thinnerBtns);
fixParentlessDialogs->setChecked(opts.fixParentlessDialogs);
animatedProgress->setChecked(opts.animatedProgress);
stripedProgress->setCurrentItem(opts.stripedProgress);
@@ -601,11 +1586,12 @@ void QtCurveConfig::setWidgetOptions(const Options &opts)
lvAppearance->setCurrentItem(opts.lvAppearance);
sliderAppearance->setCurrentItem(opts.sliderAppearance);
tabAppearance->setCurrentItem(opts.tabAppearance);
+ activeTabAppearance->setCurrentItem(opts.activeTabAppearance);
toolbarSeparators->setCurrentItem(opts.toolbarSeparators);
splitters->setCurrentItem(opts.splitters);
shadeSliders->setCurrentItem(opts.shadeSliders);
shadeMenubars->setCurrentItem(opts.shadeMenubars);
- highlightFactor->setValue((int)(opts.highlightFactor*100)-100);
+ highlightFactor->setValue(opts.highlightFactor);
customSlidersColor->setColor(opts.customSlidersColor);
customMenubarsColor->setColor(opts.customMenubarsColor);
customMenuNormTextColor->setColor(opts.customMenuNormTextColor);
@@ -617,32 +1603,117 @@ void QtCurveConfig::setWidgetOptions(const Options &opts)
customMenuNormTextColor->setEnabled(customMenuTextColor->isChecked());
customMenuSelTextColor->setEnabled(customMenuTextColor->isChecked());
customCheckRadioColor->setEnabled(SHADE_CUSTOM==opts.shadeCheckRadio);
+ customMenuStripeColor->setEnabled(SHADE_CUSTOM==opts.menuStripe);
+ menuStripeAppearance->setEnabled(SHADE_NONE!=opts.menuStripe);
- animatedProgress->setEnabled(STRIPE_NONE!=stripedProgress->currentItem());
+ animatedProgress->setEnabled(STRIPE_NONE!=stripedProgress->currentItem() &&
+ STRIPE_FADE!=stripedProgress->currentItem());
fillSlider->setChecked(opts.fillSlider);
sliderStyle->setCurrentItem(opts.sliderStyle);
roundMbTopOnly->setChecked(opts.roundMbTopOnly);
- gradientPbGroove->setChecked(opts.gradientPbGroove);
+ fillProgress->setChecked(opts.fillProgress);
darkerBorders->setChecked(opts.darkerBorders);
+ comboSplitter->setChecked(opts.comboSplitter);
+ comboBtn->setCurrentItem(opts.comboBtn);
+ customComboBtnColor->setColor(opts.customComboBtnColor);
+ sortedLv->setCurrentItem(opts.sortedLv);
+ customSortedLvColor->setColor(opts.customSortedLvColor);
+ unifySpinBtns->setChecked(opts.unifySpinBtns);
+ unifySpin->setChecked(opts.unifySpin);
+ unifyCombo->setChecked(opts.unifyCombo);
vArrows->setChecked(opts.vArrows);
xCheck->setChecked(opts.xCheck);
- colorSelTab->setChecked(opts.colorSelTab);
+ crHighlight->setValue(opts.crHighlight);
+ crButton->setChecked(opts.crButton);
+ colorSelTab->setValue(opts.colorSelTab);
+ roundAllTabs->setChecked(opts.roundAllTabs);
+ borderTab->setChecked(opts.borderTab);
+ doubleGtkComboArrow->setChecked(opts.doubleGtkComboArrow);
+ borderInactiveTab->setChecked(opts.borderInactiveTab);
+ invertBotTab->setChecked(opts.invertBotTab);
+ tabMouseOver->setCurrentItem(opts.tabMouseOver);
stdSidebarButtons->setChecked(opts.stdSidebarButtons);
borderMenuitems->setChecked(opts.borderMenuitems);
+ popupBorder->setChecked(opts.popupBorder);
progressAppearance->setCurrentItem(opts.progressAppearance);
+ progressGrooveAppearance->setCurrentItem(opts.progressGrooveAppearance);
+ grooveAppearance->setCurrentItem(opts.grooveAppearance);
+ sunkenAppearance->setCurrentItem(opts.sunkenAppearance);
+ progressGrooveColor->setCurrentItem(opts.progressGrooveColor);
menuitemAppearance->setCurrentItem(opts.menuitemAppearance);
+ titlebarAppearance->setCurrentItem(opts.titlebarAppearance);
+ inactiveTitlebarAppearance->setCurrentItem(opts.inactiveTitlebarAppearance);
+ titlebarButtonAppearance->setCurrentItem(opts.titlebarButtonAppearance);
+ colorTitlebarOnly->setChecked(opts.windowBorder&WINDOW_BORDER_COLOR_TITLEBAR_ONLY);
+ selectionAppearance->setCurrentItem(opts.selectionAppearance);
shadeCheckRadio->setCurrentItem(opts.shadeCheckRadio);
customCheckRadioColor->setColor(opts.customCheckRadioColor);
+ colorMenubarMouseOver->setChecked(opts.colorMenubarMouseOver);
+ useHighlightForMenu->setChecked(opts.useHighlightForMenu);
+ groupBoxLine->setChecked(opts.groupBoxLine);
+ fadeLines->setChecked(opts.fadeLines);
+ menuIcons->setChecked(opts.menuIcons);
+ stdBtnSizes->setChecked(opts.stdBtnSizes);
+ forceAlternateLvCols->setChecked(opts.forceAlternateLvCols);
+ squareLvSelection->setChecked(opts.square&SQUARE_LISTVIEW_SELECTION);
+ titlebarAlignment->setCurrentItem(opts.titlebarAlignment);
shading->setCurrentItem(opts.shading);
gtkScrollViews->setChecked(opts.gtkScrollViews);
+ highlightScrollViews->setChecked(opts.highlightScrollViews);
+ squareScrollViews->setChecked(opts.square&SQUARE_SCROLLVIEW);
+ etchEntry->setChecked(opts.etchEntry);
+ flatSbarButtons->setChecked(opts.flatSbarButtons);
+ thinSbarGroove->setChecked(opts.thinSbarGroove);
+ colorSliderMouseOver->setChecked(opts.colorSliderMouseOver);
+ titlebarBorder->setChecked(opts.windowBorder&WINDOW_BORDER_ADD_LIGHT_BORDER);
+ sbarBgndAppearance->setCurrentItem(opts.sbarBgndAppearance);
+ sliderFill->setCurrentItem(opts.sliderFill);
+ dwtAppearance->setCurrentItem(opts.dwtAppearance);
+ crColor->setChecked(SHADE_BLEND_SELECTED==opts.crColor);
+ smallRadio->setChecked(opts.smallRadio);
+ splitterHighlight->setValue(opts.splitterHighlight);
gtkComboMenus->setChecked(opts.gtkComboMenus);
gtkButtonOrder->setChecked(opts.gtkButtonOrder);
mapKdeIcons->setChecked(opts.mapKdeIcons);
setPasswordChar(opts.passwordChar);
framelessGroupBoxes->setChecked(opts.framelessGroupBoxes);
- inactiveHighlight->setChecked(opts.inactiveHighlight);
+ customGradient=opts.customGradient;
+ gradCombo->setCurrentItem(APPEARANCE_CUSTOM1);
+
+ populateShades(opts);
+}
+
+int QtCurveConfig::getSquareFlags()
+{
+ int square(0);
+/*
+ if(squareEntry->isChecked())
+ square|=SQUARE_ENTRY;
+ if(squareProgress->isChecked())
+ square|=SQUARE_PROGRESS;
+*/
+ if(squareScrollViews->isChecked())
+ square|=SQUARE_SCROLLVIEW;
+ if(squareLvSelection->isChecked())
+ square|=SQUARE_LISTVIEW_SELECTION;
+ return square;
+}
+
+int QtCurveConfig::getWindowBorderFlags()
+{
+ int flags(0);
+
+ if(colorTitlebarOnly->isChecked())
+ flags|=WINDOW_BORDER_COLOR_TITLEBAR_ONLY;
+// if(windowBorder_menuColor->isChecked())
+// flags|=WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR;
+ if(titlebarBorder->isChecked())
+ flags|=WINDOW_BORDER_ADD_LIGHT_BORDER;
+// if(windowBorder_blend->isChecked())
+// flags|=WINDOW_BORDER_BLEND_TITLEBAR;
+ return flags;
}
bool QtCurveConfig::settingsChanged()
@@ -650,31 +1721,53 @@ bool QtCurveConfig::settingsChanged()
return round->currentItem()!=currentStyle.round ||
toolbarBorders->currentItem()!=currentStyle.toolbarBorders ||
appearance->currentItem()!=(int)currentStyle.appearance ||
-#ifndef QTC_PLAIN_FOCUS_ONLY
- stdFocus->isChecked()!=currentStyle.stdFocus ||
-#endif
- lvLines->isChecked()!=currentStyle.lvLines ||
+ focus->currentItem()!=(int)currentStyle.focus ||
+ lvLines->currentItem()!=(int)currentStyle.lvLines ||
+ lvButton->isChecked()!=currentStyle.lvButton ||
drawStatusBarFrames->isChecked()!=currentStyle.drawStatusBarFrames ||
buttonEffect->currentItem()!=(int)currentStyle.buttonEffect ||
coloredMouseOver->currentItem()!=(int)currentStyle.coloredMouseOver ||
menubarMouseOver->isChecked()!=currentStyle.menubarMouseOver ||
shadeMenubarOnlyWhenActive->isChecked()!=currentStyle.shadeMenubarOnlyWhenActive ||
thinnerMenuItems->isChecked()!=currentStyle.thinnerMenuItems ||
+ thinnerBtns->isChecked()!=currentStyle.thinnerBtns ||
fixParentlessDialogs->isChecked()!=currentStyle.fixParentlessDialogs ||
animatedProgress->isChecked()!=currentStyle.animatedProgress ||
stripedProgress->currentItem()!=currentStyle.stripedProgress ||
- lighterPopupMenuBgnd->isChecked()!=currentStyle.lighterPopupMenuBgnd ||
+ lighterPopupMenuBgnd->value()!=currentStyle.lighterPopupMenuBgnd ||
+ tabBgnd->value()!=currentStyle.tabBgnd ||
+ menuDelay->value()!=currentStyle.menuDelay ||
+ sliderWidth->value()!=currentStyle.sliderWidth ||
+ menuStripe->currentItem()!=currentStyle.menuStripe ||
+ menuStripeAppearance->currentItem()!=currentStyle.menuStripeAppearance ||
+ menuBgndAppearance->currentItem()!=currentStyle.menuBgndAppearance ||
+ menuBgndGrad->currentItem()!=currentStyle.menuBgndGrad ||
embolden->isChecked()!=currentStyle.embolden ||
fillSlider->isChecked()!=currentStyle.fillSlider ||
sliderStyle->currentItem()!=currentStyle.sliderStyle ||
roundMbTopOnly->isChecked()!=currentStyle.roundMbTopOnly ||
- gradientPbGroove->isChecked()!=currentStyle.gradientPbGroove ||
+ fillProgress->isChecked()!=currentStyle.fillProgress ||
darkerBorders->isChecked()!=currentStyle.darkerBorders ||
+ comboSplitter->isChecked()!=currentStyle.comboSplitter ||
+ comboBtn->currentItem()!=(int)currentStyle.comboBtn ||
+ sortedLv->currentItem()!=(int)currentStyle.sortedLv ||
+ unifySpinBtns->isChecked()!=currentStyle.unifySpinBtns ||
+ unifySpin->isChecked()!=currentStyle.unifySpin ||
+ unifyCombo->isChecked()!=currentStyle.unifyCombo ||
vArrows->isChecked()!=currentStyle.vArrows ||
xCheck->isChecked()!=currentStyle.xCheck ||
- colorSelTab->isChecked()!=currentStyle.colorSelTab ||
+ crHighlight->value()!=currentStyle.crHighlight ||
+ crButton->isChecked()!=currentStyle.crButton ||
+ colorSelTab->value()!=currentStyle.colorSelTab ||
+ roundAllTabs->isChecked()!=currentStyle.roundAllTabs ||
+ borderTab->isChecked()!=currentStyle.borderTab ||
+ doubleGtkComboArrow->isChecked()!=currentStyle.doubleGtkComboArrow ||
+ borderInactiveTab->isChecked()!=currentStyle.borderInactiveTab ||
+ invertBotTab->isChecked()!=currentStyle.invertBotTab ||
+ tabMouseOver->currentItem()!=currentStyle.tabMouseOver ||
stdSidebarButtons->isChecked()!=currentStyle.stdSidebarButtons ||
borderMenuitems->isChecked()!=currentStyle.borderMenuitems ||
+ popupBorder->isChecked()!=currentStyle.popupBorder ||
defBtnIndicator->currentItem()!=(int)currentStyle.defBtnIndicator ||
sliderThumbs->currentItem()!=(int)currentStyle.sliderThumbs ||
handles->currentItem()!=(int)currentStyle.handles ||
@@ -688,22 +1781,52 @@ bool QtCurveConfig::settingsChanged()
lvAppearance->currentItem()!=currentStyle.lvAppearance ||
sliderAppearance->currentItem()!=currentStyle.sliderAppearance ||
tabAppearance->currentItem()!=currentStyle.tabAppearance ||
+ activeTabAppearance->currentItem()!=currentStyle.activeTabAppearance ||
progressAppearance->currentItem()!=currentStyle.progressAppearance ||
+ progressGrooveAppearance->currentItem()!=currentStyle.progressGrooveAppearance ||
+ grooveAppearance->currentItem()!=currentStyle.grooveAppearance ||
+ sunkenAppearance->currentItem()!=currentStyle.sunkenAppearance ||
+ progressGrooveColor->currentItem()!=currentStyle.progressGrooveColor ||
menuitemAppearance->currentItem()!=currentStyle.menuitemAppearance ||
+ titlebarAppearance->currentItem()!=currentStyle.titlebarAppearance ||
+ inactiveTitlebarAppearance->currentItem()!=currentStyle.inactiveTitlebarAppearance ||
+ titlebarButtonAppearance->currentItem()!=currentStyle.titlebarButtonAppearance ||
+ selectionAppearance->currentItem()!=currentStyle.selectionAppearance ||
toolbarSeparators->currentItem()!=currentStyle.toolbarSeparators ||
splitters->currentItem()!=currentStyle.splitters ||
+ colorMenubarMouseOver->isChecked()!=currentStyle.colorMenubarMouseOver ||
+ useHighlightForMenu->isChecked()!=currentStyle.useHighlightForMenu ||
+ groupBoxLine->isChecked()!=currentStyle.groupBoxLine ||
+ fadeLines->isChecked()!=currentStyle.fadeLines ||
+ menuIcons->isChecked()!=currentStyle.menuIcons ||
+ stdBtnSizes->isChecked()!=currentStyle.stdBtnSizes ||
+ forceAlternateLvCols->isChecked()!=currentStyle.forceAlternateLvCols ||
+ titlebarAlignment->currentItem()!=currentStyle.titlebarAlignment ||
shading->currentItem()!=(int)currentStyle.shading ||
gtkScrollViews->isChecked()!=currentStyle.gtkScrollViews ||
+ highlightScrollViews->isChecked()!=currentStyle.highlightScrollViews ||
+ etchEntry->isChecked()!=currentStyle.etchEntry ||
+ flatSbarButtons->isChecked()!=currentStyle.flatSbarButtons ||
+ thinSbarGroove->isChecked()!=currentStyle.thinSbarGroove ||
+ colorSliderMouseOver->isChecked()!=currentStyle.colorSliderMouseOver ||
+ sbarBgndAppearance->currentItem()!=currentStyle.sbarBgndAppearance ||
+ sliderFill->currentItem()!=currentStyle.sliderFill ||
+ dwtAppearance->currentItem()!=currentStyle.dwtAppearance ||
+ crColor->isChecked()!=(SHADE_BLEND_SELECTED==currentStyle.crColor ? true : false)||
+ smallRadio->isChecked()!=currentStyle.smallRadio ||
+ splitterHighlight->value()!=currentStyle.splitterHighlight ||
gtkComboMenus->isChecked()!=currentStyle.gtkComboMenus ||
gtkButtonOrder->isChecked()!=currentStyle.gtkButtonOrder ||
mapKdeIcons->isChecked()!=currentStyle.mapKdeIcons ||
framelessGroupBoxes->isChecked()!=currentStyle.framelessGroupBoxes ||
- inactiveHighlight->isChecked()!=currentStyle.inactiveHighlight ||
+
+ getSquareFlags()!=currentStyle.square ||
+ getWindowBorderFlags()!=currentStyle.windowBorder||
toInt(passwordChar->text())!=currentStyle.passwordChar ||
- (highlightFactor->value()+100)!=(int)(currentStyle.highlightFactor*100) ||
+ highlightFactor->value()!=currentStyle.highlightFactor ||
customMenuTextColor->isChecked()!=currentStyle.customMenuTextColor ||
(SHADE_CUSTOM==currentStyle.shadeSliders &&
customSlidersColor->color()!=currentStyle.customSlidersColor) ||
@@ -714,7 +1837,17 @@ bool QtCurveConfig::settingsChanged()
(customMenuTextColor->isChecked() &&
customMenuNormTextColor->color()!=currentStyle.customMenuNormTextColor) ||
(customMenuTextColor->isChecked() &&
- customMenuSelTextColor->color()!=currentStyle.customMenuSelTextColor);
+ customMenuSelTextColor->color()!=currentStyle.customMenuSelTextColor) ||
+ (SHADE_CUSTOM==currentStyle.menuStripe &&
+ customMenuStripeColor->color()!=currentStyle.customMenuStripeColor) ||
+ (SHADE_CUSTOM==currentStyle.comboBtn &&
+ customComboBtnColor->color()!=currentStyle.customComboBtnColor) ||
+ (SHADE_CUSTOM==currentStyle.sortedLv &&
+ customSortedLvColor->color()!=currentStyle.customSortedLvColor) ||
+
+ customGradient!=currentStyle.customGradient;
+
+ diffShades(currentStyle);
}
#include "qtcurveconfig.moc"
diff --git a/config/qtcurveconfig.h b/config/qtcurveconfig.h
index 8e69510..04d34cb 100644
--- a/config/qtcurveconfig.h
+++ b/config/qtcurveconfig.h
@@ -2,7 +2,7 @@
#define __QTCURVECONFIG_H__
/*
- QtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
+ QtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -21,15 +21,46 @@
Boston, MA 02110-1301, USA.
*/
-#define QTC_COMMON_ONLY_COVERTERS
-#define QTC_CONFIG_DIALOG
+#define COMMON_FUNCTIONS
+#define CONFIG_DIALOG
#include <qtcurveconfigbase.h>
+#include <qcombobox.h>
#include <qmap.h>
#include "common.h"
class QPopupMenu;
+class QListViewItem;
+class KDoubleNumInput;
+#ifdef QTC_STYLE_SUPPORT
class CExportThemeDialog;
+#endif
+class CStackItem;
+class QtCurveConfig;
+
+class CGradientPreview : public QWidget
+{
+ Q_OBJECT
+
+ public:
+
+ CGradientPreview(QtCurveConfig *c, QWidget *p);
+
+ QSize sizeHint() const;
+ QSize minimumSizeHint() const;
+ void paintEvent(QPaintEvent *);
+ void setGrad(const GradientStopCont &s);
+
+ public slots:
+
+ void setColor(const QColor &col);
+
+ private:
+
+ QtCurveConfig *cfg;
+ QColor color;
+ GradientStopCont stops;
+};
class QtCurveConfig : public QtCurveConfigBase
{
@@ -40,6 +71,8 @@ class QtCurveConfig : public QtCurveConfigBase
QtCurveConfig(QWidget *parent);
virtual ~QtCurveConfig();
+ EShading currentShading() const { return (EShading)shading->currentItem(); }
+
signals:
void changed(bool);
@@ -57,25 +90,53 @@ class QtCurveConfig : public QtCurveConfigBase
void setStyle(int s);
void updateChanged();
+ void focusChanged();
+ void roundChanged();
void importStyle();
void exportStyle();
void exportTheme();
void emboldenToggled();
- void dbiChanged();
+ void defBtnIndicatorChanged();
+ void buttonEffectChanged();
+ void coloredMouseOverChanged();
void shadeSlidersChanged();
void shadeMenubarsChanged();
void shadeCheckRadioChanged();
void customMenuTextColorChanged();
+ void menuStripeChanged();
+ void comboBtnChanged();
+ void sortedLvChanged();
void stripedProgressChanged();
- void tabAppearanceChanged();
+ void activeTabAppearanceChanged();
+ void tabMoChanged();
+ void shadingChanged();
void passwordCharClicked();
+ void unifySpinBtnsToggled();
+ void unifySpinToggled();
+ void sliderThumbChanged();
+ void sliderWidthChanged();
+ void changeStack();
+ void gradChanged(int i);
+ void itemChanged(QListViewItem *i, int col);
+ void addGradStop();
+ void removeGradStop();
+ void updateGradStop();
+ void stopSelected();
private:
+ void setupStack();
+ void setupGradientsTab();
+ void setupShadesTab();
+ void setupShade(KDoubleNumInput *w, int shade);
+ void populateShades(const Options &opts);
+ bool diffShades(const Options &opts);
void setPasswordChar(int ch);
void loadStyle(const QString &file);
void setOptions(Options &opts);
void setWidgetOptions(const Options &opts);
+ int getSquareFlags();
+ int getWindowBorderFlags();
bool settingsChanged();
private:
@@ -83,7 +144,13 @@ class QtCurveConfig : public QtCurveConfigBase
Options currentStyle,
defaultStyle;
QMap<int, QString> styles;
+#ifdef QTC_STYLE_SUPPORT
CExportThemeDialog *exportDialog;
+#endif
+ CGradientPreview *gradPreview;
+ GradientCont customGradient;
+ KDoubleNumInput *shadeVals[NUM_STD_SHADES];
+ CStackItem *lastCategory;
};
#endif
diff --git a/config/qtcurveconfigbase.ui b/config/qtcurveconfigbase.ui
index 0e535ee..736a108 100644
--- a/config/qtcurveconfigbase.ui
+++ b/config/qtcurveconfigbase.ui
@@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>666</width>
- <height>556</height>
+ <width>862</width>
+ <height>638</height>
</rect>
</property>
<property name="caption">
@@ -41,125 +41,711 @@
<set>AlignCenter</set>
</property>
</widget>
- <spacer row="1" column="0">
+ <widget class="QListView" row="1" column="0">
+ <column>
+ <property name="text">
+ <string>Category</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
<property name="name">
- <cstring>spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
+ <cstring>stackList</cstring>
</property>
- <property name="sizeType">
- <enum>Fixed</enum>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="sizeHint">
+ <property name="minimumSize">
<size>
- <width>20</width>
- <height>16</height>
+ <width>150</width>
+ <height>0</height>
</size>
</property>
- </spacer>
- <widget class="QTabWidget" row="2" column="0" rowspan="1" colspan="2">
+ </widget>
+ <widget class="KPushButton" row="2" column="0">
<property name="name">
- <cstring>optionsTab</cstring>
+ <cstring>optionBtn</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>3</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="text">
+ <string>Options</string>
+ </property>
+ </widget>
+ <widget class="QWidgetStack" row="1" column="1" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>stack</cstring>
</property>
<widget class="QWidget">
<property name="name">
- <cstring>tab</cstring>
+ <cstring>WStackPage</cstring>
</property>
- <attribute name="title">
- <string>General</string>
+ <attribute name="id">
+ <number>0</number>
</attribute>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>appearance</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The setting here affects the general appearance - and will be applied to buttons, combo boxes, and spin buttons.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Appearance:</string>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer10_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>571</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="4" column="0">
<property name="name">
<cstring>textLabel1_6</cstring>
</property>
<property name="text">
- <string>Splitters:</string>
+ <string>Focus rectangle:</string>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<property name="name">
- <cstring>textLabel1_2_3</cstring>
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Button effect:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <property name="name">
+ <cstring>round</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="9" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>darkerBorders</cstring>
+ </property>
+ <property name="text">
+ <string>Darker borders</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="8" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>stdSidebarButtons</cstring>
</property>
<property name="text">
- <string>Scrollbars:</string>
+ <string>Standard buttons for sidebars</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this to have the sidebar buttons in konqueror, kate, kaffeine, ktorrent, drawn as per normal buttons - otherwise they will be drawn in a more flat style.</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="3" column="1">
+ <property name="name">
+ <cstring>buttonEffect</cstring>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
- <cstring>textLabel1_2_3_2</cstring>
+ <cstring>textLabel2_4</cstring>
</property>
<property name="text">
- <string>Sliders:</string>
+ <string>Roundedness:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>textLabel1_7</cstring>
+ <cstring>vArrows</cstring>
</property>
<property name="text">
- <string>Appearance:</string>
+ <string>'V' style arrows</string>
</property>
</widget>
+ <widget class="QComboBox" row="4" column="1">
+ <property name="name">
+ <cstring>focus</cstring>
+ </property>
+ </widget>
+ <widget class="QFrame" row="6" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>frame4</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>framelessGroupBoxes</cstring>
+ </property>
+ <property name="text">
+ <string>Frameless groupboxes,</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>groupBoxLine</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>draw line after title (KDE4 &amp;&amp; Gtk2)</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>drawStatusBarFrames</cstring>
+ </property>
+ <property name="text">
+ <string>Draw statusbar frames</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>sunkenAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_12</cstring>
+ </property>
+ <property name="text">
+ <string>Sunken appearance:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="10" column="0">
+ <property name="name">
+ <cstring>fadeLines</cstring>
+ </property>
+ <property name="text">
+ <string>Draw fading lines (KDE4 &amp;&amp; Gtk2)</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="11" column="0">
+ <property name="name">
+ <cstring>thinnerBtns</cstring>
+ </property>
+ <property name="text">
+ <string>Thinner buttons when etched/shadowed</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="13" column="1">
+ <property name="name">
+ <cstring>spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>162</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="12" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>etchEntry</cstring>
+ </property>
+ <property name="text">
+ <string>Etch entries and scrollviews when button effect set to etched/shadowed.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>comboSplitter</cstring>
+ </property>
+ <property name="text">
+ <string>Draw splitter</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This option controls whether a line is drawn near non-editable combo box arrows.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>unifyCombo</cstring>
+ </property>
+ <property name="text">
+ <string>Draw arrow of editable combos within edit field</string>
+ </property>
+ </widget>
+ <spacer row="5" column="2">
+ <property name="name">
+ <cstring>spacer27_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>429</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="4" column="3">
+ <property name="name">
+ <cstring>spacer26_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>31</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
<widget class="QLabel" row="4" column="0">
<property name="name">
- <cstring>textLabel1</cstring>
+ <cstring>textLabel1_17</cstring>
</property>
<property name="text">
- <string>Progress bars:</string>
+ <string>Button shade:</string>
</property>
</widget>
- <widget class="QLabel" row="7" column="0">
+ <widget class="KColorButton" row="4" column="2">
<property name="name">
- <cstring>textLabel1_8_2</cstring>
+ <cstring>customComboBtnColor</cstring>
</property>
<property name="text">
- <string>Listviews:</string>
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="4" column="1">
+ <property name="name">
+ <cstring>comboBtn</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>gtkComboMenus</cstring>
+ </property>
+ <property name="text">
+ <string>Gtk style comboboxes (KDE4)</string>
</property>
<property name="whatsThis" stdset="0">
- <string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string>
+ <string>In Gtk, the list that is attached to a combo-box appears in the same style as a popup-menu. KDE4 has the ability to mimic this look.</string>
</property>
</widget>
- <widget class="QComboBox" row="7" column="1">
+ <widget class="QCheckBox" row="3" column="0">
<property name="name">
- <cstring>lvAppearance</cstring>
+ <cstring>doubleGtkComboArrow</cstring>
+ </property>
+ <property name="text">
+ <string>Double arrows for Gtk style comboboxes</string>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="1">
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>2</number>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
<property name="name">
- <cstring>embolden</cstring>
+ <cstring>unifySpinBtns</cstring>
+ </property>
+ <property name="text">
+ <string>Combine both buttons</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>unifySpin</cstring>
+ </property>
+ <property name="text">
+ <string>Draw arrows within edit field</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer28_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>3</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Markings:</string>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer12_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>482</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KIntNumInput" row="1" column="1">
+ <property name="name">
+ <cstring>splitterHighlight</cstring>
+ </property>
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>461</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>splitters</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_21</cstring>
</property>
<property name="text">
- <string>Bold text, and</string>
+ <string>Background mouse-over highlight:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>4</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Appearance:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Coloration:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>shadeSliders</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This color setting affects both scrollbar sliders, and other sliders.</string>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="1" column="2">
+ <property name="name">
+ <cstring>customSlidersColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="1" column="3">
+ <property name="name">
+ <cstring>spacer14</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>307</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>sliderAppearance</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This appearance setting affects both scrollbar sliders, and other sliders.</string>
+ </property>
+ </widget>
+ <spacer row="10" column="1">
+ <property name="name">
+ <cstring>spacer13</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>191</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QComboBox" row="5" column="1">
+ <property name="name">
+ <cstring>grooveAppearance</cstring>
</property>
</widget>
<widget class="QComboBox" row="8" column="1">
<property name="name">
- <cstring>tabAppearance</cstring>
+ <cstring>sliderThumbs</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="9" column="1">
+ <property name="name">
+ <cstring>sliderWidth</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel7</cstring>
+ </property>
+ <property name="text">
+ <string>Style:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="8" column="0">
+ <property name="name">
+ <cstring>textLabel8_2</cstring>
+ </property>
+ <property name="text">
+ <string>Slider thumbs:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="9" column="0">
+ <property name="name">
+ <cstring>textLabel8_2x</cstring>
+ </property>
+ <property name="text">
+ <string>Slider width:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>fillSlider</cstring>
+ </property>
+ <property name="text">
+ <string>Fill used part of groove:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="7" column="0">
+ <property name="name">
+ <cstring>textLabel8_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Background</string>
</property>
</widget>
<widget class="QComboBox" row="4" column="1">
<property name="name">
- <cstring>progressAppearance</cstring>
+ <cstring>sliderFill</cstring>
</property>
<property name="whatsThis" stdset="0">
- <string>The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons.</string>
+ <string>This appearance setting affects both scrollbar sliders, and other sliders.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>flatSbarButtons</cstring>
+ </property>
+ <property name="text">
+ <string>Flat</string>
</property>
</widget>
<widget class="QComboBox" row="3" column="1">
<property name="name">
+ <cstring>sliderStyle</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This setting only affects standard sliders - i.e. not scrollbar sliders. 'Triangular' is a very similar style to plastik's sliders.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel2_5</cstring>
+ </property>
+ <property name="text">
+ <string>Groove appearance:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>thinSbarGroove</cstring>
+ </property>
+ <property name="text">
+ <string>Thin scrollbar groove</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="0">
+ <property name="name">
+ <cstring>textLabel8</cstring>
+ </property>
+ <property name="text">
+ <string>Scrollbar buttons:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="6" column="1">
+ <property name="name">
<cstring>scrollbarType</cstring>
</property>
<property name="sizePolicy">
@@ -170,26 +756,61 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="whatsThis" stdset="0">
+ <string>This controls the position, and number, of buttons on a scrollbar.
+
+KDE - 1 button at the top/left, and two at the bottom/right
+Windows - 1 botton at each end
+Platinum - no buttons at the top/left, two at bottom/right
+Next - two buttons at the top/left, none at bottom/right
+None - no buttons, only the slider</string>
+ </property>
</widget>
- <widget class="QComboBox" row="4" column="4">
+ <widget class="QComboBox" row="7" column="1">
<property name="name">
- <cstring>stripedProgress</cstring>
+ <cstring>sbarBgndAppearance</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="2" rowspan="1" colspan="2">
+ <widget class="QCheckBox" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
- <cstring>gradientPbGroove</cstring>
+ <cstring>colorSliderMouseOver</cstring>
</property>
<property name="text">
- <string>Gradient groove</string>
+ <string>Color only on mouse-over</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>5</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="1">
<property name="name">
- <cstring>sliderAppearance</cstring>
+ <cstring>progressAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="2">
+ <property name="name">
+ <cstring>stripedProgress</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="5">
+ <widget class="QCheckBox" row="0" column="3">
<property name="name">
<cstring>animatedProgress</cstring>
</property>
@@ -197,44 +818,84 @@
<string>Animated</string>
</property>
</widget>
- <widget class="QCheckBox" row="7" column="2" rowspan="1" colspan="4">
+ <spacer row="2" column="2">
<property name="name">
- <cstring>lvLines</cstring>
+ <cstring>spacer16</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>369</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_3</cstring>
</property>
<property name="text">
- <string>Lines</string>
+ <string>Groove:</string>
</property>
</widget>
- <widget class="QCheckBox" row="10" column="0" rowspan="1" colspan="2">
+ <widget class="QLabel" row="0" column="0">
<property name="name">
- <cstring>stdFocus</cstring>
+ <cstring>textLabel9</cstring>
</property>
<property name="text">
- <string>Dotted focus rectangle</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Some applications, such as Qt Designer, and Krita, make use of 'dock windows' These have a handle strip along the top - enabling this option will draw the name of the window in the handle strip.</string>
+ <string>Bar:</string>
</property>
</widget>
- <widget class="QCheckBox" row="11" column="0" rowspan="1" colspan="2">
+ <widget class="QComboBox" row="1" column="1">
<property name="name">
- <cstring>drawStatusBarFrames</cstring>
+ <cstring>progressGrooveAppearance</cstring>
</property>
- <property name="text">
- <string>Draw statusbar frames</string>
+ </widget>
+ <widget class="QComboBox" row="1" column="2">
+ <property name="name">
+ <cstring>progressGrooveColor</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="12" column="0" rowspan="1" colspan="2">
+ <widget class="QCheckBox" row="0" column="4">
<property name="name">
- <cstring>framelessGroupBoxes</cstring>
+ <cstring>fillProgress</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
<property name="text">
- <string>Frameless groupboxes</string>
+ <string>No border</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enable this option to remove the 1 pixel border around the filled element.</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="2" rowspan="1" colspan="2">
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>6</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="1" column="1">
<property name="name">
- <cstring>shadeSliders</cstring>
+ <cstring>defBtnIndicator</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -245,31 +906,151 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel" row="8" column="0">
+ <widget class="QLabel" row="1" column="0">
<property name="name">
- <cstring>textLabel1_8_2_2</cstring>
+ <cstring>textLabel10</cstring>
</property>
<property name="text">
- <string>Tabs:</string>
+ <string>Indicate with:</string>
</property>
- <property name="whatsThis" stdset="0">
- <string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>embolden</cstring>
+ </property>
+ <property name="text">
+ <string>Embolden text</string>
</property>
</widget>
- <widget class="QLabel" row="9" column="0">
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer17</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>27</width>
+ <height>2</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer18</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>3</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>7</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
<property name="name">
- <cstring>textLabel1_8_2_2_2</cstring>
+ <cstring>textLabel1_8</cstring>
</property>
<property name="text">
- <string>Checks/radios:</string>
+ <string>Highlight by:</string>
</property>
<property name="whatsThis" stdset="0">
<string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string>
</property>
</widget>
- <widget class="QComboBox" row="9" column="1">
+ <widget class="QLabel" row="0" column="0">
<property name="name">
- <cstring>shadeCheckRadio</cstring>
+ <cstring>textLabel11</cstring>
+ </property>
+ <property name="text">
+ <string>Coloration:</string>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="1" column="1">
+ <property name="name">
+ <cstring>highlightFactor</cstring>
+ </property>
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>coloredMouseOver</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer19</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>50</width>
+ <height>6</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer20</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>5</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>8</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="2">
+ <property name="name">
+ <cstring>lvButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -279,103 +1060,261 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="text">
+ <string>Button color</string>
+ </property>
</widget>
- <widget class="KColorButton" row="9" column="2" rowspan="1" colspan="2">
+ <widget class="QLabel" row="0" column="0">
<property name="name">
- <cstring>customCheckRadioColor</cstring>
+ <cstring>textLabel12</cstring>
</property>
<property name="text">
- <string></string>
+ <string>Header appearance:</string>
</property>
</widget>
- <widget class="KColorButton" row="2" column="4">
+ <widget class="QComboBox" row="0" column="1">
<property name="name">
- <cstring>customSlidersColor</cstring>
+ <cstring>lvAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel12_2</cstring>
+ </property>
+ <property name="text">
+ <string>Shade header of sorted column:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>sortedLv</cstring>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="1" column="2">
+ <property name="name">
+ <cstring>customSortedLvColor</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
</property>
<property name="text">
<string></string>
</property>
</widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel1_8_2_2_3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Selection appearance (KDE4 &amp;&amp; Gtk2):</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="3" column="1">
+ <property name="name">
+ <cstring>selectionAppearance</cstring>
+ </property>
+ </widget>
+ <spacer row="6" column="1">
+ <property name="name">
+ <cstring>spacer22</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>389</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>forceAlternateLvCols</cstring>
+ </property>
+ <property name="text">
+ <string>Force alternate colors</string>
+ </property>
+ </widget>
<widget class="QLabel" row="5" column="0">
<property name="name">
- <cstring>textLabel1_3</cstring>
+ <cstring>textLabel1_18</cstring>
</property>
<property name="text">
- <string>Default button:</string>
+ <string>Lines between items:</string>
</property>
</widget>
- <widget class="QLabel" row="6" column="0">
+ <widget class="QComboBox" row="5" column="1">
+ <property name="name">
+ <cstring>lvLines</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
<property name="name">
- <cstring>textLabel1_3_2</cstring>
+ <cstring>squareLvSelection</cstring>
</property>
<property name="text">
- <string>Mouse-over:</string>
+ <string>Square selection</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="1">
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>9</number>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
<property name="name">
- <cstring>appearance</cstring>
+ <cstring>gtkScrollViews</cstring>
</property>
- <property name="whatsThis" stdset="0">
- <string>The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons.</string>
+ <property name="text">
+ <string>Scrollbars on the outside</string>
</property>
</widget>
- <widget class="QCheckBox" row="11" column="2" rowspan="1" colspan="4">
+ <widget class="QCheckBox">
<property name="name">
- <cstring>stdSidebarButtons</cstring>
+ <cstring>highlightScrollViews</cstring>
</property>
<property name="text">
- <string>Standard buttons for sidebars</string>
+ <string>Highlight on focus (KDE)</string>
</property>
</widget>
- <widget class="QComboBox" row="6" column="1">
+ <widget class="QCheckBox">
<property name="name">
- <cstring>coloredMouseOver</cstring>
+ <cstring>squareScrollViews</cstring>
</property>
- <property name="whatsThis" stdset="0">
- <string>The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons.</string>
+ <property name="text">
+ <string>Always draw with a square frame - regardless of the general round setting.</string>
</property>
</widget>
- <widget class="QLabel" row="6" column="2">
+ <spacer>
<property name="name">
- <cstring>textLabel1_8</cstring>
+ <cstring>spacer28_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>272</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>10</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel13</cstring>
</property>
<property name="text">
- <string>Highlight by:</string>
+ <string>Active tab appearance:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel8_3</cstring>
+ </property>
+ <property name="text">
+ <string>Inactive tab appearance:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>activeTabAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>tabAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="2">
+ <property name="name">
+ <cstring>highlightTab</cstring>
+ </property>
+ <property name="text">
+ <string>Highlight</string>
</property>
<property name="whatsThis" stdset="0">
- <string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string>
+ <string>This will cause a coloured stripe to be drawn over the current tab.</string>
</property>
</widget>
- <widget class="QCheckBox" row="12" column="2" rowspan="1" colspan="3">
+ <widget class="KIntNumInput" row="0" column="3">
<property name="name">
- <cstring>darkerBorders</cstring>
+ <cstring>colorSelTab</cstring>
+ </property>
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ <property name="prefix">
+ <string>Tint by </string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel1_14</cstring>
</property>
<property name="text">
- <string>Darker borders</string>
+ <string>Mouse-over:</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="2" rowspan="1" colspan="2">
+ <widget class="QComboBox" row="2" column="1">
<property name="name">
- <cstring>round</cstring>
+ <cstring>tabMouseOver</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="10" column="2" rowspan="1" colspan="4">
+ <widget class="QCheckBox" row="3" column="0">
<property name="name">
- <cstring>vArrows</cstring>
+ <cstring>roundAllTabs</cstring>
</property>
<property name="text">
- <string>'V' style arrows</string>
+ <string>Round all tabs</string>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="QCheckBox" row="4" column="0">
<property name="name">
- <cstring>splitters</cstring>
+ <cstring>borderTab</cstring>
+ </property>
+ <property name="text">
+ <string>Draw a light border around tab widget</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>borderInactiveTab</cstring>
+ </property>
+ <property name="text">
+ <string>Draw inner border of inactive tabs</string>
</property>
</widget>
- <spacer row="13" column="0">
+ <spacer row="8" column="1">
<property name="name">
- <cstring>spacer6</cstring>
+ <cstring>spacer23</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
@@ -386,40 +1325,50 @@
<property name="sizeHint">
<size>
<width>20</width>
- <height>20</height>
+ <height>320</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="9" column="4" rowspan="1" colspan="2">
+ <widget class="KIntNumInput" row="7" column="1">
<property name="name">
- <cstring>xCheck</cstring>
+ <cstring>tabBgnd</cstring>
</property>
- <property name="text">
- <string>'X' style checkmarks</string>
+ <property name="prefix">
+ <string>%</string>
</property>
</widget>
- <widget class="QCheckBox" row="8" column="2" rowspan="1" colspan="2">
+ <widget class="QLabel" row="7" column="0">
<property name="name">
- <cstring>highlightTab</cstring>
+ <cstring>textLabel1_19</cstring>
</property>
<property name="text">
- <string>Highlight selected</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>This will cause a coloured stripe to be drawn over the current tab.</string>
+ <string>Alter background by:</string>
</property>
</widget>
- <widget class="QCheckBox" row="8" column="4" rowspan="1" colspan="2">
+ <widget class="QCheckBox" row="6" column="0">
<property name="name">
- <cstring>colorSelTab</cstring>
+ <cstring>invertBotTab</cstring>
</property>
<property name="text">
- <string>Color selected</string>
+ <string>Invert shade of bottom tabs</string>
</property>
</widget>
- <widget class="QComboBox" row="3" column="2" rowspan="1" colspan="3">
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>11</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="2">
<property name="name">
- <cstring>sliderThumbs</cstring>
+ <cstring>shadeCheckRadio</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -430,58 +1379,240 @@
</sizepolicy>
</property>
</widget>
- <widget class="QComboBox" row="5" column="2" rowspan="1" colspan="3">
+ <widget class="KColorButton" row="0" column="3">
<property name="name">
- <cstring>defBtnIndicator</cstring>
+ <cstring>customCheckRadioColor</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="text">
+ <string></string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="6">
+ <widget class="QLabel" row="0" column="0">
<property name="name">
- <cstring>fillSlider</cstring>
+ <cstring>textLabel14</cstring>
</property>
<property name="text">
- <string>Fill used</string>
+ <string>Coloration:</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="5">
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="4">
<property name="name">
- <cstring>sliderStyle</cstring>
+ <cstring>xCheck</cstring>
+ </property>
+ <property name="text">
+ <string>'X' style checkmarks</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="4">
+ <spacer row="0" column="4">
<property name="name">
- <cstring>buttonEffect</cstring>
+ <cstring>spacer25</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>211</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="6" column="2">
+ <property name="name">
+ <cstring>spacer26</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>364</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>crButton</cstring>
+ </property>
+ <property name="text">
+ <string>Button like</string>
</property>
</widget>
- <widget class="KIntNumInput" row="6" column="3" rowspan="1" colspan="2">
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
- <cstring>highlightFactor</cstring>
+ <cstring>smallRadio</cstring>
+ </property>
+ <property name="text">
+ <string>Small radio 'dot'</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>crColor</cstring>
+ </property>
+ <property name="text">
+ <string>Color when selected</string>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="3" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>crHighlight</cstring>
</property>
<property name="suffix">
<string>%</string>
</property>
</widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel2_6</cstring>
+ </property>
+ <property name="text">
+ <string>Background mouse-over highlight:</string>
+ </property>
+ </widget>
</grid>
</widget>
<widget class="QWidget">
<property name="name">
- <cstring>tab</cstring>
+ <cstring>WStackPage</cstring>
</property>
- <attribute name="title">
- <string>Menus &amp;&amp; Toolbars</string>
+ <attribute name="id">
+ <number>12</number>
</attribute>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer28</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>395</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel15_2</cstring>
+ </property>
+ <property name="text">
+ <string>Button Appearance:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <property name="name">
+ <cstring>titlebarButtonAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>titlebarAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel15</cstring>
+ </property>
+ <property name="text">
+ <string>Titlebar Appearance:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel15_3</cstring>
+ </property>
+ <property name="text">
+ <string>Titlebar Appearance:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>inactiveTitlebarAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel1_13</cstring>
+ </property>
+ <property name="text">
+ <string>Text alignment:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="3" column="1">
+ <property name="name">
+ <cstring>titlebarAlignment</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>colorTitlebarOnly</cstring>
+ </property>
+ <property name="text">
+ <string>Color titlebar only (KDE4)</string>
+ </property>
+ </widget>
+ <spacer row="6" column="1">
+ <property name="name">
+ <cstring>spacer27</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>270</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>titlebarBorder</cstring>
+ </property>
+ <property name="text">
+ <string>Light border (KDE4)</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>13</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Handles:</string>
+ </property>
+ </widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_4</cstring>
@@ -490,6 +1621,33 @@
<string>Border:</string>
</property>
</widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>toolbarBorders</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="3">
+ <property name="name">
+ <cstring>handles</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="4">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>121</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
<spacer row="3" column="2">
<property name="name">
<cstring>spacer5</cstring>
@@ -503,46 +1661,89 @@
<property name="sizeHint">
<size>
<width>20</width>
- <height>54</height>
+ <height>19</height>
</size>
</property>
</spacer>
- <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="5">
+ <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="5">
<property name="name">
- <cstring>groupBox2_2</cstring>
+ <cstring>groupBox2</cstring>
</property>
<property name="title">
- <string>Menus</string>
+ <string>Toolbars</string>
</property>
<property name="flat">
- <bool>true</bool>
+ <bool>false</bool>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="8">
+ <widget class="QLabel" row="0" column="0">
<property name="name">
- <cstring>lighterPopupMenuBgnd</cstring>
+ <cstring>textLabel1_4_2_2</cstring>
</property>
<property name="text">
- <string>Lighter popup-menu background</string>
+ <string>Appearance:</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="8">
+ <widget class="QComboBox" row="0" column="1">
<property name="name">
- <cstring>menubarMouseOver</cstring>
+ <cstring>toolbarAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>textLabel2_2</cstring>
</property>
<property name="text">
- <string>Enable mouse-over for menubar items</string>
+ <string>Separators:</string>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="8">
+ <widget class="QComboBox" row="0" column="3">
<property name="name">
- <cstring>roundMbTopOnly</cstring>
+ <cstring>toolbarSeparators</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="4">
+ <property name="name">
+ <cstring>spacer4_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>groupBox2_2</cstring>
+ </property>
+ <property name="title">
+ <string>Menus</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="8">
+ <property name="name">
+ <cstring>shadeMenubarOnlyWhenActive</cstring>
</property>
<property name="text">
- <string>Round selected menubar items on top only</string>
+ <string>Apply coloration to active window only</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
@@ -561,7 +1762,7 @@
<string>Menubar appearance:</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="QLabel" row="7" column="0">
<property name="name">
<cstring>textLabel1_4_2_4</cstring>
</property>
@@ -569,31 +1770,134 @@
<string>Menuitem appearance:</string>
</property>
</widget>
- <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="7">
+ <widget class="QCheckBox" row="9" column="0" rowspan="1" colspan="8">
<property name="name">
- <cstring>thinnerMenuItems</cstring>
+ <cstring>useHighlightForMenu</cstring>
</property>
<property name="text">
- <string>Thinner menu items</string>
+ <string>Use 'highlight' color for active menuitems</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="7">
+ <widget class="QLabel" row="14" column="0">
<property name="name">
- <cstring>shadeMenubarOnlyWhenActive</cstring>
+ <cstring>textLabel1_15</cstring>
+ </property>
+ <property name="text">
+ <string>Stripe (KDE):</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="15" column="0">
+ <property name="name">
+ <cstring>popupBorder</cstring>
</property>
<property name="text">
- <string>Active window only</string>
+ <string>Border popupmenus</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="11" column="0" rowspan="2" colspan="6">
+ <property name="name">
+ <cstring>textLabel1_16</cstring>
+ </property>
+ <property name="text">
+ <string>Sub-menu delay:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="14" column="7">
+ <property name="name">
+ <cstring>menuStripeAppearance</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="8">
+ <property name="name">
+ <cstring>colorMenubarMouseOver</cstring>
+ </property>
+ <property name="text">
+ <string>Color menubar items on mouse-over</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>customMenuTextColor</cstring>
</property>
<property name="text">
- <string>Custom text colors (normal/selected):</string>
+ <string>Custom text colors (active/normal):</string>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="3" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>customMenuNormTextColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="3" column="4" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>customMenuSelTextColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="10" column="3" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>menuBgndAppearance</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="10" column="7">
+ <property name="name">
+ <cstring>menuBgndGrad</cstring>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="14" column="5" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>customMenuStripeColor</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
</property>
</widget>
- <widget class="QComboBox" row="5" column="1" rowspan="1" colspan="5">
+ <widget class="QCheckBox" row="13" column="0" rowspan="1" colspan="8">
+ <property name="name">
+ <cstring>thinnerMenuItems</cstring>
+ </property>
+ <property name="text">
+ <string>Thinner menu items</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="10" column="0">
+ <property name="name">
+ <cstring>textLabel1_7</cstring>
+ </property>
+ <property name="text">
+ <string>Popup-menu background:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="14" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>menuStripe</cstring>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="10" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lighterPopupMenuBgnd</cstring>
+ </property>
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="12" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>menuDelay</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="7" column="1" rowspan="1" colspan="5">
<property name="name">
<cstring>menuitemAppearance</cstring>
</property>
@@ -616,164 +1920,145 @@
<cstring>menubarAppearance</cstring>
</property>
</widget>
- <widget class="KColorButton" row="1" column="6">
+ <widget class="QCheckBox" row="8" column="0">
<property name="name">
- <cstring>customMenubarsColor</cstring>
+ <cstring>borderMenuitems</cstring>
</property>
<property name="text">
- <string></string>
+ <string>Border menuitems</string>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="6">
+ <widget class="QCheckBox" row="8" column="1" rowspan="1" colspan="2">
<property name="name">
- <cstring>borderMenuitems</cstring>
+ <cstring>menuIcons</cstring>
</property>
<property name="text">
- <string>Border</string>
+ <string>Draw icons</string>
</property>
</widget>
- <widget class="KColorButton" row="2" column="2">
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="8">
<property name="name">
- <cstring>customMenuNormTextColor</cstring>
+ <cstring>roundMbTopOnly</cstring>
</property>
<property name="text">
- <string></string>
+ <string>Round selected menubar items on top only</string>
</property>
</widget>
- <widget class="KColorButton" row="2" column="4">
+ <widget class="KColorButton" row="1" column="6">
<property name="name">
- <cstring>customMenuSelTextColor</cstring>
+ <cstring>customMenubarsColor</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="8">
+ <property name="name">
+ <cstring>menubarMouseOver</cstring>
+ </property>
+ <property name="text">
+ <string>Enable mouse-over for menubar items</string>
+ </property>
+ </widget>
</grid>
</widget>
- <widget class="QLabel" row="0" column="2">
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>14</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
<property name="name">
- <cstring>textLabel2</cstring>
+ <cstring>textLabel1_20</cstring>
</property>
<property name="text">
- <string>Handles:</string>
+ <string>Titlebar appearance:</string>
</property>
</widget>
- <spacer row="0" column="4">
+ <widget class="QComboBox" row="1" column="2">
<property name="name">
- <cstring>spacer4</cstring>
+ <cstring>dwtAppearance</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>spacer28_4</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
- <enum>MinimumExpanding</enum>
+ <enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
- <width>20</width>
- <height>20</height>
+ <width>18</width>
+ <height>3</height>
</size>
</property>
</spacer>
- <widget class="QComboBox" row="0" column="3">
+ <spacer row="2" column="1">
<property name="name">
- <cstring>handles</cstring>
+ <cstring>spacer29</cstring>
</property>
- </widget>
- <widget class="QComboBox" row="0" column="1">
- <property name="name">
- <cstring>toolbarBorders</cstring>
- </property>
- </widget>
- <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="5">
- <property name="name">
- <cstring>groupBox2</cstring>
+ <property name="orientation">
+ <enum>Vertical</enum>
</property>
- <property name="title">
- <string>Toolbars</string>
+ <property name="sizeType">
+ <enum>Expanding</enum>
</property>
- <property name="flat">
- <bool>true</bool>
+ <property name="sizeHint">
+ <size>
+ <width>6</width>
+ <height>85</height>
+ </size>
</property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLabel" row="0" column="0">
- <property name="name">
- <cstring>textLabel1_4_2_2</cstring>
- </property>
- <property name="text">
- <string>Appearance:</string>
- </property>
- </widget>
- <widget class="QComboBox" row="0" column="1">
- <property name="name">
- <cstring>toolbarAppearance</cstring>
- </property>
- </widget>
- <widget class="QLabel" row="0" column="2">
- <property name="name">
- <cstring>textLabel2_2</cstring>
- </property>
- <property name="text">
- <string>Separators:</string>
- </property>
- </widget>
- <widget class="QComboBox" row="0" column="3">
- <property name="name">
- <cstring>toolbarSeparators</cstring>
- </property>
- </widget>
- <spacer row="0" column="4">
- <property name="name">
- <cstring>spacer4_2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>MinimumExpanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
- </widget>
+ </spacer>
</grid>
</widget>
<widget class="QWidget">
<property name="name">
- <cstring>TabPage</cstring>
+ <cstring>WStackPage</cstring>
</property>
- <attribute name="title">
- <string>Advanced</string>
+ <attribute name="id">
+ <number>15</number>
</attribute>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
- <cstring>gtkComboMenus</cstring>
+ <cstring>fixParentlessDialogs</cstring>
</property>
<property name="text">
- <string>Gtk style comboboxes (KDE4 only)</string>
+ <string>'Fix' parentless dialogs</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;h2&gt;&lt;font color="#ff0000"&gt;Warning: Experimental!&lt;/font&gt;&lt;/h1&gt;&lt;p&gt;&lt;p&gt;Some applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have no 'parent'. This causes the dialog to recieve an entry in the taskbar, and allows the dialog to be minimised independantly of the main application window.&lt;/p&gt;
+
+&lt;p&gt;If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.&lt;/p&gt;
+
+&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This may brake some applications, as it wiill alter the behaviour of dialogs in a way the application has not intended. Therefore, please use with care.&lt;/p&gt;</string>
</property>
</widget>
<widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
- <cstring>gtkScrollViews</cstring>
+ <cstring>mapKdeIcons</cstring>
</property>
<property name="text">
- <string>Gtk style scrollviews (KDE3 and KDE4 only)</string>
+ <string>Map KDE icons (Gtk2)</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>gtkButtonOrder</cstring>
</property>
@@ -781,45 +2066,24 @@
<string>Gtk button order</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3">
+ <spacer row="5" column="2">
<property name="name">
- <cstring>mapKdeIcons</cstring>
- </property>
- <property name="text">
- <string>Map KDE icons (Gtk2 only)</string>
- </property>
- </widget>
- <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3">
- <property name="name">
- <cstring>fixParentlessDialogs</cstring>
- </property>
- <property name="text">
- <string>'Fix' parentless dialogs</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>&lt;h2&gt;&lt;font color="#ff0000"&gt;Warning: Experimental!&lt;/font&gt;&lt;/h1&gt;&lt;p&gt;&lt;p&gt;Some applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have no 'parent'. This causes the dialog to recieve an entry in the taskbar, and allows the dialog to be minimised independantly of the main application window.&lt;/p&gt;
-
-&lt;p&gt;If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.&lt;/p&gt;
-
-&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This may brake some applications, as it wiill alter the behaviour of dialogs in a way the application has not intended. Therefore, please use with care.&lt;/p&gt;</string>
+ <cstring>spacer7</cstring>
</property>
- </widget>
- <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3">
- <property name="name">
- <cstring>inactiveHighlight</cstring>
+ <property name="orientation">
+ <enum>Vertical</enum>
</property>
- <property name="text">
- <string>Use blended background/highlight colour for highlight of inactive elements</string>
+ <property name="sizeType">
+ <enum>Expanding</enum>
</property>
- <property name="whatsThis" stdset="0">
- <string>&lt;h2&gt;&lt;font color="#ff0000"&gt;Warning: Experimental!&lt;/font&gt;&lt;/h1&gt;&lt;p&gt;&lt;p&gt;Some applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have no 'parent'. This causes the dialog to recieve an entry in the taskbar, and allows the dialog to be minimised independantly of the main application window.&lt;/p&gt;
-
-&lt;p&gt;If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.&lt;/p&gt;
-
-&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This may brake some applications, as it wiill alter the behaviour of dialogs in a way the application has not intended. Therefore, please use with care.&lt;/p&gt;</string>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>381</height>
+ </size>
</property>
- </widget>
- <widget class="QLabel" row="6" column="0">
+ </spacer>
+ <widget class="QLabel" row="4" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -827,7 +2091,7 @@
<string>Character to use for password entries:</string>
</property>
</widget>
- <widget class="QPushButton" row="6" column="1">
+ <widget class="QPushButton" row="4" column="1">
<property name="name">
<cstring>passwordChar</cstring>
</property>
@@ -843,118 +2107,573 @@
<string></string>
</property>
</widget>
- <spacer row="6" column="2">
+ <widget class="QCheckBox" row="3" column="0">
<property name="name">
- <cstring>spacer8</cstring>
+ <cstring>stdBtnSizes</cstring>
</property>
- <property name="orientation">
- <enum>Horizontal</enum>
+ <property name="text">
+ <string>Don't make 'auto-default' buttons larger (KDE4)</string>
</property>
- <property name="sizeType">
- <enum>Expanding</enum>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>16</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="0">
+ <property name="name">
+ <cstring>gradCombo</cstring>
</property>
- <property name="sizeHint">
- <size>
- <width>133</width>
- <height>6</height>
- </size>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox3</cstring>
</property>
- </spacer>
- <widget class="QLabel" row="7" column="0">
+ <property name="title">
+ <string>Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="2" column="0">
+ <property name="name">
+ <cstring>gradBorder</cstring>
+ </property>
+ </widget>
+ <widget class="QListView" row="0" column="0" rowspan="2" colspan="1">
+ <column>
+ <property name="text">
+ <string>Position (%)</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Value (%)</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>gradStops</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="1" column="1">
+ <property name="name">
+ <cstring>groupBox6</cstring>
+ </property>
+ <property name="title">
+ <string>Gradient Stop</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="2" column="2">
+ <property name="name">
+ <cstring>addButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="2" column="3">
+ <property name="name">
+ <cstring>updateButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="2" column="4">
+ <property name="name">
+ <cstring>removeButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2_3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Value:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_11</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Position:</string>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="0" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>stopPosition</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="1" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>stopValue</cstring>
+ </property>
+ <property name="maxValue">
+ <number>200</number>
+ </property>
+ <property name="suffix">
+ <string>%</string>
+ </property>
+ </widget>
+ <spacer row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>160</width>
+ <height>8</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>textLabel1_9</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;i&gt;&lt;b&gt;NOTE: &lt;/b&gt;&lt;br&gt;
+
+&lt;u&gt;Position&lt;/u&gt; has a range of 0% to 100% - 0% being top/left, and 100% being bottom/right.&lt;br&gt;
+
+&lt;u&gt;Value&lt;/u&gt; has a range of 0% to 200%. A value of 120% implies lightening by 20%, and a value of 80% implies darkening by 20%&lt;/i&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignTop</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
<property name="name">
- <cstring>textLabel1_5</cstring>
+ <cstring>groupBox4</cstring>
</property>
- <property name="text">
- <string>Shading routine:</string>
+ <property name="title">
+ <string>Preview</string>
</property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QFrame">
+ <property name="name">
+ <cstring>previewWidgetContainer</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>previewColor</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
</widget>
- <widget class="QComboBox" row="7" column="1" rowspan="1" colspan="2">
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>17</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="1">
<property name="name">
<cstring>shading</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
- <spacer row="8" column="2">
+ <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>spacer7</cstring>
+ <cstring>customShading</cstring>
</property>
- <property name="orientation">
- <enum>Vertical</enum>
+ <property name="title">
+ <string>Use Custom Values</string>
</property>
- <property name="sizeType">
- <enum>Expanding</enum>
+ <property name="checkable">
+ <bool>true</bool>
</property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>203</height>
- </size>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="6" column="0">
+ <property name="name">
+ <cstring>spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>4</width>
+ <height>15</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="2" column="0">
+ <property name="name">
+ <cstring>shade2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="3" column="0">
+ <property name="name">
+ <cstring>shade3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="1" column="0">
+ <property name="name">
+ <cstring>shade1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="4" column="0">
+ <property name="name">
+ <cstring>shade4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="5" column="0">
+ <property name="name">
+ <cstring>shade5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>shade0</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1" rowspan="7" colspan="1">
+ <property name="name">
+ <cstring>textLabel1_10</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;i&gt;QtCurve uses various hard-coded shading values to draw elements such as button frames, the background for pressed buttons, etc. The following is a brief overview of how each shade is used - use this as a guide only, as shades are used for various things.&lt;br&gt;
+
+1 Is used for the light part of 3d elements - such as the border of tab widgets.&lt;br&gt;
+2 Is used for the lighter shade of striped progressbars.&lt;br&gt;
+3 Is used for the dark part of 3d elements - such as the border of tab widgets.&lt;br&gt;
+4 Is used for the shaded border of checks and radios, toolbar borders (when set to dark), the dark part of sunken/raised slider handles, etc.&lt;br&gt;
+5 Is used for the background of pressed widgets, and the border of toolbars (when not dark).&lt;br&gt;
+6 Is used as the border of most widgets.&lt;/i&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignTop</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_5</cstring>
</property>
- </spacer>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Shading routine:</string>
+ </property>
+ </widget>
</grid>
</widget>
</widget>
- <spacer row="3" column="0">
- <property name="name">
- <cstring>spacer6_2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>321</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="KPushButton" row="3" column="1">
- <property name="name">
- <cstring>optionBtn</cstring>
- </property>
- <property name="text">
- <string>Options</string>
- </property>
- </widget>
</grid>
</widget>
+<connections>
+ <connection>
+ <sender>framelessGroupBoxes</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupBoxLine</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>flatSbarButtons</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>sbarBgndAppearance</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>fillSlider</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>sliderFill</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>flatSbarButtons</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>thinSbarGroove</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
<tabstops>
- <tabstop>optionsTab</tabstop>
+ <tabstop>stackList</tabstop>
<tabstop>appearance</tabstop>
+ <tabstop>sunkenAppearance</tabstop>
<tabstop>round</tabstop>
<tabstop>buttonEffect</tabstop>
+ <tabstop>focus</tabstop>
+ <tabstop>drawStatusBarFrames</tabstop>
+ <tabstop>framelessGroupBoxes</tabstop>
+ <tabstop>groupBoxLine</tabstop>
+ <tabstop>vArrows</tabstop>
+ <tabstop>stdSidebarButtons</tabstop>
+ <tabstop>darkerBorders</tabstop>
+ <tabstop>fadeLines</tabstop>
+ <tabstop>thinnerBtns</tabstop>
+ <tabstop>etchEntry</tabstop>
+ <tabstop>comboSplitter</tabstop>
+ <tabstop>unifyCombo</tabstop>
+ <tabstop>gtkComboMenus</tabstop>
+ <tabstop>doubleGtkComboArrow</tabstop>
+ <tabstop>comboBtn</tabstop>
+ <tabstop>customComboBtnColor</tabstop>
+ <tabstop>unifySpinBtns</tabstop>
+ <tabstop>unifySpin</tabstop>
<tabstop>splitters</tabstop>
+ <tabstop>splitterHighlight</tabstop>
<tabstop>sliderAppearance</tabstop>
<tabstop>shadeSliders</tabstop>
<tabstop>customSlidersColor</tabstop>
+ <tabstop>colorSliderMouseOver</tabstop>
<tabstop>sliderStyle</tabstop>
<tabstop>fillSlider</tabstop>
+ <tabstop>sliderFill</tabstop>
+ <tabstop>grooveAppearance</tabstop>
+ <tabstop>thinSbarGroove</tabstop>
<tabstop>scrollbarType</tabstop>
+ <tabstop>flatSbarButtons</tabstop>
+ <tabstop>sbarBgndAppearance</tabstop>
<tabstop>sliderThumbs</tabstop>
<tabstop>progressAppearance</tabstop>
- <tabstop>gradientPbGroove</tabstop>
<tabstop>stripedProgress</tabstop>
<tabstop>animatedProgress</tabstop>
+ <tabstop>fillProgress</tabstop>
+ <tabstop>progressGrooveAppearance</tabstop>
+ <tabstop>progressGrooveColor</tabstop>
<tabstop>embolden</tabstop>
<tabstop>defBtnIndicator</tabstop>
<tabstop>coloredMouseOver</tabstop>
<tabstop>highlightFactor</tabstop>
<tabstop>lvAppearance</tabstop>
+ <tabstop>lvButton</tabstop>
+ <tabstop>sortedLv</tabstop>
+ <tabstop>customSortedLvColor</tabstop>
+ <tabstop>forceAlternateLvCols</tabstop>
+ <tabstop>selectionAppearance</tabstop>
+ <tabstop>squareLvSelection</tabstop>
<tabstop>lvLines</tabstop>
- <tabstop>tabAppearance</tabstop>
+ <tabstop>gtkScrollViews</tabstop>
+ <tabstop>highlightScrollViews</tabstop>
+ <tabstop>squareScrollViews</tabstop>
+ <tabstop>activeTabAppearance</tabstop>
<tabstop>highlightTab</tabstop>
<tabstop>colorSelTab</tabstop>
+ <tabstop>tabAppearance</tabstop>
+ <tabstop>tabMouseOver</tabstop>
+ <tabstop>roundAllTabs</tabstop>
+ <tabstop>borderTab</tabstop>
+ <tabstop>borderInactiveTab</tabstop>
+ <tabstop>invertBotTab</tabstop>
+ <tabstop>tabBgnd</tabstop>
<tabstop>shadeCheckRadio</tabstop>
<tabstop>customCheckRadioColor</tabstop>
<tabstop>xCheck</tabstop>
- <tabstop>stdFocus</tabstop>
- <tabstop>vArrows</tabstop>
- <tabstop>drawStatusBarFrames</tabstop>
- <tabstop>stdSidebarButtons</tabstop>
- <tabstop>framelessGroupBoxes</tabstop>
- <tabstop>darkerBorders</tabstop>
+ <tabstop>smallRadio</tabstop>
+ <tabstop>crHighlight</tabstop>
+ <tabstop>crButton</tabstop>
+ <tabstop>crColor</tabstop>
+ <tabstop>titlebarAppearance</tabstop>
+ <tabstop>inactiveTitlebarAppearance</tabstop>
+ <tabstop>titlebarButtonAppearance</tabstop>
+ <tabstop>titlebarAlignment</tabstop>
+ <tabstop>colorTitlebarOnly</tabstop>
+ <tabstop>titlebarBorder</tabstop>
<tabstop>toolbarBorders</tabstop>
<tabstop>handles</tabstop>
<tabstop>menubarAppearance</tabstop>
@@ -965,32 +2684,93 @@
<tabstop>customMenuNormTextColor</tabstop>
<tabstop>customMenuSelTextColor</tabstop>
<tabstop>menubarMouseOver</tabstop>
+ <tabstop>colorMenubarMouseOver</tabstop>
<tabstop>roundMbTopOnly</tabstop>
<tabstop>menuitemAppearance</tabstop>
<tabstop>borderMenuitems</tabstop>
+ <tabstop>menuIcons</tabstop>
+ <tabstop>useHighlightForMenu</tabstop>
<tabstop>lighterPopupMenuBgnd</tabstop>
+ <tabstop>menuBgndAppearance</tabstop>
+ <tabstop>menuBgndGrad</tabstop>
+ <tabstop>menuDelay</tabstop>
<tabstop>thinnerMenuItems</tabstop>
+ <tabstop>menuStripe</tabstop>
+ <tabstop>customMenuStripeColor</tabstop>
+ <tabstop>menuStripeAppearance</tabstop>
+ <tabstop>popupBorder</tabstop>
<tabstop>toolbarAppearance</tabstop>
<tabstop>toolbarSeparators</tabstop>
- <tabstop>gtkComboMenus</tabstop>
- <tabstop>gtkScrollViews</tabstop>
+ <tabstop>dwtAppearance</tabstop>
<tabstop>gtkButtonOrder</tabstop>
<tabstop>mapKdeIcons</tabstop>
<tabstop>fixParentlessDialogs</tabstop>
- <tabstop>inactiveHighlight</tabstop>
+ <tabstop>stdBtnSizes</tabstop>
<tabstop>passwordChar</tabstop>
+ <tabstop>gradCombo</tabstop>
+ <tabstop>gradStops</tabstop>
+ <tabstop>gradBorder</tabstop>
+ <tabstop>stopPosition</tabstop>
+ <tabstop>stopValue</tabstop>
+ <tabstop>addButton</tabstop>
+ <tabstop>updateButton</tabstop>
+ <tabstop>removeButton</tabstop>
+ <tabstop>previewColor</tabstop>
<tabstop>shading</tabstop>
+ <tabstop>shade0</tabstop>
+ <tabstop>shade1</tabstop>
+ <tabstop>shade2</tabstop>
+ <tabstop>shade3</tabstop>
+ <tabstop>shade4</tabstop>
+ <tabstop>shade5</tabstop>
<tabstop>optionBtn</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
<includehint>kcolorbutton.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
<includehint>kcolorbutton.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>kcolorbutton.h</includehint>
<includehint>kcolorbutton.h</includehint>
<includehint>kcolorbutton.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
</includehints>
</UI>
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..e76a565
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,25 @@
+find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
+
+if(NOT GETTEXT_MSGFMT_EXECUTABLE)
+ message("------\n"
+ "NOTE: msgfmt not found. Translations will *not* be installed\n"
+ "------\n")
+else(NOT GETTEXT_MSGFMT_EXECUTABLE)
+ set(catalogname qtcurve)
+ add_custom_target(translations ALL)
+ file(GLOB PO_FILES *.po)
+ foreach(_poFile ${PO_FILES})
+ get_filename_component(_poFileName ${_poFile} NAME)
+ string(REGEX REPLACE "^${catalogname}_?" "" _langCode ${_poFileName} )
+ string(REGEX REPLACE "\\.po$" "" _langCode ${_langCode} )
+ if(_langCode)
+ get_filename_component(_lang ${_poFile} NAME_WE)
+ set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
+ add_custom_command(TARGET translations
+ COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --check -o ${_gmoFile} ${_poFile}
+ DEPENDS ${_poFile})
+ install(FILES ${_gmoFile} DESTINATION ${KDE3_LOCALE_PREFIX}/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo)
+ endif( _langCode )
+ endforeach(_poFile ${PO_FILES})
+endif(NOT GETTEXT_MSGFMT_EXECUTABLE)
+
diff --git a/po/generate.sh b/po/generate.sh
new file mode 100755
index 0000000..cf25955
--- /dev/null
+++ b/po/generate.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+BASEDIR=".." # root of translatable sources
+PROJECT="qtcurve" # project name
+BUGADDR="http://sourceforge.net/tracker/?group_id=50231&atid=459007" # MSGID-Bugs
+WDIR=`pwd` # working dir
+echo "Preparing rc files"
+cd ${BASEDIR}
+# we use simple sorting to make sure the lines do not jump around too much from system to system
+find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
+xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.cpp
+# additional string for KAboutData
+echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp
+echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp
+cd ${WDIR}
+echo "Done preparing rc files"
+
+echo "Extracting messages"
+cd ${BASEDIR}
+# see above on sorting
+find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list
+echo "rc.cpp" >> ${WDIR}/infiles.list
+cd ${WDIR}
+xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
+ -kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
+ --msgid-bugs-address="${BUGADDR}" \
+ --files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; }
+
+#Fix charset...
+cat ${PROJECT}.pot | sed s^charset=CHARSET^charset=UTF-8^g > ${PROJECT}.pot-new
+mv ${PROJECT}.pot-new ${PROJECT}.pot
+
+echo "Done extracting messages"
+
+echo "Merging translations"
+catalogs=`find . -name '*.po'`
+for cat in $catalogs; do
+ echo $cat
+ msgmerge -o $cat.new $cat ${PROJECT}.pot
+ mv $cat.new $cat
+done
+echo "Done merging translations"
+
+echo "Cleaning up"
+cd ${WDIR}
+rm rcfiles.list
+rm infiles.list
+rm rc.cpp
+echo "Done"
diff --git a/po/qtcurve.pot b/po/qtcurve.pot
new file mode 100644
index 0000000..b9dbc98
--- /dev/null
+++ b/po/qtcurve.pot
@@ -0,0 +1,1423 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?"
+"group_id=50231&atid=459007\n"
+"POT-Creation-Date: 2010-03-18 20:31+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: config/exportthemedialog.cpp:34
+msgid "Export Theme"
+msgstr ""
+
+#: config/exportthemedialog.cpp:40
+msgid "Name:"
+msgstr ""
+
+#: config/exportthemedialog.cpp:41
+msgid "Comment:"
+msgstr ""
+
+#: config/exportthemedialog.cpp:42
+msgid "Destination folder:"
+msgstr ""
+
+#: config/exportthemedialog.cpp:44
+msgid "QtCurve based theme"
+msgstr ""
+
+#: config/exportthemedialog.cpp:64
+msgid "Name is empty!"
+msgstr ""
+
+#: config/exportthemedialog.cpp:86
+msgid ""
+"Succesfully created:\n"
+"%1"
+msgstr ""
+
+#: config/exportthemedialog.cpp:89
+msgid "Failed to create file: %1"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:146
+msgid "Select Password Character"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:696
+#. i18n: ectx: property (text), widget (QLabel)
+#: config/qtcurveconfig.cpp:358 po/rc.cpp:128 rc.cpp:128
+msgid "Background"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:362
+msgid "Button"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:365
+msgid "Text"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:369 config/qtcurveconfig.cpp:411
+#: config/qtcurveconfig.cpp:464 config/qtcurveconfig.cpp:552
+msgid "None"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:373
+msgid "Custom:"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:374
+msgid "Selected background"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:377
+msgid "Blended selected background"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:378
+msgid "Menu background"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:378 config/qtcurveconfig.cpp:430
+msgid "Darken"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:385 config/qtcurveconfig.cpp:1237
+msgid "Custom gradient %1"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:712
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: config/qtcurveconfig.cpp:387 po/rc.cpp:134 rc.cpp:134
+msgid "Flat"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:388
+msgid "Raised"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:389
+msgid "Dull glass"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:390
+msgid "Shiny glass"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:391
+msgid "Agua"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:392
+msgid "Soft gradient"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:393
+msgid "Standard gradient"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:394
+msgid "Harsh gradient"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:395
+msgid "Inverted gradient"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:396
+msgid "Dark inverted gradient"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:399
+msgid "Split gradient"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:402
+msgid "Bevelled"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:404
+msgid "Fade out (popup menuitems)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:412
+msgid "Sunken lines"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:413
+msgid "Flat lines"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:414
+msgid "Dots"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:417
+msgid "Single dot (KDE4 & Gtk2 Only)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:419
+msgid "Dashes"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:425
+msgid "Corner indicator"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:426
+msgid "Font color thin border"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:427
+msgid "Selected background thick border"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:428
+msgid "Selected background tinting"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:429
+msgid "A slight glow"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:431
+msgid "Use selected background color"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:432
+msgid "No indicator"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:437
+msgid "KDE"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:438
+msgid "MS Windows"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:439
+msgid "Platinum"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:440
+msgid "NeXT"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:441
+msgid "No buttons"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:446
+msgid "Square"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:447
+msgid "Slightly rounded"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:448
+msgid "Fully rounded"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:449
+msgid "Extra rounded (KDE4 & Gtk2)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:450
+msgid "Max rounded (KDE4 & Gtk2)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:455
+msgid "No coloration"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:456
+msgid "Color border"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:457
+msgid "Thick color border"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:458
+msgid "Plastik style"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:459
+msgid "Glow"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:465
+msgid "Light"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:466
+msgid "Dark"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:467
+msgid "Light (all sides)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:468
+msgid "Dark (all sides)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:473 config/qtcurveconfig.cpp:488
+#: config/qtcurveconfig.cpp:496
+msgid "Plain"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:474
+msgid "Etched"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:475
+msgid "Shadowed"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:480
+msgid "Simple"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:481
+msgid "Use HSL color space"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:482
+msgid "Use HSV color space"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:483
+msgid "Use HCY color space"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:489
+msgid "Stripes"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:490
+msgid "Diagonal stripes"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:491
+msgid "Faded stripes"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:497
+msgid "Round"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:498
+msgid "Plain - rotated"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:499
+msgid "Round - rotated"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:500
+msgid "Triangular"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:501
+msgid "Circular"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:506
+msgid "Base color"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:507
+msgid "Background color"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:508
+msgid "Darkened background color"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:513
+msgid "Standard (dotted)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:514
+msgid "Highlight color"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:515
+msgid "Highlight color (full size)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:516
+msgid "Highlight color, full, and fill (Gtk2 & KDE4 only)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:517
+msgid "Line drawn with highlight color"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:877
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: config/qtcurveconfig.cpp:522 po/rc.cpp:170 rc.cpp:170
+msgid "No border"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:523
+msgid "Light border"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:524
+msgid "3D border (light only)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:525
+msgid "3D border (dark and light)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:526
+msgid "Shine"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:531
+msgid "Left"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:532
+msgid "Center (between controls)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:533
+msgid "Center (full width)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:534
+msgid "Right"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:539
+msgid "Highlight on top"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:540
+msgid "Highlight on bottom"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:541
+msgid "Add a slight glow"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:546
+msgid "Top to bottom"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:547
+msgid "Left to right"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:553
+msgid "New style (KDE and Gtk2 similar)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:554
+msgid "Old style (KDE and Gtk2 different)"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:631
+msgid " pixels"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:768
+msgid "Predefined Style"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:770
+msgid "Import..."
+msgstr ""
+
+#: config/qtcurveconfig.cpp:771
+msgid "Export..."
+msgstr ""
+
+#: config/qtcurveconfig.cpp:774
+msgid "Export Theme..."
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1009
+msgid "General"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1010
+msgid "Combos"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1011
+msgid "Spin Buttons"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1012
+msgid "Splitters"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1013
+msgid "Sliders and Scrollbars"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1014
+msgid "Progressbars"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1015
+msgid "Default Button"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1016
+msgid "Mouse-over"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1017
+msgid "Listviews"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1018
+msgid "Scrollviews"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1019
+msgid "Tabs"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1020
+msgid "Checks and Radios"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1021
+msgid "Windows"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1022
+msgid "Menus and Toolbars"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1023
+msgid "Dock windows"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1024
+msgid "Advanced Settings"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1025
+msgid "Custom Gradients"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1026
+msgid "Custom Shades"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1250
+msgid "Add"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1251
+msgid "Remove"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1252
+msgid "Update"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1362 config/qtcurveconfig.cpp:1372
+msgid "*"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:1388
+msgid ""
+"Could not write to file:\n"
+"%1"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:16
+#. i18n: ectx: property (caption), widget (QWidget)
+#: po/rc.cpp:3 rc.cpp:3
+msgid "Form1"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:38
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:6 rc.cpp:6
+msgid "title"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:47
+#. i18n: ectx: property (text), widget (QListView)
+#: po/rc.cpp:9 rc.cpp:9
+msgid "Category"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:79
+#. i18n: ectx: property (text), widget (KPushButton)
+#: po/rc.cpp:12 rc.cpp:12
+msgid "Options"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:102
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:15 rc.cpp:15
+msgid ""
+"The setting here affects the general appearance - and will be applied to "
+"buttons, combo boxes, and spin buttons."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:110
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:559
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1687
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:110
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:559
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1687
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:18 po/rc.cpp:103 po/rc.cpp:318 rc.cpp:18 rc.cpp:103 rc.cpp:318
+msgid "Appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:135
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:21 rc.cpp:21
+msgid "Focus rectangle:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:143
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:24 rc.cpp:24
+msgid "Button effect:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:156
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:27 rc.cpp:27
+msgid "Darker borders"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:164
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:30 rc.cpp:30
+msgid "Standard buttons for sidebars"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:167
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:33 rc.cpp:33
+msgid ""
+"Select this to have the sidebar buttons in konqueror, kate, kaffeine, "
+"ktorrent, drawn as per normal buttons - otherwise they will be drawn in a "
+"more flat style."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:180
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:36 rc.cpp:36
+msgid "Roundedness:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:188
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:39 rc.cpp:39
+msgid "'V' style arrows"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:224
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:42 rc.cpp:42
+msgid "Frameless groupboxes,"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:240
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:45 rc.cpp:45
+msgid "draw line after title (KDE4 && Gtk2)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:250
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:48 rc.cpp:48
+msgid "Draw statusbar frames"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:263
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:51 rc.cpp:51
+msgid "Sunken appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:271
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:54 rc.cpp:54
+msgid "Draw fading lines (KDE4 && Gtk2)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:282
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:58 rc.cpp:58
+msgid "Thinner buttons when etched/shadowed"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:310
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:62 rc.cpp:62
+msgid "Etch entries and scrollviews when button effect set to etched/shadowed."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:331
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:65 rc.cpp:65
+msgid "Draw splitter"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:334
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:68 rc.cpp:68
+msgid ""
+"This option controls whether a line is drawn near non-editable combo box "
+"arrows."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:342
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:71 rc.cpp:71
+msgid "Draw arrow of editable combos within edit field"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:384
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:74 rc.cpp:74
+msgid "Button shade:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:405
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:78 rc.cpp:78
+msgid "Gtk style comboboxes (KDE4)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:408
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:81 rc.cpp:81
+msgid ""
+"In Gtk, the list that is attached to a combo-box appears in the same style "
+"as a popup-menu. KDE4 has the ability to mimic this look."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:416
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:84 rc.cpp:84
+msgid "Double arrows for Gtk style comboboxes"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:437
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:87 rc.cpp:87
+msgid "Combine both buttons"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:445
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:90 rc.cpp:90
+msgid "Draw arrows within edit field"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:483
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:93 rc.cpp:93
+msgid "Markings:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:508
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:996
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1272
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1337
+#. i18n: ectx: property (prefix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1469
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1892
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2286
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2297
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:508
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:996
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1272
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1337
+#. i18n: ectx: property (prefix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1469
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1892
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2286
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2297
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#: po/rc.cpp:97 po/rc.cpp:193 po/rc.cpp:240 po/rc.cpp:259 po/rc.cpp:285
+#: po/rc.cpp:367 po/rc.cpp:433 po/rc.cpp:437 rc.cpp:97 rc.cpp:193 rc.cpp:240
+#: rc.cpp:259 rc.cpp:285 rc.cpp:367 rc.cpp:433 rc.cpp:437
+#, no-c-format
+msgid "%"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:538
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1477
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:538
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1477
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:100 po/rc.cpp:288 rc.cpp:100 rc.cpp:288
+msgid "Background mouse-over highlight:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:567
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:988
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1395
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1754
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:567
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:988
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1395
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1754
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:106 po/rc.cpp:189 po/rc.cpp:269 po/rc.cpp:330 rc.cpp:106
+#: rc.cpp:189 rc.cpp:269 rc.cpp:330
+msgid "Coloration:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:583
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:109 rc.cpp:109
+msgid "This color setting affects both scrollbar sliders, and other sliders."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:616
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#. i18n: file: config/qtcurveconfigbase.ui:704
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#. i18n: file: config/qtcurveconfigbase.ui:616
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#. i18n: file: config/qtcurveconfigbase.ui:704
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:113 po/rc.cpp:131 rc.cpp:113 rc.cpp:131
+msgid ""
+"This appearance setting affects both scrollbar sliders, and other sliders."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:664
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:116 rc.cpp:116
+msgid "Style:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:672
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:119 rc.cpp:119
+msgid "Slider thumbs:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:680
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:122 rc.cpp:122
+msgid "Slider width:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:688
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:125 rc.cpp:125
+msgid "Fill used part of groove:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:720
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:137 rc.cpp:137
+msgid ""
+"This setting only affects standard sliders - i.e. not scrollbar sliders. "
+"'Triangular' is a very similar style to plastik's sliders."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:728
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:140 rc.cpp:140
+msgid "Groove appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:736
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:143 rc.cpp:143
+msgid "Thin scrollbar groove"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:744
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:146 rc.cpp:146
+msgid "Scrollbar buttons:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:766
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:149 rc.cpp:149
+msgid ""
+"This controls the position, and number, of buttons on a scrollbar.\n"
+"\n"
+"KDE - 1 button at the top/left, and two at the bottom/right\n"
+"Windows - 1 botton at each end\n"
+"Platinum - no buttons at the top/left, two at bottom/right\n"
+"Next - two buttons at the top/left, none at bottom/right\n"
+"None - no buttons, only the slider"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:787
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:158 rc.cpp:158
+msgid "Color only on mouse-over"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:818
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:161 rc.cpp:161
+msgid "Animated"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:843
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:164 rc.cpp:164
+msgid "Groove:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:851
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:167 rc.cpp:167
+msgid "Bar:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:880
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:173 rc.cpp:173
+msgid ""
+"Enable this option to remove the 1 pixel border around the filled element."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:914
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:176 rc.cpp:176
+msgid "Indicate with:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:922
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:179 rc.cpp:179
+msgid "Embolden text"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:977
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:182 rc.cpp:182
+msgid "Highlight by:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:980
+#. i18n: ectx: property (whatsThis), widget (QLabel)
+#: po/rc.cpp:186 rc.cpp:186
+#, no-c-format
+msgid ""
+"This controls the % that widgets will be highlighted by when the mouse "
+"hovers over them"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1064
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:196 rc.cpp:196
+msgid "Button color"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1072
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:199 rc.cpp:199
+msgid "Header appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1085
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:202 rc.cpp:202
+msgid "Shade header of sorted column:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1109
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:206 rc.cpp:206
+msgid "Selection appearance (KDE4 && Gtk2):"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1139
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:209 rc.cpp:209
+msgid "Force alternate colors"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1147
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:212 rc.cpp:212
+msgid "Lines between items:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1160
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:215 rc.cpp:215
+msgid "Square selection"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1181
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:218 rc.cpp:218
+msgid "Scrollbars on the outside"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1189
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:221 rc.cpp:221
+msgid "Highlight on focus (KDE)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1197
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:224 rc.cpp:224
+msgid ""
+"Always draw with a square frame - regardless of the general round setting."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1235
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:227 rc.cpp:227
+msgid "Active tab appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1243
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:230 rc.cpp:230
+msgid "Inactive tab appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1261
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:233 rc.cpp:233
+msgid "Highlight"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1264
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:236 rc.cpp:236
+msgid "This will cause a coloured stripe to be drawn over the current tab."
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1275
+#. i18n: ectx: property (prefix), widget (KIntNumInput)
+#: po/rc.cpp:243 rc.cpp:243
+msgid "Tint by "
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1283
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:246 rc.cpp:246
+msgid "Mouse-over:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1296
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:249 rc.cpp:249
+msgid "Round all tabs"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1304
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:252 rc.cpp:252
+msgid "Draw a light border around tab widget"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1312
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:255 rc.cpp:255
+msgid "Draw inner border of inactive tabs"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1345
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:262 rc.cpp:262
+msgid "Alter background by:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1353
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:265 rc.cpp:265
+msgid "Invert shade of bottom tabs"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1403
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:272 rc.cpp:272
+msgid "'X' style checkmarks"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1445
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:275 rc.cpp:275
+msgid "Button like"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1453
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:278 rc.cpp:278
+msgid "Small radio 'dot'"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1461
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:281 rc.cpp:281
+msgid "Color when selected"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1515
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:291 rc.cpp:291
+msgid "Button Appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1533
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1541
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1533
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1541
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:294 po/rc.cpp:297 rc.cpp:294 rc.cpp:297
+msgid "Titlebar Appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1554
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:300 rc.cpp:300
+msgid "Text alignment:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1567
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:303 rc.cpp:303
+msgid "Color titlebar only (KDE4)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1592
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:306 rc.cpp:306
+msgid "Light border (KDE4)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1613
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:309 rc.cpp:309
+msgid "Handles:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1621
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:312 rc.cpp:312
+msgid "Border:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1673
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:315 rc.cpp:315
+msgid "Toolbars"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1700
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:321 rc.cpp:321
+msgid "Separators:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1732
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:324 rc.cpp:324
+msgid "Menus"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1746
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:327 rc.cpp:327
+msgid "Apply coloration to active window only"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1762
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:333 rc.cpp:333
+msgid "Menubar appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1770
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:336 rc.cpp:336
+msgid "Menuitem appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1778
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:339 rc.cpp:339
+msgid "Use 'highlight' color for active menuitems"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1786
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:342 rc.cpp:342
+msgid "Stripe (KDE):"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1794
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:345 rc.cpp:345
+msgid "Border popupmenus"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1802
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:348 rc.cpp:348
+msgid "Sub-menu delay:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1818
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:351 rc.cpp:351
+msgid "Color menubar items on mouse-over"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1826
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:354 rc.cpp:354
+msgid "Custom text colors (active/normal):"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1871
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:360 rc.cpp:360
+msgid "Thinner menu items"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1879
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:363 rc.cpp:363
+msgid "Popup-menu background:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1928
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:370 rc.cpp:370
+msgid "Border menuitems"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1936
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:373 rc.cpp:373
+msgid "Draw icons"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1944
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:376 rc.cpp:376
+msgid "Round selected menubar items on top only"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1960
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:380 rc.cpp:380
+msgid "Enable mouse-over for menubar items"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1983
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:383 rc.cpp:383
+msgid "Titlebar appearance:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2043
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:386 rc.cpp:386
+msgid "'Fix' parentless dialogs"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2050
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:389 rc.cpp:389
+msgid ""
+"<h2><font color=\"#ff0000\">Warning: Experimental!</font></h1><p><p>Some "
+"applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have "
+"no 'parent'. This causes the dialog to recieve an entry in the taskbar, and "
+"allows the dialog to be minimised independantly of the main application "
+"window.</p>\n"
+"\n"
+"<p>If you enable this option, QtCurve will try to 'fix' this by assigning "
+"the dialogs a parent.</p>\n"
+"\n"
+"<p><b>Note:</b> This may brake some applications, as it wiill alter the "
+"behaviour of dialogs in a way the application has not intended. Therefore, "
+"please use with care.</p>"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2058
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:396 rc.cpp:396
+msgid "Map KDE icons (Gtk2)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2066
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:399 rc.cpp:399
+msgid "Gtk button order"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2091
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:402 rc.cpp:402
+msgid "Character to use for password entries:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2115
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:406 rc.cpp:406
+msgid "Don't make 'auto-default' buttons larger (KDE4)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2141
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:409 rc.cpp:409
+msgid "Settings"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2155
+#. i18n: ectx: property (text), widget (QListView)
+#: po/rc.cpp:413 rc.cpp:413
+#, no-c-format
+msgid "Position (%)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2166
+#. i18n: ectx: property (text), widget (QListView)
+#: po/rc.cpp:417 rc.cpp:417
+#, no-c-format
+msgid "Value (%)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2192
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:420 rc.cpp:420
+msgid "Gradient Stop"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2259
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:426 rc.cpp:426
+msgid "Value:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2275
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:429 rc.cpp:429
+msgid "Position:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2336
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:441 rc.cpp:441
+#, no-c-format
+msgid ""
+"<i><b>NOTE: </b><br>\n"
+"\n"
+"<u>Position</u> has a range of 0% to 100% - 0% being top/left, and 100% "
+"being bottom/right.<br>\n"
+"\n"
+"<u>Value</u> has a range of 0% to 200%. A value of 120% implies lightening "
+"by 20%, and a value of 80% implies darkening by 20%</i>"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2349
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:448 rc.cpp:448
+msgid "Preview"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2415
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:452 rc.cpp:452
+msgid "Use Custom Values"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2539
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:455 rc.cpp:455
+msgid ""
+"<i>QtCurve uses various hard-coded shading values to draw elements such as "
+"button frames, the background for pressed buttons, etc. The following is a "
+"brief overview of how each shade is used - use this as a guide only, as "
+"shades are used for various things.<br>\n"
+"\n"
+"1 Is used for the light part of 3d elements - such as the border of tab "
+"widgets.<br>\n"
+"2 Is used for the lighter shade of striped progressbars.<br>\n"
+"3 Is used for the dark part of 3d elements - such as the border of tab "
+"widgets.<br>\n"
+"4 Is used for the shaded border of checks and radios, toolbar borders (when "
+"set to dark), the dark part of sunken/raised slider handles, etc.<br>\n"
+"5 Is used for the background of pressed widgets, and the border of toolbars "
+"(when not dark).<br>\n"
+"6 Is used as the border of most widgets.</i>"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2560
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:465 rc.cpp:465
+msgid "Shading routine:"
+msgstr ""
+
+#: po/rc.cpp:466 rc.cpp:466
+msgctxt "NAME OF TRANSLATORS"
+msgid "Your names"
+msgstr ""
+
+#: po/rc.cpp:467 rc.cpp:467
+msgctxt "EMAIL OF TRANSLATORS"
+msgid "Your emails"
+msgstr ""
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..1153fd3
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,1509 @@
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Necmettin Begiter <[email protected]>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: kde3-qtcurve\n"
+"Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?"
+"group_id=50231&atid=459007\n"
+"POT-Creation-Date: 2010-03-18 20:31+0000\n"
+"PO-Revision-Date: 2009-07-04 01:44+0300\n"
+"Last-Translator: Necmettin Begiter <[email protected]>\n"
+"Language-Team: Turkish <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 0.3\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: config/exportthemedialog.cpp:34
+msgid "Export Theme"
+msgstr "Temayı Dışarı Aktar"
+
+#: config/exportthemedialog.cpp:40
+msgid "Name:"
+msgstr "Ä°sim:"
+
+#: config/exportthemedialog.cpp:41
+msgid "Comment:"
+msgstr "Yorum:"
+
+#: config/exportthemedialog.cpp:42
+msgid "Destination folder:"
+msgstr "Hedef klasör:"
+
+#: config/exportthemedialog.cpp:44
+msgid "QtCurve based theme"
+msgstr "QtCurve tabanlı tema"
+
+#: config/exportthemedialog.cpp:64
+msgid "Name is empty!"
+msgstr "Ä°sim boÅŸ!"
+
+#: config/exportthemedialog.cpp:86
+msgid ""
+"Succesfully created:\n"
+"%1"
+msgstr ""
+"Başarıyla oluşturuldu:\n"
+"%1"
+
+#: config/exportthemedialog.cpp:89
+msgid "Failed to create file: %1"
+msgstr "Dosya oluşturulamadı: %1"
+
+#: config/qtcurveconfig.cpp:146
+msgid "Select Password Character"
+msgstr "Parola Karakterini Seç"
+
+#. i18n: file: config/qtcurveconfigbase.ui:696
+#. i18n: ectx: property (text), widget (QLabel)
+#: config/qtcurveconfig.cpp:358 po/rc.cpp:128 rc.cpp:128
+msgid "Background"
+msgstr "Arkaplan"
+
+#: config/qtcurveconfig.cpp:362
+msgid "Button"
+msgstr "Düğme"
+
+#: config/qtcurveconfig.cpp:365
+msgid "Text"
+msgstr "Metin"
+
+#: config/qtcurveconfig.cpp:369 config/qtcurveconfig.cpp:411
+#: config/qtcurveconfig.cpp:464 config/qtcurveconfig.cpp:552
+msgid "None"
+msgstr "Yok"
+
+#: config/qtcurveconfig.cpp:373
+msgid "Custom:"
+msgstr "Özel:"
+
+#: config/qtcurveconfig.cpp:374
+msgid "Selected background"
+msgstr "Seçili arkaplan"
+
+#: config/qtcurveconfig.cpp:377
+msgid "Blended selected background"
+msgstr "Seçili arkaplanla harmanlanmış"
+
+#: config/qtcurveconfig.cpp:378
+msgid "Menu background"
+msgstr "Menü arkaplanı"
+
+#: config/qtcurveconfig.cpp:378 config/qtcurveconfig.cpp:430
+msgid "Darken"
+msgstr "Karart"
+
+#: config/qtcurveconfig.cpp:385 config/qtcurveconfig.cpp:1237
+msgid "Custom gradient %1"
+msgstr "Özel eğimli %1"
+
+#. i18n: file: config/qtcurveconfigbase.ui:712
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: config/qtcurveconfig.cpp:387 po/rc.cpp:134 rc.cpp:134
+msgid "Flat"
+msgstr "Düz"
+
+#: config/qtcurveconfig.cpp:388
+msgid "Raised"
+msgstr "Yükseltilmiş"
+
+#: config/qtcurveconfig.cpp:389
+msgid "Dull glass"
+msgstr "Donuk cam"
+
+#: config/qtcurveconfig.cpp:390
+msgid "Shiny glass"
+msgstr "Parlak cam"
+
+#: config/qtcurveconfig.cpp:391
+msgid "Agua"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:392
+msgid "Soft gradient"
+msgstr "YumuÅŸak eÄŸimli"
+
+#: config/qtcurveconfig.cpp:393
+msgid "Standard gradient"
+msgstr "Standart eÄŸimli"
+
+#: config/qtcurveconfig.cpp:394
+msgid "Harsh gradient"
+msgstr "Sert eÄŸimli"
+
+#: config/qtcurveconfig.cpp:395
+msgid "Inverted gradient"
+msgstr "Ters eÄŸimli"
+
+#: config/qtcurveconfig.cpp:396
+#, fuzzy
+msgid "Dark inverted gradient"
+msgstr "Ters eÄŸimli"
+
+#: config/qtcurveconfig.cpp:399
+msgid "Split gradient"
+msgstr "Ayrık eğimli"
+
+#: config/qtcurveconfig.cpp:402
+msgid "Bevelled"
+msgstr "EÄŸik"
+
+#: config/qtcurveconfig.cpp:404
+msgid "Fade out (popup menuitems)"
+msgstr "Sön (açılır menü öğeleri)"
+
+#: config/qtcurveconfig.cpp:412
+msgid "Sunken lines"
+msgstr "Çökmüş çizgiler"
+
+#: config/qtcurveconfig.cpp:413
+msgid "Flat lines"
+msgstr "Düz çizgiler"
+
+#: config/qtcurveconfig.cpp:414
+msgid "Dots"
+msgstr "Noktalar"
+
+#: config/qtcurveconfig.cpp:417
+#, fuzzy
+msgid "Single dot (KDE4 & Gtk2 Only)"
+msgstr "En fazla yuvarlatılmış (KDE4 ve Gtk2)"
+
+#: config/qtcurveconfig.cpp:419
+msgid "Dashes"
+msgstr "Kesik çizgiler"
+
+#: config/qtcurveconfig.cpp:425
+msgid "Corner indicator"
+msgstr "Köşe belirteci"
+
+#: config/qtcurveconfig.cpp:426
+msgid "Font color thin border"
+msgstr "Font rengi, ince kenar"
+
+#: config/qtcurveconfig.cpp:427
+msgid "Selected background thick border"
+msgstr "Seçili arkaplan, kalın kenar"
+
+#: config/qtcurveconfig.cpp:428
+msgid "Selected background tinting"
+msgstr "Seçili arkaplan tonlama"
+
+#: config/qtcurveconfig.cpp:429
+msgid "A slight glow"
+msgstr "Hafif bir parlama"
+
+#: config/qtcurveconfig.cpp:431
+#, fuzzy
+msgid "Use selected background color"
+msgstr "Seçili arkaplan"
+
+#: config/qtcurveconfig.cpp:432
+msgid "No indicator"
+msgstr "Belirteç yok"
+
+#: config/qtcurveconfig.cpp:437
+msgid "KDE"
+msgstr "KDE"
+
+#: config/qtcurveconfig.cpp:438
+msgid "MS Windows"
+msgstr "MS Windows"
+
+#: config/qtcurveconfig.cpp:439
+msgid "Platinum"
+msgstr "Platin"
+
+#: config/qtcurveconfig.cpp:440
+msgid "NeXT"
+msgstr "NeXT"
+
+#: config/qtcurveconfig.cpp:441
+msgid "No buttons"
+msgstr "Düğme yok"
+
+#: config/qtcurveconfig.cpp:446
+msgid "Square"
+msgstr "Köşeli"
+
+#: config/qtcurveconfig.cpp:447
+msgid "Slightly rounded"
+msgstr "Hafif yuvarlatılmış"
+
+#: config/qtcurveconfig.cpp:448
+msgid "Fully rounded"
+msgstr "Tam yuvarlatılmış"
+
+#: config/qtcurveconfig.cpp:449
+msgid "Extra rounded (KDE4 & Gtk2)"
+msgstr "Fazladan yuvarlatılmış (KDE4 ve Gtk2)"
+
+#: config/qtcurveconfig.cpp:450
+msgid "Max rounded (KDE4 & Gtk2)"
+msgstr "En fazla yuvarlatılmış (KDE4 ve Gtk2)"
+
+#: config/qtcurveconfig.cpp:455
+msgid "No coloration"
+msgstr "Renklendirme yok"
+
+#: config/qtcurveconfig.cpp:456
+msgid "Color border"
+msgstr "Kenarlar renklendirilmiÅŸ"
+
+#: config/qtcurveconfig.cpp:457
+msgid "Thick color border"
+msgstr "Kenarlar kalın renklendirilmiş"
+
+#: config/qtcurveconfig.cpp:458
+msgid "Plastik style"
+msgstr "Plastik biçemi"
+
+#: config/qtcurveconfig.cpp:459
+msgid "Glow"
+msgstr "Parlama"
+
+#: config/qtcurveconfig.cpp:465
+msgid "Light"
+msgstr "Açık renk"
+
+#: config/qtcurveconfig.cpp:466
+msgid "Dark"
+msgstr "Koyu renk"
+
+#: config/qtcurveconfig.cpp:467
+msgid "Light (all sides)"
+msgstr "Açık renk (tüm kenarlar)"
+
+#: config/qtcurveconfig.cpp:468
+msgid "Dark (all sides)"
+msgstr "Koyu renk (tüm kenarlar)"
+
+#: config/qtcurveconfig.cpp:473 config/qtcurveconfig.cpp:488
+#: config/qtcurveconfig.cpp:496
+msgid "Plain"
+msgstr "Düz"
+
+#: config/qtcurveconfig.cpp:474
+msgid "Etched"
+msgstr "Damgalı"
+
+#: config/qtcurveconfig.cpp:475
+msgid "Shadowed"
+msgstr "Gölgeli"
+
+#: config/qtcurveconfig.cpp:480
+msgid "Simple"
+msgstr "Basit"
+
+#: config/qtcurveconfig.cpp:481
+msgid "Use HSL color space"
+msgstr "HSL renk uzayı kullan"
+
+#: config/qtcurveconfig.cpp:482
+msgid "Use HSV color space"
+msgstr "HSV renk uzayı kullan"
+
+#: config/qtcurveconfig.cpp:483
+msgid "Use HCY color space"
+msgstr "HCY renk uzayı kullan"
+
+#: config/qtcurveconfig.cpp:489
+#, fuzzy
+msgid "Stripes"
+msgstr "Çizgili"
+
+#: config/qtcurveconfig.cpp:490
+msgid "Diagonal stripes"
+msgstr "Köşegen çizgili"
+
+#: config/qtcurveconfig.cpp:491
+#, fuzzy
+msgid "Faded stripes"
+msgstr "Köşegen çizgili"
+
+#: config/qtcurveconfig.cpp:497
+msgid "Round"
+msgstr "Yuvarlak"
+
+#: config/qtcurveconfig.cpp:498
+msgid "Plain - rotated"
+msgstr "Düz - çevrilmiş"
+
+#: config/qtcurveconfig.cpp:499
+msgid "Round - rotated"
+msgstr "Yuvarlak - çevrilmiş"
+
+#: config/qtcurveconfig.cpp:500
+msgid "Triangular"
+msgstr "Üç köşeli"
+
+#: config/qtcurveconfig.cpp:501
+msgid "Circular"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:506
+msgid "Base color"
+msgstr "Taban renk"
+
+#: config/qtcurveconfig.cpp:507
+msgid "Background color"
+msgstr "Arkaplan rengi"
+
+#: config/qtcurveconfig.cpp:508
+msgid "Darkened background color"
+msgstr "Karartılmış arkaplan rengi"
+
+#: config/qtcurveconfig.cpp:513
+msgid "Standard (dotted)"
+msgstr "Standart (noktalı)"
+
+#: config/qtcurveconfig.cpp:514
+msgid "Highlight color"
+msgstr "Vurgu rengi"
+
+#: config/qtcurveconfig.cpp:515
+msgid "Highlight color (full size)"
+msgstr "Vurgu rengi (tam boyut)"
+
+#: config/qtcurveconfig.cpp:516
+msgid "Highlight color, full, and fill (Gtk2 & KDE4 only)"
+msgstr "Vurgu rengi, dolu, ve doldur (sadece Gtk2 ve KDE4)"
+
+#: config/qtcurveconfig.cpp:517
+msgid "Line drawn with highlight color"
+msgstr "Vurgu rengiyle çizilmiş çizgi"
+
+#. i18n: file: config/qtcurveconfigbase.ui:877
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: config/qtcurveconfig.cpp:522 po/rc.cpp:170 rc.cpp:170
+msgid "No border"
+msgstr "Kenarlık yok"
+
+#: config/qtcurveconfig.cpp:523
+msgid "Light border"
+msgstr "Açık renk kenarlık"
+
+#: config/qtcurveconfig.cpp:524
+msgid "3D border (light only)"
+msgstr "3B kenarlık (sadece açık renk)"
+
+#: config/qtcurveconfig.cpp:525
+msgid "3D border (dark and light)"
+msgstr "3B kenarlık (açık ve koyu renk)"
+
+#: config/qtcurveconfig.cpp:526
+msgid "Shine"
+msgstr ""
+
+#: config/qtcurveconfig.cpp:531
+msgid "Left"
+msgstr "Sol"
+
+#: config/qtcurveconfig.cpp:532
+msgid "Center (between controls)"
+msgstr "Merkez (kontroller arası)"
+
+#: config/qtcurveconfig.cpp:533
+msgid "Center (full width)"
+msgstr "Merkez (tam geniÅŸlik)"
+
+#: config/qtcurveconfig.cpp:534
+msgid "Right"
+msgstr "SaÄŸ"
+
+#: config/qtcurveconfig.cpp:539
+msgid "Highlight on top"
+msgstr "Vurgu yukarıda"
+
+#: config/qtcurveconfig.cpp:540
+msgid "Highlight on bottom"
+msgstr "Vurgu aşağıda"
+
+#: config/qtcurveconfig.cpp:541
+msgid "Add a slight glow"
+msgstr "Hafif bir parlama ekle"
+
+#: config/qtcurveconfig.cpp:546
+msgid "Top to bottom"
+msgstr "Yukarıdan aşağıya"
+
+#: config/qtcurveconfig.cpp:547
+msgid "Left to right"
+msgstr "Soldan saÄŸa"
+
+#: config/qtcurveconfig.cpp:553
+msgid "New style (KDE and Gtk2 similar)"
+msgstr "Yeni biçem (KDE ve Gtk2 benzer)"
+
+#: config/qtcurveconfig.cpp:554
+msgid "Old style (KDE and Gtk2 different)"
+msgstr "Eski biçem (KDE ve Gtk2 farklı)"
+
+#: config/qtcurveconfig.cpp:631
+msgid " pixels"
+msgstr " piksel"
+
+#: config/qtcurveconfig.cpp:768
+msgid "Predefined Style"
+msgstr "Hazır Biçem"
+
+#: config/qtcurveconfig.cpp:770
+msgid "Import..."
+msgstr "İçeri Aktar..."
+
+#: config/qtcurveconfig.cpp:771
+msgid "Export..."
+msgstr "Dışarı Aktar..."
+
+#: config/qtcurveconfig.cpp:774
+msgid "Export Theme..."
+msgstr "Temayı Dışarı Aktar..."
+
+#: config/qtcurveconfig.cpp:1009
+msgid "General"
+msgstr "Genel"
+
+#: config/qtcurveconfig.cpp:1010
+msgid "Combos"
+msgstr "BirleÅŸik Kutular"
+
+#: config/qtcurveconfig.cpp:1011
+msgid "Spin Buttons"
+msgstr "Çevirme Düğmeleri"
+
+#: config/qtcurveconfig.cpp:1012
+msgid "Splitters"
+msgstr "Ayraçlar"
+
+#: config/qtcurveconfig.cpp:1013
+msgid "Sliders and Scrollbars"
+msgstr "Sürgüler ve Kaydırma Çubukları"
+
+#: config/qtcurveconfig.cpp:1014
+msgid "Progressbars"
+msgstr "İlerleme Çubukları"
+
+#: config/qtcurveconfig.cpp:1015
+msgid "Default Button"
+msgstr "Varsayılan Düğme"
+
+#: config/qtcurveconfig.cpp:1016
+msgid "Mouse-over"
+msgstr "Fare Altında"
+
+#: config/qtcurveconfig.cpp:1017
+msgid "Listviews"
+msgstr "Listeler"
+
+#: config/qtcurveconfig.cpp:1018
+msgid "Scrollviews"
+msgstr "Kaydırma Kutuları"
+
+#: config/qtcurveconfig.cpp:1019
+msgid "Tabs"
+msgstr "Sekmeler"
+
+#: config/qtcurveconfig.cpp:1020
+msgid "Checks and Radios"
+msgstr "İşaretleme ve Seçme Kutuları"
+
+#: config/qtcurveconfig.cpp:1021
+#, fuzzy
+msgid "Windows"
+msgstr "MS Windows"
+
+#: config/qtcurveconfig.cpp:1022
+msgid "Menus and Toolbars"
+msgstr "Menüler ve Araç Çubukları"
+
+#: config/qtcurveconfig.cpp:1023
+#, fuzzy
+msgid "Dock windows"
+msgstr "MS Windows"
+
+#: config/qtcurveconfig.cpp:1024
+msgid "Advanced Settings"
+msgstr "Gelişmiş Seçenekler"
+
+#: config/qtcurveconfig.cpp:1025
+msgid "Custom Gradients"
+msgstr "Özel Eğimler"
+
+#: config/qtcurveconfig.cpp:1026
+msgid "Custom Shades"
+msgstr "Özel Gölgeler"
+
+#: config/qtcurveconfig.cpp:1250
+msgid "Add"
+msgstr "Ekle"
+
+#: config/qtcurveconfig.cpp:1251
+msgid "Remove"
+msgstr "Kaldır"
+
+#: config/qtcurveconfig.cpp:1252
+msgid "Update"
+msgstr "Güncelle"
+
+#: config/qtcurveconfig.cpp:1362 config/qtcurveconfig.cpp:1372
+msgid "*"
+msgstr "*"
+
+#: config/qtcurveconfig.cpp:1388
+msgid ""
+"Could not write to file:\n"
+"%1"
+msgstr ""
+"Dosyaya yazılamadı:\n"
+"%1"
+
+#. i18n: file: config/qtcurveconfigbase.ui:16
+#. i18n: ectx: property (caption), widget (QWidget)
+#: po/rc.cpp:3 rc.cpp:3
+msgid "Form1"
+msgstr "Form1"
+
+#. i18n: file: config/qtcurveconfigbase.ui:38
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:6 rc.cpp:6
+msgid "title"
+msgstr "başlık"
+
+#. i18n: file: config/qtcurveconfigbase.ui:47
+#. i18n: ectx: property (text), widget (QListView)
+#: po/rc.cpp:9 rc.cpp:9
+msgid "Category"
+msgstr "Kategori"
+
+#. i18n: file: config/qtcurveconfigbase.ui:79
+#. i18n: ectx: property (text), widget (KPushButton)
+#: po/rc.cpp:12 rc.cpp:12
+msgid "Options"
+msgstr "Seçenekler"
+
+#. i18n: file: config/qtcurveconfigbase.ui:102
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:15 rc.cpp:15
+msgid ""
+"The setting here affects the general appearance - and will be applied to "
+"buttons, combo boxes, and spin buttons."
+msgstr ""
+"Buradaki ayar genel görünümü etkiler ve düğmelere, birleşik kutulara ve "
+"çevirme düğmelerine uygulanır."
+
+#. i18n: file: config/qtcurveconfigbase.ui:110
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:559
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1687
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:110
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:559
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1687
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:18 po/rc.cpp:103 po/rc.cpp:318 rc.cpp:18 rc.cpp:103 rc.cpp:318
+msgid "Appearance:"
+msgstr "Görünüm:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:135
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:21 rc.cpp:21
+msgid "Focus rectangle:"
+msgstr "Odak dikdörtgeni:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:143
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:24 rc.cpp:24
+msgid "Button effect:"
+msgstr "Düğme efekti:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:156
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:27 rc.cpp:27
+msgid "Darker borders"
+msgstr "Daha koyu renk kenarlıklar"
+
+#. i18n: file: config/qtcurveconfigbase.ui:164
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:30 rc.cpp:30
+msgid "Standard buttons for sidebars"
+msgstr "Yan çubuklarda standart düğme görünümü"
+
+#. i18n: file: config/qtcurveconfigbase.ui:167
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:33 rc.cpp:33
+msgid ""
+"Select this to have the sidebar buttons in konqueror, kate, kaffeine, "
+"ktorrent, drawn as per normal buttons - otherwise they will be drawn in a "
+"more flat style."
+msgstr ""
+"Konqueror, Kate, Kaffeine ve Ktorrent'teki yan çubuk düğmeleri normalde daha "
+"düz görünür. Bu seçenekle o düğmelerin normal düğmeler gibi görünmesini "
+"saÄŸlayabilirsiniz."
+
+#. i18n: file: config/qtcurveconfigbase.ui:180
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:36 rc.cpp:36
+msgid "Roundedness:"
+msgstr "Yuvarlatılma:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:188
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:39 rc.cpp:39
+msgid "'V' style arrows"
+msgstr "'V' ÅŸeklinde oklar"
+
+#. i18n: file: config/qtcurveconfigbase.ui:224
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:42 rc.cpp:42
+msgid "Frameless groupboxes,"
+msgstr "Çerçevesiz grup kutuları,"
+
+#. i18n: file: config/qtcurveconfigbase.ui:240
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:45 rc.cpp:45
+msgid "draw line after title (KDE4 && Gtk2)"
+msgstr "başlıktan sonra çizgi çiz (KDE4 ve Gtk2)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:250
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:48 rc.cpp:48
+msgid "Draw statusbar frames"
+msgstr "Durum çubuğu çerçevesini çiz"
+
+#. i18n: file: config/qtcurveconfigbase.ui:263
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:51 rc.cpp:51
+msgid "Sunken appearance:"
+msgstr "Çökmüş görünüm:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:271
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:54 rc.cpp:54
+msgid "Draw fading lines (KDE4 && Gtk2)"
+msgstr "Solan çizgiler çiz (KDE4 ve Gtk2)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:282
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:58 rc.cpp:58
+msgid "Thinner buttons when etched/shadowed"
+msgstr "Damgalı veya gölgeli iken daha ince düğmeler"
+
+#. i18n: file: config/qtcurveconfigbase.ui:310
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:62 rc.cpp:62
+#, fuzzy
+msgid "Etch entries and scrollviews when button effect set to etched/shadowed."
+msgstr "Düğme efekti damgalı veya gölgeli olduğunda damgalı çiz."
+
+#. i18n: file: config/qtcurveconfigbase.ui:331
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:65 rc.cpp:65
+msgid "Draw splitter"
+msgstr "Ayraç çiz"
+
+#. i18n: file: config/qtcurveconfigbase.ui:334
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:68 rc.cpp:68
+msgid ""
+"This option controls whether a line is drawn near non-editable combo box "
+"arrows."
+msgstr ""
+"Bu seçenek değiştirilebilir olmayan birleşik kutu oklarının yakınında bir "
+"çizgi çizilip çizilmeyeceğini belirler."
+
+#. i18n: file: config/qtcurveconfigbase.ui:342
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:71 rc.cpp:71
+msgid "Draw arrow of editable combos within edit field"
+msgstr "Değiştirme alanı içinde değiştirilebilir birleşiklerin oklarını çiz"
+
+#. i18n: file: config/qtcurveconfigbase.ui:384
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:74 rc.cpp:74
+msgid "Button shade:"
+msgstr "Düğme gölgesi:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:405
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:78 rc.cpp:78
+msgid "Gtk style comboboxes (KDE4)"
+msgstr "Gtk biçemi birleşik kutular (KDE4)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:408
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:81 rc.cpp:81
+msgid ""
+"In Gtk, the list that is attached to a combo-box appears in the same style "
+"as a popup-menu. KDE4 has the ability to mimic this look."
+msgstr ""
+"Gtk'de birleşik bir kutuya eklenen liste açılır menü ile aynı biçimde "
+"görünür. KDE4 bu davranışı taklit edebilir."
+
+#. i18n: file: config/qtcurveconfigbase.ui:416
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:84 rc.cpp:84
+#, fuzzy
+msgid "Double arrows for Gtk style comboboxes"
+msgstr "Gtk biçemi birleşik kutular (KDE4)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:437
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:87 rc.cpp:87
+msgid "Combine both buttons"
+msgstr "İki düğmeyi birleştir"
+
+#. i18n: file: config/qtcurveconfigbase.ui:445
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:90 rc.cpp:90
+msgid "Draw arrows within edit field"
+msgstr "Değiştirme alanında okları çiz"
+
+#. i18n: file: config/qtcurveconfigbase.ui:483
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:93 rc.cpp:93
+msgid "Markings:"
+msgstr "Ä°ÅŸaretler:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:508
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:996
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1272
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1337
+#. i18n: ectx: property (prefix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1469
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1892
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2286
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2297
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:508
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:996
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1272
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1337
+#. i18n: ectx: property (prefix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1469
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:1892
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2286
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#. i18n: file: config/qtcurveconfigbase.ui:2297
+#. i18n: ectx: property (suffix), widget (KIntNumInput)
+#: po/rc.cpp:97 po/rc.cpp:193 po/rc.cpp:240 po/rc.cpp:259 po/rc.cpp:285
+#: po/rc.cpp:367 po/rc.cpp:433 po/rc.cpp:437 rc.cpp:97 rc.cpp:193 rc.cpp:240
+#: rc.cpp:259 rc.cpp:285 rc.cpp:367 rc.cpp:433 rc.cpp:437
+#, no-c-format
+msgid "%"
+msgstr "%"
+
+#. i18n: file: config/qtcurveconfigbase.ui:538
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1477
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:538
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1477
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:100 po/rc.cpp:288 rc.cpp:100 rc.cpp:288
+#, fuzzy
+msgid "Background mouse-over highlight:"
+msgstr "Metin arkaplanını vurgula"
+
+#. i18n: file: config/qtcurveconfigbase.ui:567
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:988
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1395
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1754
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:567
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:988
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1395
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1754
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:106 po/rc.cpp:189 po/rc.cpp:269 po/rc.cpp:330 rc.cpp:106
+#: rc.cpp:189 rc.cpp:269 rc.cpp:330
+msgid "Coloration:"
+msgstr "Renklendirme:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:583
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:109 rc.cpp:109
+msgid "This color setting affects both scrollbar sliders, and other sliders."
+msgstr ""
+"Bu renk ayarı hem kaydırma çubuğu sürgülerini hem diğer sürgüleri etkiler."
+
+#. i18n: file: config/qtcurveconfigbase.ui:616
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#. i18n: file: config/qtcurveconfigbase.ui:704
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#. i18n: file: config/qtcurveconfigbase.ui:616
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#. i18n: file: config/qtcurveconfigbase.ui:704
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:113 po/rc.cpp:131 rc.cpp:113 rc.cpp:131
+msgid ""
+"This appearance setting affects both scrollbar sliders, and other sliders."
+msgstr ""
+"Bu görünüm ayarı hem kaydırma çubuğu sürgülerini hem diğer sürgüleri etkiler."
+
+#. i18n: file: config/qtcurveconfigbase.ui:664
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:116 rc.cpp:116
+msgid "Style:"
+msgstr "Biçem:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:672
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:119 rc.cpp:119
+msgid "Slider thumbs:"
+msgstr "Sürgü minyatürleri:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:680
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:122 rc.cpp:122
+msgid "Slider width:"
+msgstr "Sürgü genişliği:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:688
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:125 rc.cpp:125
+msgid "Fill used part of groove:"
+msgstr "Kanalın kullanılan kısmını doldur:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:720
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:137 rc.cpp:137
+msgid ""
+"This setting only affects standard sliders - i.e. not scrollbar sliders. "
+"'Triangular' is a very similar style to plastik's sliders."
+msgstr ""
+"Bu ayar sadece standart sürgüleri etkiler, kaydırma çubuğu sürgülerini "
+"değiştirmez. 'Üç köşeli' plastik'in sürgülerine çok benzer bir biçemdir."
+
+#. i18n: file: config/qtcurveconfigbase.ui:728
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:140 rc.cpp:140
+msgid "Groove appearance:"
+msgstr "Kanal görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:736
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:143 rc.cpp:143
+msgid "Thin scrollbar groove"
+msgstr "İnce kaydırma çubuğu kanalı"
+
+#. i18n: file: config/qtcurveconfigbase.ui:744
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:146 rc.cpp:146
+msgid "Scrollbar buttons:"
+msgstr "Kaydırma çubuğu düğmeleri:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:766
+#. i18n: ectx: property (whatsThis), widget (QComboBox)
+#: po/rc.cpp:149 rc.cpp:149
+msgid ""
+"This controls the position, and number, of buttons on a scrollbar.\n"
+"\n"
+"KDE - 1 button at the top/left, and two at the bottom/right\n"
+"Windows - 1 botton at each end\n"
+"Platinum - no buttons at the top/left, two at bottom/right\n"
+"Next - two buttons at the top/left, none at bottom/right\n"
+"None - no buttons, only the slider"
+msgstr ""
+"Bu, kaydırma çubuğu üzerindeki düğmelerin konum ve adedini belirler.\n"
+"\n"
+"KDE - sol üstte bir, sağ altta iki düğme\n"
+"Windows - iki uçta da bir düğme\n"
+"Platin - sadece sağ altta iki düğme\n"
+"Next - sadece sol üstte iki düğme\n"
+"Yok - düğme yok, sadece sürgü"
+
+#. i18n: file: config/qtcurveconfigbase.ui:787
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:158 rc.cpp:158
+msgid "Color only on mouse-over"
+msgstr "Sadece fare altındayken renklendir"
+
+#. i18n: file: config/qtcurveconfigbase.ui:818
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:161 rc.cpp:161
+msgid "Animated"
+msgstr "Hareketli"
+
+#. i18n: file: config/qtcurveconfigbase.ui:843
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:164 rc.cpp:164
+msgid "Groove:"
+msgstr "Kanal:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:851
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:167 rc.cpp:167
+msgid "Bar:"
+msgstr "Çubuk:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:880
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:173 rc.cpp:173
+msgid ""
+"Enable this option to remove the 1 pixel border around the filled element."
+msgstr ""
+"Doldurulan öğenin etrafındaki bir piksellik kenarlığı kaldırmak için bu "
+"seçeneği açın."
+
+#. i18n: file: config/qtcurveconfigbase.ui:914
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:176 rc.cpp:176
+msgid "Indicate with:"
+msgstr "Belirteç:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:922
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:179 rc.cpp:179
+msgid "Embolden text"
+msgstr "Metni kalınlaştır"
+
+#. i18n: file: config/qtcurveconfigbase.ui:977
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:182 rc.cpp:182
+msgid "Highlight by:"
+msgstr "Vurgulama biçimi:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:980
+#. i18n: ectx: property (whatsThis), widget (QLabel)
+#: po/rc.cpp:186 rc.cpp:186
+#, no-c-format
+msgid ""
+"This controls the % that widgets will be highlighted by when the mouse "
+"hovers over them"
+msgstr ""
+"Bu ayar fare üzerlerine geldiğinde gereçlerin yüzde kaç oranda "
+"vurgulanacağını belirler."
+
+#. i18n: file: config/qtcurveconfigbase.ui:1064
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:196 rc.cpp:196
+msgid "Button color"
+msgstr "Düğme rengi"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1072
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:199 rc.cpp:199
+msgid "Header appearance:"
+msgstr "Başlık görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1085
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:202 rc.cpp:202
+msgid "Shade header of sorted column:"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1109
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:206 rc.cpp:206
+msgid "Selection appearance (KDE4 && Gtk2):"
+msgstr "Seçim görünümü (KDE4 ve Gtk2):"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1139
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:209 rc.cpp:209
+msgid "Force alternate colors"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1147
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:212 rc.cpp:212
+msgid "Lines between items:"
+msgstr "Öğeler arasındaki çizgiler:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1160
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:215 rc.cpp:215
+msgid "Square selection"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1181
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:218 rc.cpp:218
+msgid "Scrollbars on the outside"
+msgstr "Kaydırma çubukları dışarıda"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1189
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:221 rc.cpp:221
+msgid "Highlight on focus (KDE)"
+msgstr "Odaklanınca vurgula (KDE)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1197
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:224 rc.cpp:224
+msgid ""
+"Always draw with a square frame - regardless of the general round setting."
+msgstr ""
+"Gelen yuvarlatma ayarını dikkate alma, her zaman köşeli bir çerçeve kullan."
+
+#. i18n: file: config/qtcurveconfigbase.ui:1235
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:227 rc.cpp:227
+msgid "Active tab appearance:"
+msgstr "Etkin sekme görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1243
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:230 rc.cpp:230
+msgid "Inactive tab appearance:"
+msgstr "Etkin olmayan sekme görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1261
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:233 rc.cpp:233
+msgid "Highlight"
+msgstr "Vurgula"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1264
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:236 rc.cpp:236
+msgid "This will cause a coloured stripe to be drawn over the current tab."
+msgstr ""
+"Bu seçenek etkin sekmenin üst kısmına renkli bir şerit çizilmesini sağlar."
+
+#. i18n: file: config/qtcurveconfigbase.ui:1275
+#. i18n: ectx: property (prefix), widget (KIntNumInput)
+#: po/rc.cpp:243 rc.cpp:243
+msgid "Tint by "
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1283
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:246 rc.cpp:246
+msgid "Mouse-over:"
+msgstr "Fare altında:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1296
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:249 rc.cpp:249
+msgid "Round all tabs"
+msgstr "Tüm sekmeleri yuvarlat"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1304
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:252 rc.cpp:252
+msgid "Draw a light border around tab widget"
+msgstr "Sekme gerecinin etrafına açık renk bir kenarlık çiz"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1312
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:255 rc.cpp:255
+msgid "Draw inner border of inactive tabs"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1345
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:262 rc.cpp:262
+#, fuzzy
+msgid "Alter background by:"
+msgstr "Seçili arkaplan"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1353
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:265 rc.cpp:265
+msgid "Invert shade of bottom tabs"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1403
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:272 rc.cpp:272
+msgid "'X' style checkmarks"
+msgstr "'X' biçemli işaretler"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1445
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:275 rc.cpp:275
+msgid "Button like"
+msgstr "Düğme gibi"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1453
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:278 rc.cpp:278
+msgid "Small radio 'dot'"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1461
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:281 rc.cpp:281
+msgid "Color when selected"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1515
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:291 rc.cpp:291
+msgid "Button Appearance:"
+msgstr "Düğme Görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1533
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1541
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1533
+#. i18n: ectx: property (text), widget (QLabel)
+#. i18n: file: config/qtcurveconfigbase.ui:1541
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:294 po/rc.cpp:297 rc.cpp:294 rc.cpp:297
+msgid "Titlebar Appearance:"
+msgstr "Başlık Çubuğu Görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1554
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:300 rc.cpp:300
+msgid "Text alignment:"
+msgstr "Metin hizalama:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1567
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:303 rc.cpp:303
+msgid "Color titlebar only (KDE4)"
+msgstr "Sadece başlık çubuğu renkli (KDE4)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1592
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:306 rc.cpp:306
+msgid "Light border (KDE4)"
+msgstr "Açık renk kenarlık (KDE4)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1613
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:309 rc.cpp:309
+msgid "Handles:"
+msgstr "Tutamaçlar:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1621
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:312 rc.cpp:312
+msgid "Border:"
+msgstr "Kenarlık:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1673
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:315 rc.cpp:315
+msgid "Toolbars"
+msgstr "Araç çubukları"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1700
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:321 rc.cpp:321
+msgid "Separators:"
+msgstr "Ayraçlar:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1732
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:324 rc.cpp:324
+msgid "Menus"
+msgstr "Menüler"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1746
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:327 rc.cpp:327
+msgid "Apply coloration to active window only"
+msgstr "Renklendirmeyi sadece etkin pencereye uygula"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1762
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:333 rc.cpp:333
+msgid "Menubar appearance:"
+msgstr "Menü çubuğu görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1770
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:336 rc.cpp:336
+msgid "Menuitem appearance:"
+msgstr "Menü öğesi görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1778
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:339 rc.cpp:339
+msgid "Use 'highlight' color for active menuitems"
+msgstr "Etkin menü öğelerine 'vurgu' rengi uygula"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1786
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:342 rc.cpp:342
+msgid "Stripe (KDE):"
+msgstr "Åžerit (KDE):"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1794
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:345 rc.cpp:345
+msgid "Border popupmenus"
+msgstr "Açılır menülere kenarlık ekle"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1802
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:348 rc.cpp:348
+msgid "Sub-menu delay:"
+msgstr "Alt menü gecikmesi:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1818
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:351 rc.cpp:351
+msgid "Color menubar items on mouse-over"
+msgstr "Fare altında menü çubuğu öğelerini renklendir"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1826
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:354 rc.cpp:354
+msgid "Custom text colors (active/normal):"
+msgstr "Özel metin renkleri (etkin-normal):"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1871
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:360 rc.cpp:360
+msgid "Thinner menu items"
+msgstr "Daha ince menü öğeleri"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1879
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:363 rc.cpp:363
+msgid "Popup-menu background:"
+msgstr "Açılır menü arkaplanı:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1928
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:370 rc.cpp:370
+msgid "Border menuitems"
+msgstr "Menü öğelerine kenarlık çiz"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1936
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:373 rc.cpp:373
+msgid "Draw icons"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:1944
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:376 rc.cpp:376
+msgid "Round selected menubar items on top only"
+msgstr "Sadece en üst menü çubuğu öğelerini yuvarlat"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1960
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:380 rc.cpp:380
+msgid "Enable mouse-over for menubar items"
+msgstr "Menü çubuğu öğelerine 'fare altında' efekti uygula"
+
+#. i18n: file: config/qtcurveconfigbase.ui:1983
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:383 rc.cpp:383
+#, fuzzy
+msgid "Titlebar appearance:"
+msgstr "Başlık Çubuğu Görünümü:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2043
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:386 rc.cpp:386
+msgid "'Fix' parentless dialogs"
+msgstr "Yetim diyalogları 'tamir et'"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2050
+#. i18n: ectx: property (whatsThis), widget (QCheckBox)
+#: po/rc.cpp:389 rc.cpp:389
+msgid ""
+"<h2><font color=\"#ff0000\">Warning: Experimental!</font></h1><p><p>Some "
+"applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have "
+"no 'parent'. This causes the dialog to recieve an entry in the taskbar, and "
+"allows the dialog to be minimised independantly of the main application "
+"window.</p>\n"
+"\n"
+"<p>If you enable this option, QtCurve will try to 'fix' this by assigning "
+"the dialogs a parent.</p>\n"
+"\n"
+"<p><b>Note:</b> This may brake some applications, as it wiill alter the "
+"behaviour of dialogs in a way the application has not intended. Therefore, "
+"please use with care.</p>"
+msgstr ""
+"<h2><font color=\"#ff0000\">Uyarı: Deneyseldir!</font></h1><p><p> Kate, "
+"Kaffeine ve GIMP gibi bazı uygulamalar üst penceresi olmayan (yetim) diyalog "
+"pencereleri oluşturur. Bu durum o diyalog çubuklarının görev çubuğunda yer "
+"almasına neden olur ve ana uygulama penceresinden bağımsız olarak "
+"küçültülebilmelerine olanak verir.</p>\n"
+"\n"
+"<p>Eğer bu seçeneği işaretlerseniz, QtCurve o diyalog pencerelerine bir "
+"ebeveyn atayarak bu durumu 'tamir etmeye' çalışır.</p>\n"
+"\n"
+"<p><b>Not:</b> Bu seçenek diyalog pencerelerinin davranışını uygulamada "
+"ayarlanan şeklin dışına çıkardığı için bazı uygulamaların düzgün çalışmasını "
+"engelleyebilir. O nedenle, dikkatli kullanmanızı tavsiye ederiz.</p>"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2058
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:396 rc.cpp:396
+msgid "Map KDE icons (Gtk2)"
+msgstr "KDE simgelerine eÅŸle (Gtk2)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2066
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:399 rc.cpp:399
+msgid "Gtk button order"
+msgstr "Gtk düğme sırası"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2091
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:402 rc.cpp:402
+msgid "Character to use for password entries:"
+msgstr "Parola girişlerinde kullanılacak karakter:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2115
+#. i18n: ectx: property (text), widget (QCheckBox)
+#: po/rc.cpp:406 rc.cpp:406
+msgid "Don't make 'auto-default' buttons larger (KDE4)"
+msgstr ""
+
+#. i18n: file: config/qtcurveconfigbase.ui:2141
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:409 rc.cpp:409
+msgid "Settings"
+msgstr "Ayarlar"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2155
+#. i18n: ectx: property (text), widget (QListView)
+#: po/rc.cpp:413 rc.cpp:413
+#, no-c-format
+msgid "Position (%)"
+msgstr "Konum (%)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2166
+#. i18n: ectx: property (text), widget (QListView)
+#: po/rc.cpp:417 rc.cpp:417
+#, no-c-format
+msgid "Value (%)"
+msgstr "DeÄŸer (%)"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2192
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:420 rc.cpp:420
+msgid "Gradient Stop"
+msgstr "Eğim Durağı"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2259
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:426 rc.cpp:426
+msgid "Value:"
+msgstr "DeÄŸer:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2275
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:429 rc.cpp:429
+msgid "Position:"
+msgstr "Konum:"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2336
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:441 rc.cpp:441
+#, no-c-format
+msgid ""
+"<i><b>NOTE: </b><br>\n"
+"\n"
+"<u>Position</u> has a range of 0% to 100% - 0% being top/left, and 100% "
+"being bottom/right.<br>\n"
+"\n"
+"<u>Value</u> has a range of 0% to 200%. A value of 120% implies lightening "
+"by 20%, and a value of 80% implies darkening by 20%</i>"
+msgstr ""
+"<i><b>NOT: </b><br>\n"
+"\n"
+"<u>Konum</u> yüzde 0 ile 100 arasında olabilir. 0 sol üst kısmı, 100 sağ alt "
+"kısmı temsil eder.<br>\n"
+"\n"
+"<u>Değer</u> yüzde 0 ile 200 arasında olabilir. % 120, % 20 oranında daha "
+"açık bir renk anlamına gelir, % 80 ise % 20 oranında daha koyu bir rengi "
+"temsil eder.</i>"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2349
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:448 rc.cpp:448
+msgid "Preview"
+msgstr "Önizleme"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2415
+#. i18n: ectx: property (title), widget (QGroupBox)
+#: po/rc.cpp:452 rc.cpp:452
+msgid "Use Custom Values"
+msgstr "Özel Değerler Kullan"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2539
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:455 rc.cpp:455
+msgid ""
+"<i>QtCurve uses various hard-coded shading values to draw elements such as "
+"button frames, the background for pressed buttons, etc. The following is a "
+"brief overview of how each shade is used - use this as a guide only, as "
+"shades are used for various things.<br>\n"
+"\n"
+"1 Is used for the light part of 3d elements - such as the border of tab "
+"widgets.<br>\n"
+"2 Is used for the lighter shade of striped progressbars.<br>\n"
+"3 Is used for the dark part of 3d elements - such as the border of tab "
+"widgets.<br>\n"
+"4 Is used for the shaded border of checks and radios, toolbar borders (when "
+"set to dark), the dark part of sunken/raised slider handles, etc.<br>\n"
+"5 Is used for the background of pressed widgets, and the border of toolbars "
+"(when not dark).<br>\n"
+"6 Is used as the border of most widgets.</i>"
+msgstr ""
+"<i>QtCurve düğme çerçeveleri, basılı düğmelerin arkaplanı ve benzerleri için "
+"önceden belirlenmiş gölgeleme değerleri kullanır. Aşağıda her gölgenin nasıl "
+"kullanıldığına dair bir özet bulabilirsiniz. Gölgeler çeşitli öğelerde "
+"kullanıldığı için bunları sadece bir kılavuz olarak kullanın.<br>\n"
+"\n"
+"1 Sekme gereçleri gibi 3B öğelerin aydınlık tarafı için kullanılır.<br>\n"
+"2 Çizgili ilerleme çubuklarının açık renk kısmı için kullanılır.<br>\n"
+"3 Sekme gereçleri gibi 3B öğelerin karanlık tarafı için kullanılır.<br>\n"
+"4 Koyu renge ayarlandıklarında işaretleme kutularının ve araç çubuğu "
+"kenarlıklarının gölgeli kenarlığı için, çökmüş ya da yükseltilmiş sürgü "
+"tutamaçları ve benzer, yerlerde kullanılır.<br>\n"
+"5 Basılı durumdaki gereçlerin arkaplanı ve (koyu değilken) araç çubuklarının "
+"çerçeveleri için kullanılır.<br>\n"
+"6 Çoğu gerecin kenarlığı olarak kullanılır.</i>"
+
+#. i18n: file: config/qtcurveconfigbase.ui:2560
+#. i18n: ectx: property (text), widget (QLabel)
+#: po/rc.cpp:465 rc.cpp:465
+msgid "Shading routine:"
+msgstr "Gölgeleme yordamı:"
+
+#: po/rc.cpp:466 rc.cpp:466
+msgctxt "NAME OF TRANSLATORS"
+msgid "Your names"
+msgstr "Necmettin Begiter"
+
+#: po/rc.cpp:467 rc.cpp:467
+msgctxt "EMAIL OF TRANSLATORS"
+msgid "Your emails"
+
+#, fuzzy
+#~ msgid "Highlight text background on mouse-over"
+#~ msgstr "Metin arkaplanını vurgula"
+
+#~ msgid "Color"
+#~ msgstr "Renk"
+
+#~ msgid "Next"
+#~ msgstr "Next"
diff --git a/style/CMakeLists.txt b/style/CMakeLists.txt
index 030487b..0b5a404 100644
--- a/style/CMakeLists.txt
+++ b/style/CMakeLists.txt
@@ -1,10 +1,22 @@
-set(qtcurve_SRCS qtcurve.cpp pixmaps.h)
-add_definitions(-DQT_PLUGIN)
-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/common)
-link_directories(${KDE3_LIB_DIR})
-kde3_automoc(${qtcurve_SRCS})
-add_library(qtcurve SHARED ${qtcurve_SRCS})
-set_target_properties(qtcurve PROPERTIES PREFIX "")
-target_link_libraries(qtcurve ${QT_QTGUI_LIBRARY} kdefx)
-install(TARGETS qtcurve LIBRARY DESTINATION ${KDE3_LIB_DIR}/kde3/plugins/styles)
-install(FILES qtcurve.themerc DESTINATION ${KDE3PREFIX}/share/apps/kstyle/themes)
+if (NOT QTC_QT_ONLY)
+ set(qtcurve_SRCS qtcurve.cpp pixmaps.h)
+ add_definitions(-DQT_PLUGIN)
+ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/common)
+ link_directories(${KDE3_LIB_DIR})
+ kde3_automoc(${qtcurve_SRCS})
+ add_library(qtcurve MODULE ${qtcurve_SRCS})
+ set_target_properties(qtcurve PROPERTIES PREFIX "")
+ target_link_libraries(qtcurve ${QT_LIBRARIES} kdefx)
+ install(TARGETS qtcurve LIBRARY DESTINATION ${KDE3_LIB_DIR}/kde3/plugins/styles)
+ install(FILES qtcurve.themerc DESTINATION ${KDE3PREFIX}/share/apps/kstyle/themes)
+else (NOT QTC_QT_ONLY)
+ set(qtcurve_MOC_CLASSES qtcurve.h qtc_kstyle.h)
+ QTCURVE_QT_WRAP_CPP(qtcurve_MOC_SRCS ${qtcurve_MOC_CLASSES})
+ set(qtcurve_SRCS qtcurve.cpp qtc_kstyle.cpp pixmaps.h)
+ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${QT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/common)
+ add_library(qtcurve MODULE ${qtcurve_SRCS} ${qtcurve_MOC_SRCS})
+ set_target_properties(qtcurve PROPERTIES PREFIX "")
+ target_link_libraries(qtcurve ${QT_LIBRARIES})
+ install(TARGETS qtcurve LIBRARY DESTINATION ${QT_PLUGINS_DIR}/styles)
+endif (NOT QTC_QT_ONLY)
+
diff --git a/style/pixmaps.h b/style/pixmaps.h
index 4873fa5..ff34491 100644
--- a/style/pixmaps.h
+++ b/style/pixmaps.h
@@ -35,6 +35,30 @@ static const unsigned char radio_frame_png_data[] = {
};
/* Generated by qembed */
+static const unsigned int radio_inner_png_len = 276;
+static const unsigned char radio_inner_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x0d,0x08,0x04,0x00,0x00,
+ 0x00,0xd8,0xe2,0x2c,0xf7,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
+ 0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x02,0x62,0x4b,0x47,0x44,0x00,0x00,
+ 0xaa,0x8d,0x23,0x32,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,
+ 0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,
+ 0x07,0x74,0x49,0x4d,0x45,0x07,0xd8,0x0c,0x0a,0x0c,0x30,0x0e,0xa9,0x10,
+ 0xdb,0x17,0x00,0x00,0x00,0x98,0x49,0x44,0x41,0x54,0x18,0xd3,0x85,0x8c,
+ 0x31,0x0a,0xc2,0x40,0x10,0x45,0x1f,0x62,0x95,0x9b,0x18,0x16,0x6b,0xf1,
+ 0x08,0xa6,0xf5,0x04,0x36,0x5a,0x59,0x6e,0x61,0x9b,0x0b,0x04,0xcc,0x01,
+ 0x2c,0x72,0x0c,0x6b,0x3d,0x81,0x85,0x20,0x04,0x0b,0x31,0x45,0x18,0x85,
+ 0x80,0x36,0x81,0x58,0x0c,0x92,0x65,0x40,0xfc,0xd5,0x1b,0xde,0xfc,0x0f,
+ 0x7f,0x33,0xc4,0x23,0x74,0xbc,0xc8,0x88,0x42,0xe1,0x28,0xa9,0xd9,0x30,
+ 0x65,0xc9,0x85,0x07,0xb3,0xbe,0x51,0xb2,0x0f,0x1e,0x73,0x6e,0xc4,0x8a,
+ 0x9e,0xda,0xcc,0x9f,0xd8,0x2a,0x08,0xa9,0x51,0x0b,0x2a,0x85,0x8e,0xc4,
+ 0x28,0x47,0x0b,0x03,0xe0,0xcd,0xd8,0xa8,0x11,0x8d,0x42,0xc6,0xd5,0xa8,
+ 0x03,0x85,0x42,0xc4,0x93,0x5d,0x20,0x3c,0xc2,0xe4,0x7b,0x24,0xdc,0x39,
+ 0xb3,0xc2,0x31,0xe7,0x88,0xb0,0x0e,0x27,0x62,0x72,0x2a,0x5a,0x84,0xa2,
+ 0x6f,0xfc,0xcc,0x07,0xef,0xe8,0x26,0x2e,0x6f,0x29,0xb2,0x5f,0x00,0x00,
+ 0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
static const unsigned int radio_light_png_len = 236;
static const unsigned char radio_light_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
@@ -56,25 +80,47 @@ static const unsigned char radio_light_png_data[] = {
0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int radio_on_png_len = 231;
+static const unsigned int radio_on_png_len = 221;
static const unsigned char radio_on_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x0d,0x08,0x06,0x00,0x00,
- 0x00,0x72,0xeb,0xe4,0x7c,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,
- 0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,
- 0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,
- 0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd7,0x05,0x1d,
- 0x0b,0x26,0x21,0x2a,0x9e,0xfa,0x9e,0x00,0x00,0x00,0x74,0x49,0x44,0x41,
- 0x54,0x28,0xcf,0xd5,0xd0,0x3d,0x0e,0x82,0x50,0x10,0x04,0xe0,0x4f,0xa9,
- 0x68,0x39,0x84,0x3d,0xb7,0x80,0x96,0xda,0x23,0xd8,0x51,0xd8,0x7a,0x2f,
- 0x2f,0xc0,0x19,0x80,0xd2,0xc6,0xe6,0x9d,0xc1,0xe6,0x91,0xbc,0x6c,0x50,
- 0x5b,0x9d,0x64,0xb3,0x7f,0x33,0xd9,0xcc,0xf2,0x77,0xb8,0x60,0xc2,0x9c,
- 0x73,0x17,0x09,0xd5,0x8e,0x00,0xee,0x68,0x73,0x3d,0x60,0xc1,0xba,0x91,
- 0x8e,0x41,0x74,0xc6,0x13,0x63,0x98,0xdf,0xca,0xe6,0x10,0x96,0x33,0x52,
- 0x98,0x35,0x39,0x9f,0xde,0x5d,0x4a,0x05,0xa9,0x14,0xa4,0x4f,0x9e,0x1e,
- 0xe8,0x51,0xe7,0xd8,0x70,0x2d,0x3d,0xed,0xa1,0xfb,0xf6,0xbd,0x1f,0xc7,
- 0x0b,0x02,0x3c,0x12,0x4f,0x16,0x9a,0x81,0xa2,0x00,0x00,0x00,0x00,0x49,
- 0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+ 0x00,0x72,0xeb,0xe4,0x7c,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
+ 0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,0xff,
+ 0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,0x48,
+ 0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,
+ 0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd9,0x04,0x11,0x0a,
+ 0x2d,0x0a,0x29,0xa8,0x47,0x5a,0x00,0x00,0x00,0x5d,0x49,0x44,0x41,0x54,
+ 0x28,0xcf,0xd5,0xd0,0xb1,0x09,0x80,0x40,0x0c,0x05,0xd0,0xa7,0x56,0xb6,
+ 0x37,0x8d,0x23,0xe8,0x44,0xae,0xe8,0x0c,0x62,0x69,0x7d,0x33,0xd8,0x9c,
+ 0xa0,0xe1,0x0a,0x0b,0x0b,0xfd,0xf0,0x09,0x81,0xbc,0x26,0xfc,0x2e,0x23,
+ 0x16,0xac,0x65,0x8e,0x4f,0xc0,0x5a,0xe9,0x0d,0x36,0x01,0x2d,0x48,0xc8,
+ 0x65,0x4f,0x65,0x66,0x0c,0xe7,0x51,0x1b,0xd0,0x15,0xa8,0xe0,0x2a,0xca,
+ 0xe1,0x20,0x05,0x0c,0xba,0x80,0x76,0x4c,0xe8,0x4b,0xcf,0xcc,0xd8,0x5e,
+ 0xfd,0xde,0xc7,0x72,0x00,0x70,0x62,0x14,0x61,0xef,0x49,0xda,0x94,0x00,
+ 0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+static const unsigned int radio_on_small_png_len = 258;
+static const unsigned char radio_on_small_png_data[] = {
+ 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
+ 0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x0d,0x08,0x06,0x00,0x00,
+ 0x00,0x72,0xeb,0xe4,0x7c,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
+ 0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,0xff,
+ 0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,0x48,
+ 0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,
+ 0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd9,0x0a,0x14,0x0b,
+ 0x13,0x19,0x65,0xff,0x39,0x9d,0x00,0x00,0x00,0x82,0x49,0x44,0x41,0x54,
+ 0x28,0xcf,0xcd,0xd0,0x31,0x0a,0xc2,0x50,0x10,0x04,0xd0,0xa7,0x82,0xf0,
+ 0x41,0x9b,0x78,0x0b,0xdb,0x9c,0xc1,0xc6,0xeb,0xa4,0xcf,0x65,0x2c,0x3c,
+ 0x84,0x07,0x51,0x1b,0x0b,0x49,0x6b,0x0a,0x45,0x02,0x22,0x62,0xb3,0x82,
+ 0x04,0x63,0x95,0x22,0xd3,0x0c,0x3b,0xcc,0xcc,0x2e,0xcb,0xa0,0x31,0xfa,
+ 0xa1,0x25,0xac,0x90,0xa1,0xc6,0x0e,0xcd,0xbf,0x92,0x84,0x12,0x07,0x54,
+ 0xd8,0xc7,0x9c,0xbe,0x4d,0x93,0x56,0x68,0x8d,0x02,0x77,0x5c,0x31,0xc3,
+ 0x12,0x27,0x1c,0x3f,0xa6,0x71,0x2b,0xb4,0xc0,0x0b,0x8f,0xe0,0x1a,0xf3,
+ 0x38,0x55,0x57,0xe8,0x12,0xda,0x34,0x38,0xc3,0x2d,0xc2,0x9d,0xe7,0x9d,
+ 0xa3,0x39,0x8f,0xad,0x0d,0xb6,0xd8,0xe0,0xd9,0xeb,0xf7,0x06,0x86,0x37,
+ 0x26,0x03,0x19,0xb1,0xe6,0xd3,0x1d,0x4f,0x00,0x00,0x00,0x00,0x49,0x45,
+ 0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned int check_on_png_len = 179;
@@ -140,67 +186,33 @@ static const unsigned char slider_light_png_data[] = {
0x42,0x60,0x82
};
-static const unsigned int slider_v_png_len = 310;
-static const unsigned char slider_v_png_data[] = {
- 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
- 0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x15,0x08,0x06,0x00,0x00,
- 0x00,0x9d,0x6e,0x64,0x8a,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,
- 0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,
- 0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,
- 0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd7,0x06,0x19,
- 0x0b,0x21,0x3b,0x50,0x7f,0x78,0xa4,0x00,0x00,0x00,0xc3,0x49,0x44,0x41,
- 0x54,0x38,0xcb,0xed,0xd4,0x31,0x4e,0x02,0x41,0x14,0x87,0xf1,0x5f,0xa0,
- 0xa3,0x5f,0x3a,0xc2,0x1d,0x0c,0x21,0x48,0x24,0xf4,0x36,0x9a,0x58,0xee,
- 0x0d,0xa8,0xac,0xe1,0x16,0x36,0x34,0x9e,0x02,0x2e,0xc0,0x19,0x30,0x6e,
- 0xa2,0x26,0x54,0x34,0xc6,0x06,0x05,0xeb,0xa5,0x19,0xc8,0x92,0x2c,0x32,
- 0xda,0xd8,0xf0,0x35,0x33,0x99,0x79,0x5f,0x5e,0x26,0x79,0xff,0xe1,0x90,
- 0x04,0x53,0x3c,0x23,0x0f,0xeb,0x34,0x9c,0xef,0xa9,0x14,0xf6,0x29,0x16,
- 0x78,0xc7,0x08,0x5d,0x0c,0xb1,0xc4,0x5b,0xb8,0x3f,0x20,0xc5,0x2b,0xfa,
- 0xca,0xe9,0x62,0x5e,0x14,0x13,0x6c,0xd0,0xf3,0x33,0x1d,0x7c,0x22,0xa9,
- 0x62,0x80,0x0f,0x3c,0x9c,0x90,0x96,0x68,0xa0,0x29,0x3c,0xf6,0x4e,0x1c,
- 0xd7,0xa1,0x5e,0x8e,0xcb,0x48,0xe9,0x02,0x79,0xc5,0x1f,0x38,0x4b,0xff,
- 0x22,0x65,0xa8,0x47,0xd6,0xd7,0x91,0x55,0x51,0xc3,0x15,0x26,0x11,0xd2,
- 0x3d,0x66,0xbb,0x29,0xff,0x8e,0x18,0xa5,0x16,0xbe,0x8a,0x81,0x4c,0xf1,
- 0x12,0x72,0x53,0x46,0x1b,0x4f,0xc7,0x82,0xb8,0xc6,0x23,0x6e,0x43,0xe7,
- 0x1b,0x8c,0xb1,0x2a,0x13,0x7e,0xf5,0x47,0x6c,0x01,0x0f,0x64,0x29,0x02,
- 0xd4,0x3b,0x9e,0x77,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
- 0x60,0x82
-};
-
-static const unsigned int slider_light_v_png_len = 204;
-static const unsigned char slider_light_v_png_data[] = {
+static const unsigned int check_x_on_png_len = 154;
+static const unsigned char check_x_on_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
- 0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x15,0x08,0x06,0x00,0x00,
- 0x00,0x9d,0x6e,0x64,0x8a,0x00,0x00,0x00,0x93,0x49,0x44,0x41,0x54,0x38,
- 0xcb,0xed,0xd3,0xa1,0x0a,0x02,0x51,0x10,0x85,0xe1,0x8f,0x75,0x41,0x10,
- 0x9b,0x4d,0x11,0xb1,0x18,0xad,0x46,0x93,0xdd,0x6a,0xf3,0x51,0x4c,0x3e,
- 0x97,0x46,0x93,0x6f,0x20,0x88,0x60,0x5f,0x58,0x0c,0x06,0xd7,0x72,0xc3,
- 0x65,0x51,0xd9,0x5d,0x30,0x08,0x9e,0x32,0xc3,0x9d,0xf9,0x39,0x77,0x60,
- 0x86,0x06,0x6a,0x45,0x79,0x8a,0x11,0x96,0x38,0x62,0x83,0x36,0x86,0xc8,
- 0x90,0xe3,0x01,0x49,0x04,0xcc,0x70,0xc2,0x04,0x0b,0x4c,0xb1,0xc3,0x00,
- 0x3d,0x14,0x65,0xc7,0x71,0x78,0x5c,0xa1,0x5b,0xaa,0x75,0xde,0x7d,0x73,
- 0x8d,0xed,0x0b,0xe0,0xa3,0x0a,0xcc,0xab,0x36,0x27,0x51,0x7e,0x6d,0x02,
- 0xf9,0x43,0x3f,0x01,0xf5,0xeb,0x9e,0xc6,0x39,0x6c,0xf9,0x01,0xf7,0xaa,
- 0x4e,0xfb,0x10,0xf3,0x3a,0x4e,0x39,0x6e,0xb8,0xd4,0x9d,0x2f,0xf5,0x4d,
- 0x3d,0x01,0xf6,0xc8,0x14,0xaa,0x58,0xc9,0x89,0xb4,0x00,0x00,0x00,0x00,
- 0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+ 0x44,0x52,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x08,0x06,0x00,0x00,
+ 0x00,0xe0,0x91,0x06,0x10,0x00,0x00,0x00,0x61,0x49,0x44,0x41,0x54,0x18,
+ 0x95,0x6d,0x8f,0x41,0x11,0xc0,0x30,0x08,0x04,0xb7,0x83,0x83,0xea,0x88,
+ 0xa0,0x88,0xe9,0xb3,0x1a,0xaa,0x01,0x1d,0xd1,0x50,0x41,0xfd,0x5c,0x12,
+ 0x60,0xca,0xef,0x60,0xe1,0x0e,0x03,0x2e,0xe0,0x01,0x4e,0x60,0xb0,0x6b,
+ 0xf5,0x0f,0xe0,0x0d,0x03,0x07,0x6e,0x01,0x7d,0x36,0x4d,0x17,0x9a,0x74,
+ 0x93,0xee,0x71,0xd1,0x64,0x51,0xc1,0x74,0xd9,0x24,0x2a,0x18,0xad,0x99,
+ 0x50,0xca,0x50,0xac,0x87,0xfd,0x00,0x5e,0x33,0x9a,0xde,0xac,0x16,0x29,
+ 0x63,0xfc,0x6e,0x65,0x28,0x19,0xfd,0x03,0xc4,0xa9,0x14,0xf0,0x37,0xcf,
+ 0xd8,0xd2,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int check_x_on_png_len = 181;
-static const unsigned char check_x_on_png_data[] = {
+static const unsigned int dot_png_len = 130;
+static const unsigned char dot_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
- 0x44,0x52,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x08,0x06,0x00,0x00,
- 0x00,0xe0,0x91,0x06,0x10,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,
- 0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,
- 0x00,0x1d,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x00,
- 0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x54,
- 0x68,0x65,0x20,0x47,0x49,0x4d,0x50,0xef,0x64,0x25,0x6e,0x00,0x00,0x00,
- 0x3e,0x49,0x44,0x41,0x54,0x18,0x95,0x95,0x8f,0x4b,0x0a,0x00,0x20,0x08,
- 0x05,0x07,0xba,0xb6,0x97,0xab,0x7b,0x45,0xee,0xea,0x91,0x86,0x24,0xb8,
- 0x70,0x18,0x7f,0x0d,0x30,0xa0,0x03,0x13,0x18,0x9c,0x50,0xce,0x92,0x34,
- 0x11,0x94,0x07,0x90,0xd5,0x69,0x67,0x10,0x5e,0x62,0x29,0x94,0xab,0xd2,
- 0x89,0x5f,0xdf,0xdd,0x37,0x6c,0xee,0x67,0xfc,0x35,0xc3,0xb2,0x07,0xf6,
- 0x7b,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+ 0x44,0x52,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x05,0x08,0x04,0x00,0x00,
+ 0x00,0x27,0x66,0xee,0x6e,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
+ 0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x02,0x62,0x4b,0x47,0x44,0x00,0xff,
+ 0x87,0x8f,0xcc,0xbf,0x00,0x00,0x00,0x2e,0x49,0x44,0x41,0x54,0x08,0xd7,
+ 0x63,0x64,0xe0,0x62,0x88,0x63,0x50,0x64,0xf8,0xc7,0x30,0x8f,0x81,0x21,
+ 0x83,0x41,0x8d,0x81,0x81,0x81,0x81,0xa1,0x8e,0x81,0xa1,0x97,0x01,0x0a,
+ 0x98,0x18,0xfe,0x32,0xc0,0x81,0x2a,0x43,0x33,0x84,0x01,0x00,0xb7,0x94,
+ 0x05,0x67,0x58,0x92,0xdc,0x0c,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,
+ 0xae,0x42,0x60,0x82
};
#include <qcstring.h>
@@ -211,14 +223,15 @@ static struct Embed {
const char *name;
} embed_vec[] = {
{ 419, radio_frame_png_data, "radio_frame.png" },
+ { 276, radio_inner_png_data, "radio_inner.png" },
{ 236, radio_light_png_data, "radio_light.png" },
- { 231, radio_on_png_data, "radio_on.png" },
+ { 221, radio_on_png_data, "radio_on.png" },
+ { 258, radio_on_small_png_data, "radio_on_small.png" },
{ 179, check_on_png_data, "check_on.png" },
{ 311, slider_png_data, "slider.png" },
{ 199, slider_light_png_data, "slider_light.png" },
- { 310, slider_v_png_data, "slider_v.png" },
- { 204, slider_light_v_png_data, "slider_light_v.png" },
- { 181, check_x_on_png_data, "check_x_on.png" },
+ { 154, check_x_on_png_data, "check_x_on.png" },
+ { 130, dot_png_data, "dot.png" },
{ 0, 0, 0 }
};
diff --git a/style/qtc_fixx11h.h b/style/qtc_fixx11h.h
new file mode 100644
index 0000000..ec8e53a
--- /dev/null
+++ b/style/qtc_fixx11h.h
@@ -0,0 +1,233 @@
+//#ifdef don't do this, this file is supposed to be included
+//#define multiple times
+
+/* Usage:
+
+ If you get compile errors caused by X11 includes (the line
+ where first error appears contains word like None, Unsorted,
+ Below, etc.), put #include <fixx11h.h> in the .cpp file
+ (not .h file!) between the place where X11 headers are
+ included and the place where the file with compile
+ error is included (or the place where the compile error
+ in the .cpp file occurs).
+
+ This file remaps X11 #defines to const variables or
+ inline functions. The side effect may be that these
+ symbols may now refer to different variables
+ (e.g. if X11 #defined NoButton, after this file
+ is included NoButton would no longer be X11's
+ NoButton, but Qt::NoButton instead). At this time,
+ there's no conflict known that could cause problems.
+
+ The original X11 symbols are still accessible
+ (e.g. for None) as X::None, XNone, and also still
+ None, unless name lookup finds different None
+ first (in the current class, etc.)
+
+ Use 'Unsorted', 'Bool' and 'index' as templates.
+
+*/
+
+namespace X
+{
+
+// template --->
+// Affects: Should be without side effects.
+#ifdef Unsorted
+#ifndef FIXX11H_Unsorted
+#define FIXX11H_Unsorted
+const int XUnsorted = Unsorted;
+#undef Unsorted
+const int Unsorted = XUnsorted;
+#endif
+#undef Unsorted
+#endif
+// template <---
+
+// Affects: Should be without side effects.
+#ifdef None
+#ifndef FIXX11H_None
+#define FIXX11H_None
+const XID XNone = None;
+#undef None
+const XID None = XNone;
+#endif
+#undef None
+#endif
+
+// template --->
+// Affects: Should be without side effects.
+#ifdef Bool
+#ifndef FIXX11H_Bool
+#define FIXX11H_Bool
+typedef Bool XBool;
+#undef Bool
+typedef XBool Bool;
+#endif
+#undef Bool
+#endif
+// template <---
+
+// Affects: Should be without side effects.
+#ifdef KeyPress
+#ifndef FIXX11H_KeyPress
+#define FIXX11H_KeyPress
+const int XKeyPress = KeyPress;
+#undef KeyPress
+const int KeyPress = XKeyPress;
+#endif
+#undef KeyPress
+#endif
+
+// Affects: Should be without side effects.
+#ifdef KeyRelease
+#ifndef FIXX11H_KeyRelease
+#define FIXX11H_KeyRelease
+const int XKeyRelease = KeyRelease;
+#undef KeyRelease
+const int KeyRelease = XKeyRelease;
+#endif
+#undef KeyRelease
+#endif
+
+// Affects: Should be without side effects.
+#ifdef Above
+#ifndef FIXX11H_Above
+#define FIXX11H_Above
+const int XAbove = Above;
+#undef Above
+const int Above = XAbove;
+#endif
+#undef Above
+#endif
+
+// Affects: Should be without side effects.
+#ifdef Below
+#ifndef FIXX11H_Below
+#define FIXX11H_Below
+const int XBelow = Below;
+#undef Below
+const int Below = XBelow;
+#endif
+#undef Below
+#endif
+
+// Affects: Should be without side effects.
+#ifdef FocusIn
+#ifndef FIXX11H_FocusIn
+#define FIXX11H_FocusIn
+const int XFocusIn = FocusIn;
+#undef FocusIn
+const int FocusIn = XFocusIn;
+#endif
+#undef FocusIn
+#endif
+
+// Affects: Should be without side effects.
+#ifdef FocusOut
+#ifndef FIXX11H_FocusOut
+#define FIXX11H_FocusOut
+const int XFocusOut = FocusOut;
+#undef FocusOut
+const int FocusOut = XFocusOut;
+#endif
+#undef FocusOut
+#endif
+
+// Affects: Should be without side effects.
+#ifdef Always
+#ifndef FIXX11H_Always
+#define FIXX11H_Always
+const int XAlways = Always;
+#undef Always
+const int Always = XAlways;
+#endif
+#undef Always
+#endif
+
+// Affects: Should be without side effects.
+#ifdef Success
+#ifndef FIXX11H_Success
+#define FIXX11H_Success
+const int XSuccess = Success;
+#undef Success
+const int Success = XSuccess;
+#endif
+#undef Success
+#endif
+
+// Affects: Should be without side effects.
+#ifdef GrayScale
+#ifndef FIXX11H_GrayScale
+#define FIXX11H_GrayScale
+const int XGrayScale = GrayScale;
+#undef GrayScale
+const int GrayScale = XGrayScale;
+#endif
+#undef GrayScale
+#endif
+
+// Affects: Should be without side effects.
+#ifdef Status
+#ifndef FIXX11H_Status
+#define FIXX11H_Status
+typedef Status XStatus;
+#undef Status
+typedef XStatus Status;
+#endif
+#undef Status
+#endif
+
+// Affects: Should be without side effects.
+#ifdef CursorShape
+#ifndef FIXX11H_CursorShape
+#define FIXX11H_CursorShape
+const int XCursorShape = CursorShape;
+#undef CursorShape
+const int CursorShape = CursorShape;
+#endif
+#undef CursorShape
+#endif
+
+// template --->
+// Affects: Should be without side effects.
+#ifdef index
+#ifndef FIXX11H_index
+#define FIXX11H_index
+inline
+char* Xindex( const char* s, int c )
+ {
+ return index( s, c );
+ }
+#undef index
+inline
+char* index( const char* s, int c )
+ {
+ return Xindex( s, c );
+ }
+#endif
+#undef index
+#endif
+// template <---
+
+#ifdef rindex
+// Affects: Should be without side effects.
+#ifndef FIXX11H_rindex
+#define FIXX11H_rindex
+inline
+char* Xrindex( const char* s, int c )
+ {
+ return rindex( s, c );
+ }
+#undef rindex
+inline
+char* rindex( const char* s, int c )
+ {
+ return Xrindex( s, c );
+ }
+#endif
+#undef rindex
+#endif
+}
+
+using namespace X;
diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp
new file mode 100644
index 0000000..da7e9e1
--- /dev/null
+++ b/style/qtc_kstyle.cpp
@@ -0,0 +1,1717 @@
+/*
+ *
+ * QtCKStyle
+ * Copyright (C) 2001-2002 Karol Szwed <[email protected]>
+ *
+ * QWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
+ * Copyright (C) 1998-2000 TrollTech AS.
+ *
+ * Many thanks to Bradley T. Hughes for the 3 button scrollbar code.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "qtc_kstyle.h"
+
+#include <qapplication.h>
+#include <qbitmap.h>
+#include <qcleanuphandler.h>
+#include <qmap.h>
+#include <qimage.h>
+#include <qlistview.h>
+#include <qmenubar.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qpopupmenu.h>
+#include <qprogressbar.h>
+#include <qscrollbar.h>
+#include <qsettings.h>
+#include <qslider.h>
+#include <qstylefactory.h>
+#include <qtabbar.h>
+#include <qtoolbar.h>
+
+#ifdef Q_WS_X11
+# include <X11/Xlib.h>
+# ifdef HAVE_XRENDER
+# include <X11/extensions/Xrender.h> // schroder
+ extern bool qt_use_xrender;
+# endif
+#else
+#undef HAVE_XRENDER
+#endif
+
+
+#include <limits.h>
+
+struct QtCKStylePrivate
+{
+ bool highcolor : 1;
+ bool useFilledFrameWorkaround : 1;
+ bool etchDisabledText : 1;
+ bool scrollablePopupmenus : 1;
+ bool menuAltKeyNavigation : 1;
+ bool menuDropShadow : 1;
+ bool sloppySubMenus : 1;
+ int popupMenuDelay;
+ float menuOpacity;
+
+ QtCKStyle::KStyleScrollBarType scrollbarType;
+ QtCKStyle::KStyleFlags flags;
+
+ //For KPE_ListViewBranch
+ QBitmap *verticalLine;
+ QBitmap *horizontalLine;
+};
+
+// -----------------------------------------------------------------------------
+
+
+QtCKStyle::QtCKStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
+ : QCommonStyle(), d(new QtCKStylePrivate)
+{
+ d->flags = flags;
+ d->useFilledFrameWorkaround = (flags & FilledFrameWorkaround);
+ d->scrollbarType = sbtype;
+ d->highcolor = QPixmap::defaultDepth() > 8;
+
+ // Read style settings
+ QSettings settings;
+ d->popupMenuDelay = settings.readNumEntry ("/QtCKStyle/Settings/PopupMenuDelay", 256);
+ d->sloppySubMenus = settings.readBoolEntry("/QtCKStyle/Settings/SloppySubMenus", false);
+ d->etchDisabledText = settings.readBoolEntry("/QtCKStyle/Settings/EtchDisabledText", true);
+ d->menuAltKeyNavigation = settings.readBoolEntry("/QtCKStyle/Settings/MenuAltKeyNavigation", true);
+ d->scrollablePopupmenus = settings.readBoolEntry("/QtCKStyle/Settings/ScrollablePopupMenus", false);
+ d->menuDropShadow = settings.readBoolEntry("/QtCKStyle/Settings/MenuDropShadow", false);
+
+ d->verticalLine = 0;
+ d->horizontalLine = 0;
+}
+
+
+QtCKStyle::~QtCKStyle()
+{
+ delete d->verticalLine;
+ delete d->horizontalLine;
+
+ delete d;
+}
+
+
+QString QtCKStyle::defaultStyle()
+{
+ if (QPixmap::defaultDepth() > 8)
+ return QString("plastik");
+ else
+ return QString("light, 3rd revision");
+}
+
+
+void QtCKStyle::polish( QWidget* widget )
+{
+ if ( d->useFilledFrameWorkaround )
+ {
+ if ( QFrame *frame = ::qt_cast< QFrame* >( widget ) ) {
+ QFrame::Shape shape = frame->frameShape();
+ if (shape == QFrame::ToolBarPanel || shape == QFrame::MenuBarPanel)
+ widget->installEventFilter(this);
+ }
+ }
+}
+
+
+void QtCKStyle::unPolish( QWidget* widget )
+{
+ if ( d->useFilledFrameWorkaround )
+ {
+ if ( QFrame *frame = ::qt_cast< QFrame* >( widget ) ) {
+ QFrame::Shape shape = frame->frameShape();
+ if (shape == QFrame::ToolBarPanel || shape == QFrame::MenuBarPanel)
+ widget->removeEventFilter(this);
+ }
+ }
+}
+
+
+// Style changes (should) always re-polish popups.
+void QtCKStyle::polishPopupMenu( QPopupMenu* p )
+{
+ if (!p->testWState( WState_Polished ))
+ p->setCheckable(true);
+}
+
+
+// -----------------------------------------------------------------------------
+// QtCKStyle extensions
+// -----------------------------------------------------------------------------
+
+void QtCKStyle::setScrollBarType(KStyleScrollBarType sbtype)
+{
+ d->scrollbarType = sbtype;
+}
+
+QtCKStyle::KStyleFlags QtCKStyle::styleFlags() const
+{
+ return d->flags;
+}
+
+void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
+ QPainter* p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ const QStyleOption& /* opt */ ) const
+{
+ switch( kpe )
+ {
+ // Dock / Toolbar / General handles.
+ // ---------------------------------
+
+ case KPE_DockWindowHandle: {
+
+ // Draws a nice DockWindow handle including the dock title.
+ QWidget* wid = const_cast<QWidget*>(widget);
+ bool horizontal = flags & Style_Horizontal;
+ int x,y,w,h,x2,y2;
+
+ r.rect( &x, &y, &w, &h );
+ if ((w <= 2) || (h <= 2)) {
+ p->fillRect(r, cg.highlight());
+ return;
+ }
+
+
+ x2 = x + w - 1;
+ y2 = y + h - 1;
+
+ QFont fnt;
+ fnt = QApplication::font(wid);
+ fnt.setPointSize( fnt.pointSize()-2 );
+
+ // Draw the item on an off-screen pixmap
+ // to preserve Xft antialiasing for
+ // vertically oriented handles.
+ QPixmap pix;
+ if (horizontal)
+ pix.resize( h-2, w-2 );
+ else
+ pix.resize( w-2, h-2 );
+
+ QString title = wid->parentWidget()->caption();
+ QPainter p2;
+ p2.begin(&pix);
+ p2.fillRect(pix.rect(), cg.brush(QColorGroup::Highlight));
+ p2.setPen(cg.highlightedText());
+ p2.setFont(fnt);
+ p2.drawText(pix.rect(), AlignCenter, title);
+ p2.end();
+
+ // Draw a sunken bevel
+ p->setPen(cg.dark());
+ p->drawLine(x, y, x2, y);
+ p->drawLine(x, y, x, y2);
+ p->setPen(cg.light());
+ p->drawLine(x+1, y2, x2, y2);
+ p->drawLine(x2, y+1, x2, y2);
+
+ if (horizontal) {
+ QWMatrix m;
+ m.rotate(-90.0);
+ QPixmap vpix = pix.xForm(m);
+ bitBlt(wid, r.x()+1, r.y()+1, &vpix);
+ } else
+ bitBlt(wid, r.x()+1, r.y()+1, &pix);
+
+ break;
+ }
+
+
+ /*
+ * KPE_ListViewExpander and KPE_ListViewBranch are based on code from
+ * QWindowStyle's CC_ListView, kindly donated by TrollTech.
+ * CC_ListView code is Copyright (C) 1998-2000 TrollTech AS.
+ */
+
+ case KPE_ListViewExpander: {
+ // Typical Windows style expand/collapse element.
+ int radius = (r.width() - 4) / 2;
+ int centerx = r.x() + r.width()/2;
+ int centery = r.y() + r.height()/2;
+
+ // Outer box
+ p->setPen( cg.mid() );
+ p->drawRect( r );
+
+ // plus or minus
+ p->setPen( cg.text() );
+ p->drawLine( centerx - radius, centery, centerx + radius, centery );
+ if ( flags & Style_On ) // Collapsed = On
+ p->drawLine( centerx, centery - radius, centerx, centery + radius );
+ break;
+ }
+
+ case KPE_ListViewBranch: {
+ // Typical Windows style listview branch element (dotted line).
+
+ // Create the dotline pixmaps if not already created
+ if ( !d->verticalLine )
+ {
+ // make 128*1 and 1*128 bitmaps that can be used for
+ // drawing the right sort of lines.
+ d->verticalLine = new QBitmap( 1, 129, true );
+ d->horizontalLine = new QBitmap( 128, 1, true );
+ QPointArray a( 64 );
+ QPainter p2;
+ p2.begin( d->verticalLine );
+
+ int i;
+ for( i=0; i < 64; i++ )
+ a.setPoint( i, 0, i*2+1 );
+ p2.setPen( color1 );
+ p2.drawPoints( a );
+ p2.end();
+ QApplication::flushX();
+ d->verticalLine->setMask( *d->verticalLine );
+
+ p2.begin( d->horizontalLine );
+ for( i=0; i < 64; i++ )
+ a.setPoint( i, i*2+1, 0 );
+ p2.setPen( color1 );
+ p2.drawPoints( a );
+ p2.end();
+ QApplication::flushX();
+ d->horizontalLine->setMask( *d->horizontalLine );
+ }
+
+ p->setPen( cg.text() ); // cg.dark() is bad for dark color schemes.
+
+ if (flags & Style_Horizontal)
+ {
+ int point = r.x();
+ int other = r.y();
+ int end = r.x()+r.width();
+ int thickness = r.height();
+
+ while( point < end )
+ {
+ int i = 128;
+ if ( i+point > end )
+ i = end-point;
+ p->drawPixmap( point, other, *d->horizontalLine, 0, 0, i, thickness );
+ point += i;
+ }
+
+ } else {
+ int point = r.y();
+ int other = r.x();
+ int end = r.y()+r.height();
+ int thickness = r.width();
+ int pixmapoffset = (flags & Style_NoChange) ? 0 : 1; // ### Hackish
+
+ while( point < end )
+ {
+ int i = 128;
+ if ( i+point > end )
+ i = end-point;
+ p->drawPixmap( other, point, *d->verticalLine, 0, pixmapoffset, thickness, i );
+ point += i;
+ }
+ }
+
+ break;
+ }
+
+ // Reimplement the other primitives in your styles.
+ // The current implementation just paints something visibly different.
+ case KPE_ToolBarHandle:
+ case KPE_GeneralHandle:
+ case KPE_SliderHandle:
+ p->fillRect(r, cg.light());
+ break;
+
+ case KPE_SliderGroove:
+ p->fillRect(r, cg.dark());
+ break;
+
+ default:
+ p->fillRect(r, Qt::yellow); // Something really bad happened - highlight.
+ break;
+ }
+}
+
+
+int QtCKStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget* /* widget */) const
+{
+ int value;
+ switch(kpm)
+ {
+ case KPM_ListViewBranchThickness:
+ value = 1;
+ break;
+
+ case KPM_MenuItemSeparatorHeight:
+ case KPM_MenuItemHMargin:
+ case KPM_MenuItemVMargin:
+ case KPM_MenuItemHFrame:
+ case KPM_MenuItemVFrame:
+ case KPM_MenuItemCheckMarkHMargin:
+ case KPM_MenuItemArrowHMargin:
+ case KPM_MenuItemTabSpacing:
+ default:
+ value = 0;
+ }
+
+ return value;
+}
+
+
+// -----------------------------------------------------------------------------
+
+void QtCKStyle::drawPrimitive( PrimitiveElement pe,
+ QPainter* p,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ const QStyleOption& opt ) const
+{
+ // TOOLBAR/DOCK WINDOW HANDLE
+ // ------------------------------------------------------------------------
+ if (pe == PE_DockWindowHandle)
+ {
+ // Wild workarounds are here. Beware.
+ QWidget *widget, *parent;
+
+ if (p && p->device()->devType() == QInternal::Widget) {
+ widget = static_cast<QWidget*>(p->device());
+ parent = widget->parentWidget();
+ } else
+ return; // Don't paint on non-widgets
+
+ // Check if we are a normal toolbar or a hidden dockwidget.
+ if ( parent &&
+ (parent->inherits("QToolBar") || // Normal toolbar
+ (parent->inherits("QMainWindow")) )) // Collapsed dock
+
+ // Draw a toolbar handle
+ drawKStylePrimitive( KPE_ToolBarHandle, p, widget, r, cg, flags, opt );
+
+ else if ( widget->inherits("QDockWindowHandle") )
+
+ // Draw a dock window handle
+ drawKStylePrimitive( KPE_DockWindowHandle, p, widget, r, cg, flags, opt );
+
+ else
+ // General handle, probably a kicker applet handle.
+ drawKStylePrimitive( KPE_GeneralHandle, p, widget, r, cg, flags, opt );
+
+ } else
+ QCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+}
+
+
+
+void QtCKStyle::drawControl( ControlElement element,
+ QPainter* p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ const QStyleOption &opt ) const
+{
+ switch (element)
+ {
+ // TABS
+ // ------------------------------------------------------------------------
+ case CE_TabBarTab: {
+ const QTabBar* tb = (const QTabBar*) widget;
+ QTabBar::Shape tbs = tb->shape();
+ bool selected = flags & Style_Selected;
+ int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right();
+
+ switch (tbs) {
+
+ case QTabBar::RoundedAbove: {
+ if (!selected)
+ p->translate(0,1);
+ p->setPen(selected ? cg.light() : cg.shadow());
+ p->drawLine(x, y+4, x, bottom);
+ p->drawLine(x, y+4, x+4, y);
+ p->drawLine(x+4, y, right-1, y);
+ if (selected)
+ p->setPen(cg.shadow());
+ p->drawLine(right, y+1, right, bottom);
+
+ p->setPen(cg.midlight());
+ p->drawLine(x+1, y+4, x+1, bottom);
+ p->drawLine(x+1, y+4, x+4, y+1);
+ p->drawLine(x+5, y+1, right-2, y+1);
+
+ if (selected) {
+ p->setPen(cg.mid());
+ p->drawLine(right-1, y+1, right-1, bottom);
+ } else {
+ p->setPen(cg.mid());
+ p->drawPoint(right-1, y+1);
+ p->drawLine(x+4, y+2, right-1, y+2);
+ p->drawLine(x+3, y+3, right-1, y+3);
+ p->fillRect(x+2, y+4, r.width()-3, r.height()-6, cg.mid());
+
+ p->setPen(cg.light());
+ p->drawLine(x, bottom-1, right, bottom-1);
+ p->translate(0,-1);
+ }
+ break;
+ }
+
+ case QTabBar::RoundedBelow: {
+ if (!selected)
+ p->translate(0,-1);
+ p->setPen(selected ? cg.light() : cg.shadow());
+ p->drawLine(x, bottom-4, x, y);
+ if (selected)
+ p->setPen(cg.mid());
+ p->drawLine(x, bottom-4, x+4, bottom);
+ if (selected)
+ p->setPen(cg.shadow());
+ p->drawLine(x+4, bottom, right-1, bottom);
+ p->drawLine(right, bottom-1, right, y);
+
+ p->setPen(cg.midlight());
+ p->drawLine(x+1, bottom-4, x+1, y);
+ p->drawLine(x+1, bottom-4, x+4, bottom-1);
+ p->drawLine(x+5, bottom-1, right-2, bottom-1);
+
+ if (selected) {
+ p->setPen(cg.mid());
+ p->drawLine(right-1, y, right-1, bottom-1);
+ } else {
+ p->setPen(cg.mid());
+ p->drawPoint(right-1, bottom-1);
+ p->drawLine(x+4, bottom-2, right-1, bottom-2);
+ p->drawLine(x+3, bottom-3, right-1, bottom-3);
+ p->fillRect(x+2, y+2, r.width()-3, r.height()-6, cg.mid());
+ p->translate(0,1);
+ p->setPen(cg.dark());
+ p->drawLine(x, y, right, y);
+ }
+ break;
+ }
+
+ case QTabBar::TriangularAbove: {
+ if (!selected)
+ p->translate(0,1);
+ p->setPen(selected ? cg.light() : cg.shadow());
+ p->drawLine(x, bottom, x, y+6);
+ p->drawLine(x, y+6, x+6, y);
+ p->drawLine(x+6, y, right-6, y);
+ if (selected)
+ p->setPen(cg.mid());
+ p->drawLine(right-5, y+1, right-1, y+5);
+ p->setPen(cg.shadow());
+ p->drawLine(right, y+6, right, bottom);
+
+ p->setPen(cg.midlight());
+ p->drawLine(x+1, bottom, x+1, y+6);
+ p->drawLine(x+1, y+6, x+6, y+1);
+ p->drawLine(x+6, y+1, right-6, y+1);
+ p->drawLine(right-5, y+2, right-2, y+5);
+ p->setPen(cg.mid());
+ p->drawLine(right-1, y+6, right-1, bottom);
+
+ QPointArray a(6);
+ a.setPoint(0, x+2, bottom);
+ a.setPoint(1, x+2, y+7);
+ a.setPoint(2, x+7, y+2);
+ a.setPoint(3, right-7, y+2);
+ a.setPoint(4, right-2, y+7);
+ a.setPoint(5, right-2, bottom);
+ p->setPen (selected ? cg.background() : cg.mid());
+ p->setBrush(selected ? cg.background() : cg.mid());
+ p->drawPolygon(a);
+ p->setBrush(NoBrush);
+ if (!selected) {
+ p->translate(0,-1);
+ p->setPen(cg.light());
+ p->drawLine(x, bottom, right, bottom);
+ }
+ break;
+ }
+
+ default: { // QTabBar::TriangularBelow
+ if (!selected)
+ p->translate(0,-1);
+ p->setPen(selected ? cg.light() : cg.shadow());
+ p->drawLine(x, y, x, bottom-6);
+ if (selected)
+ p->setPen(cg.mid());
+ p->drawLine(x, bottom-6, x+6, bottom);
+ if (selected)
+ p->setPen(cg.shadow());
+ p->drawLine(x+6, bottom, right-6, bottom);
+ p->drawLine(right-5, bottom-1, right-1, bottom-5);
+ if (!selected)
+ p->setPen(cg.shadow());
+ p->drawLine(right, bottom-6, right, y);
+
+ p->setPen(cg.midlight());
+ p->drawLine(x+1, y, x+1, bottom-6);
+ p->drawLine(x+1, bottom-6, x+6, bottom-1);
+ p->drawLine(x+6, bottom-1, right-6, bottom-1);
+ p->drawLine(right-5, bottom-2, right-2, bottom-5);
+ p->setPen(cg.mid());
+ p->drawLine(right-1, bottom-6, right-1, y);
+
+ QPointArray a(6);
+ a.setPoint(0, x+2, y);
+ a.setPoint(1, x+2, bottom-7);
+ a.setPoint(2, x+7, bottom-2);
+ a.setPoint(3, right-7, bottom-2);
+ a.setPoint(4, right-2, bottom-7);
+ a.setPoint(5, right-2, y);
+ p->setPen (selected ? cg.background() : cg.mid());
+ p->setBrush(selected ? cg.background() : cg.mid());
+ p->drawPolygon(a);
+ p->setBrush(NoBrush);
+ if (!selected) {
+ p->translate(0,1);
+ p->setPen(cg.dark());
+ p->drawLine(x, y, right, y);
+ }
+ break;
+ }
+ };
+
+ break;
+ }
+
+ // Popup menu scroller
+ // ------------------------------------------------------------------------
+ case CE_PopupMenuScroller: {
+ p->fillRect(r, cg.background());
+ drawPrimitive(PE_ButtonTool, p, r, cg, Style_Enabled);
+ drawPrimitive((flags & Style_Up) ? PE_ArrowUp : PE_ArrowDown, p, r, cg, Style_Enabled);
+ break;
+ }
+
+
+ // PROGRESSBAR
+ // ------------------------------------------------------------------------
+ case CE_ProgressBarGroove: {
+ QRect fr = subRect(SR_ProgressBarGroove, widget);
+ drawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, QStyleOption::Default);
+ break;
+ }
+
+ case CE_ProgressBarContents: {
+ // ### Take into account totalSteps() for busy indicator
+ const QProgressBar* pb = (const QProgressBar*)widget;
+ QRect cr = subRect(SR_ProgressBarContents, widget);
+ double progress = pb->progress();
+ bool reverse = QApplication::reverseLayout();
+ int steps = pb->totalSteps();
+
+ if (!cr.isValid())
+ return;
+
+ // Draw progress bar
+ if (progress > 0 || steps == 0) {
+ double pg = (steps == 0) ? 0.1 : progress / steps;
+ int width = QMIN(cr.width(), (int)(pg * cr.width()));
+ if (steps == 0) { //Busy indicator
+
+ if (width < 1) width = 1; //A busy indicator with width 0 is kind of useless
+
+ int remWidth = cr.width() - width; //Never disappear completely
+ if (remWidth <= 0) remWidth = 1; //Do something non-crashy when too small...
+
+ int pstep = int(progress) % ( 2 * remWidth );
+
+ if ( pstep > remWidth ) {
+ //Bounce about.. We're remWidth + some delta, we want to be remWidth - delta...
+ // - ( (remWidth + some delta) - 2* remWidth ) = - (some deleta - remWidth) = remWidth - some delta..
+ pstep = - (pstep - 2 * remWidth );
+ }
+
+ if (reverse)
+ p->fillRect(cr.x() + cr.width() - width - pstep, cr.y(), width, cr.height(),
+ cg.brush(QColorGroup::Highlight));
+ else
+ p->fillRect(cr.x() + pstep, cr.y(), width, cr.height(),
+ cg.brush(QColorGroup::Highlight));
+
+ return;
+ }
+
+
+ // Do fancy gradient for highcolor displays
+// if (d->highcolor) {
+// QColor c(cg.highlight());
+// KPixmap pix;
+// pix.resize(cr.width(), cr.height());
+// KPixmapEffect::gradient(pix, reverse ? c.light(150) : c.dark(150),
+// reverse ? c.dark(150) : c.light(150),
+// KPixmapEffect::HorizontalGradient);
+// if (reverse)
+// p->drawPixmap(cr.x()+(cr.width()-width), cr.y(), pix,
+// cr.width()-width, 0, width, cr.height());
+// else
+// p->drawPixmap(cr.x(), cr.y(), pix, 0, 0, width, cr.height());
+// } else
+ if (reverse)
+ p->fillRect(cr.x()+(cr.width()-width), cr.y(), width, cr.height(),
+ cg.brush(QColorGroup::Highlight));
+ else
+ p->fillRect(cr.x(), cr.y(), width, cr.height(),
+ cg.brush(QColorGroup::Highlight));
+ }
+ break;
+ }
+
+ case CE_ProgressBarLabel: {
+ const QProgressBar* pb = (const QProgressBar*)widget;
+ QRect cr = subRect(SR_ProgressBarContents, widget);
+ double progress = pb->progress();
+ bool reverse = QApplication::reverseLayout();
+ int steps = pb->totalSteps();
+
+ if (!cr.isValid())
+ return;
+
+ QFont font = p->font();
+ font.setBold(true);
+ p->setFont(font);
+
+ // Draw label
+ if (progress > 0 || steps == 0) {
+ double pg = (steps == 0) ? 1.0 : progress / steps;
+ int width = QMIN(cr.width(), (int)(pg * cr.width()));
+ QRect crect;
+ if (reverse)
+ crect.setRect(cr.x()+(cr.width()-width), cr.y(), cr.width(), cr.height());
+ else
+ crect.setRect(cr.x()+width, cr.y(), cr.width(), cr.height());
+
+ p->save();
+ p->setPen(pb->isEnabled() ? (reverse ? cg.text() : cg.highlightedText()) : cg.text());
+ p->drawText(r, AlignCenter, pb->progressString());
+ p->setClipRect(crect);
+ p->setPen(reverse ? cg.highlightedText() : cg.text());
+ p->drawText(r, AlignCenter, pb->progressString());
+ p->restore();
+
+ } else {
+ p->setPen(cg.text());
+ p->drawText(r, AlignCenter, pb->progressString());
+ }
+
+ break;
+ }
+
+ default:
+ QCommonStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ }
+}
+
+
+QRect QtCKStyle::subRect(SubRect r, const QWidget* widget) const
+{
+ switch(r)
+ {
+ // KDE2 look smooth progress bar
+ // ------------------------------------------------------------------------
+ case SR_ProgressBarGroove:
+ return widget->rect();
+
+ case SR_ProgressBarContents:
+ case SR_ProgressBarLabel: {
+ // ### take into account indicatorFollowsStyle()
+ QRect rt = widget->rect();
+ return QRect(rt.x()+2, rt.y()+2, rt.width()-4, rt.height()-4);
+ }
+
+ default:
+ return QCommonStyle::subRect(r, widget);
+ }
+}
+
+
+int QtCKStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
+{
+ switch(m)
+ {
+ // BUTTONS
+ // ------------------------------------------------------------------------
+ case PM_ButtonShiftHorizontal: // Offset by 1
+ case PM_ButtonShiftVertical: // ### Make configurable
+ return 1;
+
+ case PM_DockWindowHandleExtent:
+ {
+ QWidget* parent = 0;
+ // Check that we are not a normal toolbar or a hidden dockwidget,
+ // in which case we need to adjust the height for font size
+ if (widget && (parent = widget->parentWidget() )
+ && !parent->inherits("QToolBar")
+ && !parent->inherits("QMainWindow")
+ && widget->inherits("QDockWindowHandle") )
+ return widget->fontMetrics().lineSpacing();
+ else
+ return QCommonStyle::pixelMetric(m, widget);
+ }
+
+ // TABS
+ // ------------------------------------------------------------------------
+ case PM_TabBarTabHSpace:
+ return 24;
+
+ case PM_TabBarTabVSpace: {
+ const QTabBar * tb = (const QTabBar *) widget;
+ if ( tb->shape() == QTabBar::RoundedAbove ||
+ tb->shape() == QTabBar::RoundedBelow )
+ return 10;
+ else
+ return 4;
+ }
+
+ case PM_TabBarTabOverlap: {
+ const QTabBar* tb = (const QTabBar*)widget;
+ QTabBar::Shape tbs = tb->shape();
+
+ if ( (tbs == QTabBar::RoundedAbove) ||
+ (tbs == QTabBar::RoundedBelow) )
+ return 0;
+ else
+ return 2;
+ }
+
+ // SLIDER
+ // ------------------------------------------------------------------------
+ case PM_SliderLength:
+ return 18;
+
+ case PM_SliderThickness:
+ return 24;
+
+ // Determines how much space to leave for the actual non-tickmark
+ // portion of the slider.
+ case PM_SliderControlThickness: {
+ const QSlider* slider = (const QSlider*)widget;
+ QSlider::TickSetting ts = slider->tickmarks();
+ int thickness = (slider->orientation() == Horizontal) ?
+ slider->height() : slider->width();
+ switch (ts) {
+ case QSlider::NoMarks: // Use total area.
+ break;
+ case QSlider::Both:
+ thickness = (thickness/2) + 3; // Use approx. 1/2 of area.
+ break;
+ default: // Use approx. 2/3 of area
+ thickness = ((thickness*2)/3) + 3;
+ break;
+ };
+ return thickness;
+ }
+
+ // SPLITTER
+ // ------------------------------------------------------------------------
+ case PM_SplitterWidth:
+ if (widget && widget->inherits("QDockWindowResizeHandle"))
+ return 8; // ### why do we need 2pix extra?
+ else
+ return 6;
+
+ // FRAMES
+ // ------------------------------------------------------------------------
+ case PM_MenuBarFrameWidth:
+ return 1;
+
+ case PM_DockWindowFrameWidth:
+ return 1;
+
+ // GENERAL
+ // ------------------------------------------------------------------------
+ case PM_MaximumDragDistance:
+ return -1;
+
+ case PM_MenuBarItemSpacing:
+ return 5;
+
+ case PM_ToolBarItemSpacing:
+ return 0;
+
+ case PM_PopupMenuScrollerHeight:
+ return pixelMetric( PM_ScrollBarExtent, 0);
+
+ default:
+ return QCommonStyle::pixelMetric( m, widget );
+ }
+}
+
+//Helper to find the next sibling that's not hidden
+static QListViewItem* nextVisibleSibling(QListViewItem* item)
+{
+ QListViewItem* sibling = item;
+ do
+ {
+ sibling = sibling->nextSibling();
+ }
+ while (sibling && !sibling->isVisible());
+
+ return sibling;
+}
+
+void QtCKStyle::drawComplexControl( ComplexControl control,
+ QPainter* p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags,
+ SCFlags controls,
+ SCFlags active,
+ const QStyleOption &opt ) const
+{
+ switch(control)
+ {
+ // 3 BUTTON SCROLLBAR
+ // ------------------------------------------------------------------------
+ case CC_ScrollBar: {
+ // Many thanks to Brad Hughes for contributing this code.
+ bool useThreeButtonScrollBar = (d->scrollbarType & ThreeButtonScrollBar);
+
+ const QScrollBar *sb = (const QScrollBar*)widget;
+ bool maxedOut = (sb->minValue() == sb->maxValue());
+ bool horizontal = (sb->orientation() == Qt::Horizontal);
+ SFlags sflags = ((horizontal ? Style_Horizontal : Style_Default) |
+ (maxedOut ? Style_Default : Style_Enabled));
+
+ QRect addline, subline, subline2, addpage, subpage, slider, first, last;
+ subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, opt);
+ addline = querySubControlMetrics(control, widget, SC_ScrollBarAddLine, opt);
+ subpage = querySubControlMetrics(control, widget, SC_ScrollBarSubPage, opt);
+ addpage = querySubControlMetrics(control, widget, SC_ScrollBarAddPage, opt);
+ slider = querySubControlMetrics(control, widget, SC_ScrollBarSlider, opt);
+ first = querySubControlMetrics(control, widget, SC_ScrollBarFirst, opt);
+ last = querySubControlMetrics(control, widget, SC_ScrollBarLast, opt);
+ subline2 = addline;
+
+ if ( useThreeButtonScrollBar )
+ if (horizontal)
+ subline2.moveBy(-addline.width(), 0);
+ else
+ subline2.moveBy(0, -addline.height());
+
+ // Draw the up/left button set
+ if ((controls & SC_ScrollBarSubLine) && subline.isValid()) {
+ drawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
+ sflags | (active == SC_ScrollBarSubLine ?
+ Style_Down : Style_Default));
+
+ if (useThreeButtonScrollBar && subline2.isValid())
+ drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
+ sflags | (active == SC_ScrollBarSubLine ?
+ Style_Down : Style_Default));
+ }
+
+ if ((controls & SC_ScrollBarAddLine) && addline.isValid())
+ drawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
+ sflags | ((active == SC_ScrollBarAddLine) ?
+ Style_Down : Style_Default));
+
+ if ((controls & SC_ScrollBarSubPage) && subpage.isValid())
+ drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
+ sflags | ((active == SC_ScrollBarSubPage) ?
+ Style_Down : Style_Default));
+
+ if ((controls & SC_ScrollBarAddPage) && addpage.isValid())
+ drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
+ sflags | ((active == SC_ScrollBarAddPage) ?
+ Style_Down : Style_Default));
+
+ if ((controls & SC_ScrollBarFirst) && first.isValid())
+ drawPrimitive(PE_ScrollBarFirst, p, first, cg,
+ sflags | ((active == SC_ScrollBarFirst) ?
+ Style_Down : Style_Default));
+
+ if ((controls & SC_ScrollBarLast) && last.isValid())
+ drawPrimitive(PE_ScrollBarLast, p, last, cg,
+ sflags | ((active == SC_ScrollBarLast) ?
+ Style_Down : Style_Default));
+
+ if ((controls & SC_ScrollBarSlider) && slider.isValid()) {
+ drawPrimitive(PE_ScrollBarSlider, p, slider, cg,
+ sflags | ((active == SC_ScrollBarSlider) ?
+ Style_Down : Style_Default));
+ // Draw focus rect
+ if (sb->hasFocus()) {
+ QRect fr(slider.x() + 2, slider.y() + 2,
+ slider.width() - 5, slider.height() - 5);
+ drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
+ }
+ }
+ break;
+ }
+
+
+ // SLIDER
+ // -------------------------------------------------------------------
+ case CC_Slider: {
+ const QSlider* slider = (const QSlider*)widget;
+ QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt);
+ QRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt);
+
+ // Double-buffer slider for no flicker
+ QPixmap pix(widget->size());
+ QPainter p2;
+ p2.begin(&pix);
+
+ if ( slider->parentWidget() &&
+ slider->parentWidget()->backgroundPixmap() &&
+ !slider->parentWidget()->backgroundPixmap()->isNull() ) {
+ QPixmap pixmap = *(slider->parentWidget()->backgroundPixmap());
+ p2.drawTiledPixmap(r, pixmap, slider->pos());
+ } else
+ pix.fill(cg.background());
+
+ // Draw slider groove
+ if ((controls & SC_SliderGroove) && groove.isValid()) {
+ drawKStylePrimitive( KPE_SliderGroove, &p2, widget, groove, cg, flags, opt );
+
+ // Draw the focus rect around the groove
+ if (slider->hasFocus())
+ drawPrimitive(PE_FocusRect, &p2, groove, cg);
+ }
+
+ // Draw the tickmarks
+ if (controls & SC_SliderTickmarks)
+ QCommonStyle::drawComplexControl(control, &p2, widget,
+ r, cg, flags, SC_SliderTickmarks, active, opt);
+
+ // Draw the slider handle
+ if ((controls & SC_SliderHandle) && handle.isValid()) {
+ if (active == SC_SliderHandle)
+ flags |= Style_Active;
+ drawKStylePrimitive( KPE_SliderHandle, &p2, widget, handle, cg, flags, opt );
+ }
+
+ p2.end();
+ bitBlt((QWidget*)widget, r.x(), r.y(), &pix);
+ break;
+ }
+
+ // LISTVIEW
+ // -------------------------------------------------------------------
+ case CC_ListView: {
+
+ /*
+ * Many thanks to TrollTech AS for donating CC_ListView from QWindowsStyle.
+ * CC_ListView code is Copyright (C) 1998-2000 TrollTech AS.
+ */
+
+ // Paint the icon and text.
+ if ( controls & SC_ListView )
+ QCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+
+ // If we're have a branch or are expanded...
+ if ( controls & (SC_ListViewBranch | SC_ListViewExpand) )
+ {
+ // If no list view item was supplied, break
+ if (opt.isDefault())
+ break;
+
+ QListViewItem *item = opt.listViewItem();
+ QListViewItem *child = item->firstChild();
+
+ int y = r.y();
+ int c; // dotline vertice count
+ int dotoffset = 0;
+ QPointArray dotlines;
+
+ if ( active == SC_All && controls == SC_ListViewExpand ) {
+ // We only need to draw a vertical line
+ c = 2;
+ dotlines.resize(2);
+ dotlines[0] = QPoint( r.right(), r.top() );
+ dotlines[1] = QPoint( r.right(), r.bottom() );
+
+ } else {
+
+ int linetop = 0, linebot = 0;
+ // each branch needs at most two lines, ie. four end points
+ dotoffset = (item->itemPos() + item->height() - y) % 2;
+ dotlines.resize( item->childCount() * 4 );
+ c = 0;
+
+ // skip the stuff above the exposed rectangle
+ while ( child && y + child->height() <= 0 )
+ {
+ y += child->totalHeight();
+ child = nextVisibleSibling(child);
+ }
+
+ int bx = r.width() / 2;
+
+ // paint stuff in the magical area
+ QListView* v = item->listView();
+ int lh = QMAX( p->fontMetrics().height() + 2 * v->itemMargin(),
+ QApplication::globalStrut().height() );
+ if ( lh % 2 > 0 )
+ lh++;
+
+ // Draw all the expand/close boxes...
+ QRect boxrect;
+ QStyle::StyleFlags boxflags;
+ while ( child && y < r.height() )
+ {
+ linebot = y + lh/2;
+ if ( (child->isExpandable() || child->childCount()) &&
+ (child->height() > 0) )
+ {
+ // The primitive requires a rect.
+ boxrect = QRect( bx-4, linebot-4, 9, 9 );
+ boxflags = child->isOpen() ? QStyle::Style_Off : QStyle::Style_On;
+
+ // QtCKStyle extension: Draw the box and expand/collapse indicator
+ drawKStylePrimitive( KPE_ListViewExpander, p, NULL, boxrect, cg, boxflags, opt );
+
+ // dotlinery
+ p->setPen( cg.mid() );
+ dotlines[c++] = QPoint( bx, linetop );
+ dotlines[c++] = QPoint( bx, linebot - 5 );
+ dotlines[c++] = QPoint( bx + 5, linebot );
+ dotlines[c++] = QPoint( r.width(), linebot );
+ linetop = linebot + 5;
+ } else {
+ // just dotlinery
+ dotlines[c++] = QPoint( bx+1, linebot );
+ dotlines[c++] = QPoint( r.width(), linebot );
+ }
+
+ y += child->totalHeight();
+ child = nextVisibleSibling(child);
+ }
+
+ if ( child ) // there's a child to draw, so move linebot to edge of rectangle
+ linebot = r.height();
+
+ if ( linetop < linebot )
+ {
+ dotlines[c++] = QPoint( bx, linetop );
+ dotlines[c++] = QPoint( bx, linebot );
+ }
+ }
+
+ // Draw all the branches...
+ static int thickness = kPixelMetric( KPM_ListViewBranchThickness );
+ int line; // index into dotlines
+ QRect branchrect;
+ QStyle::StyleFlags branchflags;
+ for( line = 0; line < c; line += 2 )
+ {
+ // assumptions here: lines are horizontal or vertical.
+ // lines always start with the numerically lowest
+ // coordinate.
+
+ // point ... relevant coordinate of current point
+ // end ..... same coordinate of the end of the current line
+ // other ... the other coordinate of the current point/line
+ if ( dotlines[line].y() == dotlines[line+1].y() )
+ {
+ // Horizontal branch
+ int end = dotlines[line+1].x();
+ int point = dotlines[line].x();
+ int other = dotlines[line].y();
+
+ branchrect = QRect( point, other-(thickness/2), end-point, thickness );
+ branchflags = QStyle::Style_Horizontal;
+
+ // QtCKStyle extension: Draw the horizontal branch
+ drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
+
+ } else {
+ // Vertical branch
+ int end = dotlines[line+1].y();
+ int point = dotlines[line].y();
+ int other = dotlines[line].x();
+ int pixmapoffset = ((point & 1) != dotoffset ) ? 1 : 0;
+
+ branchrect = QRect( other-(thickness/2), point, thickness, end-point );
+ if (!pixmapoffset) // ### Hackish - used to hint the offset
+ branchflags = QStyle::Style_NoChange;
+ else
+ branchflags = QStyle::Style_Default;
+
+ // QtCKStyle extension: Draw the vertical branch
+ drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
+ }
+ }
+ }
+ break;
+ }
+
+ default:
+ QCommonStyle::drawComplexControl( control, p, widget, r, cg,
+ flags, controls, active, opt );
+ break;
+ }
+}
+
+
+QStyle::SubControl QtCKStyle::querySubControl( ComplexControl control,
+ const QWidget* widget,
+ const QPoint &pos,
+ const QStyleOption &opt ) const
+{
+ QStyle::SubControl ret = QCommonStyle::querySubControl(control, widget, pos, opt);
+
+ if (d->scrollbarType == ThreeButtonScrollBar) {
+ // Enable third button
+ if (control == CC_ScrollBar && ret == SC_None)
+ ret = SC_ScrollBarSubLine;
+ }
+ return ret;
+}
+
+
+QRect QtCKStyle::querySubControlMetrics( ComplexControl control,
+ const QWidget* widget,
+ SubControl sc,
+ const QStyleOption &opt ) const
+{
+ QRect ret;
+
+ if (control == CC_ScrollBar)
+ {
+ bool threeButtonScrollBar = d->scrollbarType & ThreeButtonScrollBar;
+ bool platinumScrollBar = d->scrollbarType & PlatinumStyleScrollBar;
+ bool nextScrollBar = d->scrollbarType & NextStyleScrollBar;
+
+ const QScrollBar *sb = (const QScrollBar*)widget;
+ bool horizontal = sb->orientation() == Qt::Horizontal;
+ int sliderstart = sb->sliderStart();
+ int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
+ int maxlen = (horizontal ? sb->width() : sb->height())
+ - (sbextent * (threeButtonScrollBar ? 3 : 2));
+ int sliderlen;
+
+ // calculate slider length
+ if (sb->maxValue() != sb->minValue())
+ {
+ uint range = sb->maxValue() - sb->minValue();
+ sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep());
+
+ int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ if ( sliderlen < slidermin || range > INT_MAX / 2 )
+ sliderlen = slidermin;
+ if ( sliderlen > maxlen )
+ sliderlen = maxlen;
+ } else
+ sliderlen = maxlen;
+
+ // Subcontrols
+ switch (sc)
+ {
+ case SC_ScrollBarSubLine: {
+ // top/left button
+ if (platinumScrollBar) {
+ if (horizontal)
+ ret.setRect(sb->width() - 2 * sbextent, 0, sbextent, sbextent);
+ else
+ ret.setRect(0, sb->height() - 2 * sbextent, sbextent, sbextent);
+ } else
+ ret.setRect(0, 0, sbextent, sbextent);
+ break;
+ }
+
+ case SC_ScrollBarAddLine: {
+ // bottom/right button
+ if (nextScrollBar) {
+ if (horizontal)
+ ret.setRect(sbextent, 0, sbextent, sbextent);
+ else
+ ret.setRect(0, sbextent, sbextent, sbextent);
+ } else {
+ if (horizontal)
+ ret.setRect(sb->width() - sbextent, 0, sbextent, sbextent);
+ else
+ ret.setRect(0, sb->height() - sbextent, sbextent, sbextent);
+ }
+ break;
+ }
+
+ case SC_ScrollBarSubPage: {
+ // between top/left button and slider
+ if (platinumScrollBar) {
+ if (horizontal)
+ ret.setRect(0, 0, sliderstart, sbextent);
+ else
+ ret.setRect(0, 0, sbextent, sliderstart);
+ } else if (nextScrollBar) {
+ if (horizontal)
+ ret.setRect(sbextent*2, 0, sliderstart-2*sbextent, sbextent);
+ else
+ ret.setRect(0, sbextent*2, sbextent, sliderstart-2*sbextent);
+ } else {
+ if (horizontal)
+ ret.setRect(sbextent, 0, sliderstart - sbextent, sbextent);
+ else
+ ret.setRect(0, sbextent, sbextent, sliderstart - sbextent);
+ }
+ break;
+ }
+
+ case SC_ScrollBarAddPage: {
+ // between bottom/right button and slider
+ int fudge;
+
+ if (platinumScrollBar)
+ fudge = 0;
+ else if (nextScrollBar)
+ fudge = 2*sbextent;
+ else
+ fudge = sbextent;
+
+ if (horizontal)
+ ret.setRect(sliderstart + sliderlen, 0,
+ maxlen - sliderstart - sliderlen + fudge, sbextent);
+ else
+ ret.setRect(0, sliderstart + sliderlen, sbextent,
+ maxlen - sliderstart - sliderlen + fudge);
+ break;
+ }
+
+ case SC_ScrollBarGroove: {
+ int multi = threeButtonScrollBar ? 3 : 2;
+ int fudge;
+
+ if (platinumScrollBar)
+ fudge = 0;
+ else if (nextScrollBar)
+ fudge = 2*sbextent;
+ else
+ fudge = sbextent;
+
+ if (horizontal)
+ ret.setRect(fudge, 0, sb->width() - sbextent * multi, sb->height());
+ else
+ ret.setRect(0, fudge, sb->width(), sb->height() - sbextent * multi);
+ break;
+ }
+
+ case SC_ScrollBarSlider: {
+ if (horizontal)
+ ret.setRect(sliderstart, 0, sliderlen, sbextent);
+ else
+ ret.setRect(0, sliderstart, sbextent, sliderlen);
+ break;
+ }
+
+ default:
+ ret = QCommonStyle::querySubControlMetrics(control, widget, sc, opt);
+ break;
+ }
+ } else
+ ret = QCommonStyle::querySubControlMetrics(control, widget, sc, opt);
+
+ return ret;
+}
+
+static const char * const kstyle_close_xpm[] = {
+"12 12 2 1",
+"# c #000000",
+". c None",
+"............",
+"............",
+"..##....##..",
+"...##..##...",
+"....####....",
+".....##.....",
+"....####....",
+"...##..##...",
+"..##....##..",
+"............",
+"............",
+"............"};
+
+static const char * const kstyle_maximize_xpm[]={
+"12 12 2 1",
+"# c #000000",
+". c None",
+"............",
+"............",
+".##########.",
+".##########.",
+".#........#.",
+".#........#.",
+".#........#.",
+".#........#.",
+".#........#.",
+".#........#.",
+".##########.",
+"............"};
+
+
+static const char * const kstyle_minimize_xpm[] = {
+"12 12 2 1",
+"# c #000000",
+". c None",
+"............",
+"............",
+"............",
+"............",
+"............",
+"............",
+"............",
+"...######...",
+"...######...",
+"............",
+"............",
+"............"};
+
+static const char * const kstyle_normalizeup_xpm[] = {
+"12 12 2 1",
+"# c #000000",
+". c None",
+"............",
+"...#######..",
+"...#######..",
+"...#.....#..",
+".#######.#..",
+".#######.#..",
+".#.....#.#..",
+".#.....###..",
+".#.....#....",
+".#.....#....",
+".#######....",
+"............"};
+
+
+static const char * const kstyle_shade_xpm[] = {
+"12 12 2 1",
+"# c #000000",
+". c None",
+"............",
+"............",
+"............",
+"............",
+"............",
+".....#......",
+"....###.....",
+"...#####....",
+"..#######...",
+"............",
+"............",
+"............"};
+
+static const char * const kstyle_unshade_xpm[] = {
+"12 12 2 1",
+"# c #000000",
+". c None",
+"............",
+"............",
+"............",
+"............",
+"..#######...",
+"...#####....",
+"....###.....",
+".....#......",
+"............",
+"............",
+"............",
+"............"};
+
+static const char * const dock_window_close_xpm[] = {
+"8 8 2 1",
+"# c #000000",
+". c None",
+"##....##",
+".##..##.",
+"..####..",
+"...##...",
+"..####..",
+".##..##.",
+"##....##",
+"........"};
+
+// Message box icons, from page 210 of the Windows style guide.
+
+// Hand-drawn to resemble Microsoft's icons, but in the Mac/Netscape
+// palette. The "question mark" icon, which Microsoft recommends not
+// using but a lot of people still use, is left out.
+
+/* XPM */
+static const char * const information_xpm[]={
+"32 32 5 1",
+". c None",
+"c c #000000",
+"* c #999999",
+"a c #ffffff",
+"b c #0000ff",
+"...........********.............",
+"........***aaaaaaaa***..........",
+"......**aaaaaaaaaaaaaa**........",
+".....*aaaaaaaaaaaaaaaaaa*.......",
+"....*aaaaaaaabbbbaaaaaaaac......",
+"...*aaaaaaaabbbbbbaaaaaaaac.....",
+"..*aaaaaaaaabbbbbbaaaaaaaaac....",
+".*aaaaaaaaaaabbbbaaaaaaaaaaac...",
+".*aaaaaaaaaaaaaaaaaaaaaaaaaac*..",
+"*aaaaaaaaaaaaaaaaaaaaaaaaaaaac*.",
+"*aaaaaaaaaabbbbbbbaaaaaaaaaaac*.",
+"*aaaaaaaaaaaabbbbbaaaaaaaaaaac**",
+"*aaaaaaaaaaaabbbbbaaaaaaaaaaac**",
+"*aaaaaaaaaaaabbbbbaaaaaaaaaaac**",
+"*aaaaaaaaaaaabbbbbaaaaaaaaaaac**",
+"*aaaaaaaaaaaabbbbbaaaaaaaaaaac**",
+".*aaaaaaaaaaabbbbbaaaaaaaaaac***",
+".*aaaaaaaaaaabbbbbaaaaaaaaaac***",
+"..*aaaaaaaaaabbbbbaaaaaaaaac***.",
+"...caaaaaaabbbbbbbbbaaaaaac****.",
+"....caaaaaaaaaaaaaaaaaaaac****..",
+".....caaaaaaaaaaaaaaaaaac****...",
+"......ccaaaaaaaaaaaaaacc****....",
+".......*cccaaaaaaaaccc*****.....",
+"........***cccaaaac*******......",
+"..........****caaac*****........",
+".............*caaac**...........",
+"...............caac**...........",
+"................cac**...........",
+".................cc**...........",
+"..................***...........",
+"...................**..........."};
+/* XPM */
+static const char* const warning_xpm[]={
+"32 32 4 1",
+". c None",
+"a c #ffff00",
+"* c #000000",
+"b c #999999",
+".............***................",
+"............*aaa*...............",
+"...........*aaaaa*b.............",
+"...........*aaaaa*bb............",
+"..........*aaaaaaa*bb...........",
+"..........*aaaaaaa*bb...........",
+".........*aaaaaaaaa*bb..........",
+".........*aaaaaaaaa*bb..........",
+"........*aaaaaaaaaaa*bb.........",
+"........*aaaa***aaaa*bb.........",
+".......*aaaa*****aaaa*bb........",
+".......*aaaa*****aaaa*bb........",
+"......*aaaaa*****aaaaa*bb.......",
+"......*aaaaa*****aaaaa*bb.......",
+".....*aaaaaa*****aaaaaa*bb......",
+".....*aaaaaa*****aaaaaa*bb......",
+"....*aaaaaaaa***aaaaaaaa*bb.....",
+"....*aaaaaaaa***aaaaaaaa*bb.....",
+"...*aaaaaaaaa***aaaaaaaaa*bb....",
+"...*aaaaaaaaaa*aaaaaaaaaa*bb....",
+"..*aaaaaaaaaaa*aaaaaaaaaaa*bb...",
+"..*aaaaaaaaaaaaaaaaaaaaaaa*bb...",
+".*aaaaaaaaaaaa**aaaaaaaaaaa*bb..",
+".*aaaaaaaaaaa****aaaaaaaaaa*bb..",
+"*aaaaaaaaaaaa****aaaaaaaaaaa*bb.",
+"*aaaaaaaaaaaaa**aaaaaaaaaaaa*bb.",
+"*aaaaaaaaaaaaaaaaaaaaaaaaaaa*bbb",
+"*aaaaaaaaaaaaaaaaaaaaaaaaaaa*bbb",
+".*aaaaaaaaaaaaaaaaaaaaaaaaa*bbbb",
+"..*************************bbbbb",
+"....bbbbbbbbbbbbbbbbbbbbbbbbbbb.",
+".....bbbbbbbbbbbbbbbbbbbbbbbbb.."};
+/* XPM */
+static const char* const critical_xpm[]={
+"32 32 4 1",
+". c None",
+"a c #999999",
+"* c #ff0000",
+"b c #ffffff",
+"...........********.............",
+".........************...........",
+".......****************.........",
+"......******************........",
+".....********************a......",
+"....**********************a.....",
+"...************************a....",
+"..*******b**********b*******a...",
+"..******bbb********bbb******a...",
+".******bbbbb******bbbbb******a..",
+".*******bbbbb****bbbbb*******a..",
+"*********bbbbb**bbbbb*********a.",
+"**********bbbbbbbbbb**********a.",
+"***********bbbbbbbb***********aa",
+"************bbbbbb************aa",
+"************bbbbbb************aa",
+"***********bbbbbbbb***********aa",
+"**********bbbbbbbbbb**********aa",
+"*********bbbbb**bbbbb*********aa",
+".*******bbbbb****bbbbb*******aa.",
+".******bbbbb******bbbbb******aa.",
+"..******bbb********bbb******aaa.",
+"..*******b**********b*******aa..",
+"...************************aaa..",
+"....**********************aaa...",
+"....a********************aaa....",
+".....a******************aaa.....",
+"......a****************aaa......",
+".......aa************aaaa.......",
+".........aa********aaaaa........",
+"...........aaaaaaaaaaa..........",
+".............aaaaaaa............"};
+
+QPixmap QtCKStyle::stylePixmap( StylePixmap stylepixmap,
+ const QWidget* widget,
+ const QStyleOption& opt) const
+{
+ switch (stylepixmap) {
+ case SP_TitleBarShadeButton:
+ return QPixmap(const_cast<const char**>(kstyle_shade_xpm));
+ case SP_TitleBarUnshadeButton:
+ return QPixmap(const_cast<const char**>(kstyle_unshade_xpm));
+ case SP_TitleBarNormalButton:
+ return QPixmap(const_cast<const char**>(kstyle_normalizeup_xpm));
+ case SP_TitleBarMinButton:
+ return QPixmap(const_cast<const char**>(kstyle_minimize_xpm));
+ case SP_TitleBarMaxButton:
+ return QPixmap(const_cast<const char**>(kstyle_maximize_xpm));
+ case SP_TitleBarCloseButton:
+ return QPixmap(const_cast<const char**>(kstyle_close_xpm));
+ case SP_DockWindowCloseButton:
+ return QPixmap(const_cast<const char**>(dock_window_close_xpm ));
+ case SP_MessageBoxInformation:
+ return QPixmap(const_cast<const char**>(information_xpm));
+ case SP_MessageBoxWarning:
+ return QPixmap(const_cast<const char**>(warning_xpm));
+ case SP_MessageBoxCritical:
+ return QPixmap(const_cast<const char**>(critical_xpm));
+ default:
+ break;
+ }
+ return QCommonStyle::stylePixmap(stylepixmap, widget, opt);
+}
+
+
+int QtCKStyle::styleHint( StyleHint sh, const QWidget* w,
+ const QStyleOption &opt, QStyleHintReturn* shr) const
+{
+ switch (sh)
+ {
+ case SH_EtchDisabledText:
+ return d->etchDisabledText ? 1 : 0;
+
+ case SH_PopupMenu_Scrollable:
+ return d->scrollablePopupmenus ? 1 : 0;
+
+ case SH_MenuBar_AltKeyNavigation:
+ return d->menuAltKeyNavigation ? 1 : 0;
+
+ case SH_PopupMenu_SubMenuPopupDelay:
+ if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) )
+ return QMIN( 100, d->popupMenuDelay );
+ else
+ return d->popupMenuDelay;
+
+ case SH_PopupMenu_SloppySubMenus:
+ return d->sloppySubMenus;
+
+ case SH_ItemView_ChangeHighlightOnFocus:
+ case SH_Slider_SloppyKeyEvents:
+ case SH_MainWindow_SpaceBelowMenuBar:
+ case SH_PopupMenu_AllowActiveAndDisabled:
+ return 0;
+
+ case SH_Slider_SnapToValue:
+ case SH_PrintDialog_RightAlignButtons:
+ case SH_FontDialog_SelectAssociatedText:
+ case SH_MenuBar_MouseTracking:
+ case SH_PopupMenu_MouseTracking:
+ case SH_ComboBox_ListMouseTracking:
+ case SH_ScrollBar_MiddleClickAbsolutePosition:
+ return 1;
+ case SH_LineEdit_PasswordCharacter:
+ {
+ if (w) {
+ const QFontMetrics &fm = w->fontMetrics();
+ if (fm.inFont(QChar(0x25CF))) {
+ return 0x25CF;
+ } else if (fm.inFont(QChar(0x2022))) {
+ return 0x2022;
+ }
+ }
+ return '*';
+ }
+
+ default:
+ return QCommonStyle::styleHint(sh, w, opt, shr);
+ }
+}
+
+
+bool QtCKStyle::eventFilter( QObject* object, QEvent* event )
+{
+ if ( d->useFilledFrameWorkaround )
+ {
+ // Make the QMenuBar/QToolBar paintEvent() cover a larger area to
+ // ensure that the filled frame contents are properly painted.
+ // We essentially modify the paintEvent's rect to include the
+ // panel border, which also paints the widget's interior.
+ // This is nasty, but I see no other way to properly repaint
+ // filled frames in all QMenuBars and QToolBars.
+ // -- Karol.
+ QFrame *frame = 0;
+ if ( event->type() == QEvent::Paint
+ && (frame = ::qt_cast<QFrame*>(object)) )
+ {
+ if (frame->frameShape() != QFrame::ToolBarPanel && frame->frameShape() != QFrame::MenuBarPanel)
+ return false;
+
+ bool horizontal = true;
+ QPaintEvent* pe = (QPaintEvent*)event;
+ QToolBar *toolbar = ::qt_cast< QToolBar *>( frame );
+ QRect r = pe->rect();
+
+ if (toolbar && toolbar->orientation() == Qt::Vertical)
+ horizontal = false;
+
+ if (horizontal) {
+ if ( r.height() == frame->height() )
+ return false; // Let QFrame handle the painting now.
+
+ // Else, send a new paint event with an updated paint rect.
+ QPaintEvent dummyPE( QRect( r.x(), 0, r.width(), frame->height()) );
+ QApplication::sendEvent( frame, &dummyPE );
+ }
+ else { // Vertical
+ if ( r.width() == frame->width() )
+ return false;
+
+ QPaintEvent dummyPE( QRect( 0, r.y(), frame->width(), r.height()) );
+ QApplication::sendEvent( frame, &dummyPE );
+ }
+
+ // Discard this event as we sent a new paintEvent.
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void QtCKStyle::virtual_hook( int, void* )
+{ /*BASE::virtual_hook( id, data );*/ }
+
+// vim: set noet ts=4 sw=4:
+// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
+
+#include "qtc_kstyle.moc"
diff --git a/style/qtc_kstyle.h b/style/qtc_kstyle.h
new file mode 100644
index 0000000..9c8b059
--- /dev/null
+++ b/style/qtc_kstyle.h
@@ -0,0 +1,324 @@
+/*
+ * $Id$
+ *
+ * KStyle
+ * Copyright (C) 2001-2002 Karol Szwed <[email protected]>
+ *
+ * QWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
+ * Copyright (C) 1998-2000 TrollTech AS.
+ *
+ * Many thanks to Bradley T. Hughes for the 3 button scrollbar code.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __QTC_KSTYLE_H
+#define __QTC_KSTYLE_H
+
+// W A R N I N G
+// -------------
+// This API is still subject to change.
+// I will remove this warning when I feel the API is sufficiently flexible.
+
+#include <qcommonstyle.h>
+
+struct QtCKStylePrivate;
+/**
+ * Simplifies and extends the QStyle API to make style coding easier.
+ *
+ * The KStyle class provides a simple internal menu transparency engine
+ * which attempts to use XRender for accelerated blending where requested,
+ * or falls back to fast internal software tinting/blending routines.
+ * It also simplifies more complex portions of the QStyle API, such as
+ * the PopupMenuItems, ScrollBars and Sliders by providing extra "primitive
+ * elements" which are simple to implement by the style writer.
+ *
+ * @see QStyle::QStyle
+ * @see QCommonStyle::QCommonStyle
+ * @author Karol Szwed ([email protected])
+ * @version $Id$
+ */
+class QtCKStyle: public QCommonStyle
+{
+ Q_OBJECT
+
+ public:
+
+ /**
+ * QtCKStyle Flags:
+ *
+ * @li Default - Default style setting, where menu transparency
+ * and the FilledFrameWorkaround are disabled.
+ *
+ * @li AllowMenuTransparency - Enable this flag to use QtCKStyle's
+ * internal menu transparency engine.
+ *
+ * @li FilledFrameWorkaround - Enable this flag to facilitate
+ * proper repaints of QMenuBars and QToolBars when the style chooses
+ * to paint the interior of a QFrame. The style primitives in question
+ * are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses
+ * this workaround to enable painting of gradients in menubars and
+ * toolbars.
+ */
+ typedef uint KStyleFlags;
+ enum KStyleOption {
+ Default = 0x00000000, //!< All options disabled
+ AllowMenuTransparency = 0x00000001, //!< Internal transparency enabled
+ FilledFrameWorkaround = 0x00000002 //!< Filled frames enabled
+ };
+
+ /**
+ * KStyle ScrollBarType:
+ *
+ * Allows the style writer to easily select what type of scrollbar
+ * should be used without having to duplicate large amounts of source
+ * code by implementing the complex control CC_ScrollBar.
+ *
+ * @li WindowsStyleScrollBar - Two button scrollbar with the previous
+ * button at the top/left, and the next button at the bottom/right.
+ *
+ * @li PlatinumStyleScrollBar - Two button scrollbar with both the
+ * previous and next buttons at the bottom/right.
+ *
+ * @li ThreeButtonScrollBar - %KDE style three button scrollbar with
+ * two previous buttons, and one next button. The next button is always
+ * at the bottom/right, whilst the two previous buttons are on either
+ * end of the scrollbar.
+ *
+ * @li NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but
+ * with the buttons grouped on the opposite end of the scrollbar.
+ *
+ * @see KStyle::KStyle()
+ */
+ enum KStyleScrollBarType {
+ WindowsStyleScrollBar = 0x00000000, //!< two button, windows style
+ PlatinumStyleScrollBar = 0x00000001, //!< two button, platinum style
+ ThreeButtonScrollBar = 0x00000002, //!< three buttons, %KDE style
+ NextStyleScrollBar = 0x00000004 //!< two button, NeXT style
+ };
+
+ /**
+ * Constructs a KStyle object.
+ *
+ * Select the appropriate KStyle flags and scrollbar type
+ * for your style. The user's style preferences selected in KControl
+ * are read by using QSettings and are automatically applied to the style.
+ * As a fallback, KStyle paints progressbars and tabbars. It inherits from
+ * QCommonStyle for speed, so don't expect much to be implemented.
+ *
+ * It is advisable to use a currently implemented style such as the HighColor
+ * style as a foundation for any new KStyle, so the limited number of
+ * drawing fallbacks should not prove problematic.
+ *
+ * @param flags the style to be applied
+ * @param sbtype the scroll bar type
+ * @see KStyle::KStyleFlags
+ * @see KStyle::KStyleScrollBarType
+ * @author Karol Szwed ([email protected])
+ */
+ QtCKStyle( KStyleFlags flags = QtCKStyle::Default,
+ KStyleScrollBarType sbtype = QtCKStyle::WindowsStyleScrollBar );
+
+ /**
+ * Destructs the QtCKStyle object.
+ */
+ ~QtCKStyle();
+
+ /**
+ * Returns the default widget style depending on color depth.
+ */
+ static QString defaultStyle();
+
+ /**
+ * Modifies the scrollbar type used by the style.
+ *
+ * This function is only provided for convenience. It allows
+ * you to make a late decision about what scrollbar type to use for the
+ * style after performing some processing in your style's constructor.
+ * In most situations however, setting the scrollbar type via the QtCKStyle
+ * constructor should suffice.
+ * @param sbtype the scroll bar type
+ * @see QtCKStyle::KStyleScrollBarType
+ */
+ void setScrollBarType(KStyleScrollBarType sbtype);
+
+ /**
+ * Returns the KStyle flags used to initialize the style.
+ *
+ * This is used solely for the kcmstyle module, and hence is internal.
+ */
+ KStyleFlags styleFlags() const;
+
+ /**
+ * KStyle Primitive Elements:
+ *
+ * The KStyle class extends the Qt's Style API by providing certain
+ * simplifications for parts of QStyle. To do this, the KStylePrimitive
+ * elements were defined, which are very similar to Qt's PrimitiveElement.
+ *
+ * The first three Handle primitives simplify and extend PE_DockWindowHandle,
+ * so do not reimplement PE_DockWindowHandle if you want the KStyle handle
+ * simplifications to be operable. Similarly do not reimplement CC_Slider,
+ * SC_SliderGroove and SC_SliderHandle when using the KStyle slider
+ * primitives. KStyle automatically double-buffers slider painting
+ * when they are drawn via these KStyle primitives to avoid flicker.
+ *
+ * @li KPE_DockWindowHandle - This primitive is already implemented in KStyle,
+ * and paints a bevelled rect with the DockWindow caption text. Re-implement
+ * this primitive to perform other more fancy effects when drawing the dock window
+ * handle.
+ *
+ * @li KPE_ToolBarHandle - This primitive must be reimplemented. It currently
+ * only paints a filled rectangle as default behavior. This primitive is used
+ * to render QToolBar handles.
+ *
+ * @li KPE_GeneralHandle - This primitive must be reimplemented. It is used
+ * to render general handles that are not part of a QToolBar or QDockWindow, such
+ * as the applet handles used in Kicker. The default implementation paints a filled
+ * rect of arbitrary color.
+ *
+ * @li KPE_SliderGroove - This primitive must be reimplemented. It is used to
+ * paint the slider groove. The default implementation paints a filled rect of
+ * arbitrary color.
+ *
+ * @li KPE_SliderHandle - This primitive must be reimplemented. It is used to
+ * paint the slider handle. The default implementation paints a filled rect of
+ * arbitrary color.
+ *
+ * @li KPE_ListViewExpander - This primitive is already implemented in KStyle. It
+ * is used to draw the Expand/Collapse element in QListViews. To indicate the
+ * expanded state, the style flags are set to Style_Off, while Style_On implies collapsed.
+ *
+ * @li KPE_ListViewBranch - This primitive is already implemented in KStyle. It is
+ * used to draw the ListView branches where necessary.
+ */
+ enum KStylePrimitive {
+ KPE_DockWindowHandle,
+ KPE_ToolBarHandle,
+ KPE_GeneralHandle,
+
+ KPE_SliderGroove,
+ KPE_SliderHandle,
+
+ KPE_ListViewExpander,
+ KPE_ListViewBranch
+ };
+
+ /**
+ * This function is identical to Qt's QStyle::drawPrimitive(), except that
+ * it adds one further parameter, 'widget', that can be used to determine
+ * the widget state of the KStylePrimitive in question.
+ *
+ * @see KStyle::KStylePrimitive
+ * @see QStyle::drawPrimitive
+ * @see QStyle::drawComplexControl
+ */
+ virtual void drawKStylePrimitive( KStylePrimitive kpe,
+ QPainter* p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+
+ enum KStylePixelMetric {
+ KPM_MenuItemSeparatorHeight = 0x00000001,
+ KPM_MenuItemHMargin = 0x00000002,
+ KPM_MenuItemVMargin = 0x00000004,
+ KPM_MenuItemHFrame = 0x00000008,
+ KPM_MenuItemVFrame = 0x00000010,
+ KPM_MenuItemCheckMarkHMargin = 0x00000020,
+ KPM_MenuItemArrowHMargin = 0x00000040,
+ KPM_MenuItemTabSpacing = 0x00000080,
+ KPM_ListViewBranchThickness = 0x00000100
+ };
+
+ int kPixelMetric( KStylePixelMetric kpm, const QWidget* widget = 0 ) const;
+
+ // ---------------------------------------------------------------------------
+
+ void polish( QWidget* widget );
+ void unPolish( QWidget* widget );
+ void polishPopupMenu( QPopupMenu* );
+
+ void drawPrimitive( PrimitiveElement pe,
+ QPainter* p,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ void drawControl( ControlElement element,
+ QPainter* p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ void drawComplexControl( ComplexControl control,
+ QPainter *p,
+ const QWidget* widget,
+ const QRect &r,
+ const QColorGroup &cg,
+ SFlags flags = Style_Default,
+ SCFlags controls = SC_All,
+ SCFlags active = SC_None,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ SubControl querySubControl( ComplexControl control,
+ const QWidget* widget,
+ const QPoint &pos,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ QRect querySubControlMetrics( ComplexControl control,
+ const QWidget* widget,
+ SubControl sc,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ int pixelMetric( PixelMetric m,
+ const QWidget* widget = 0 ) const;
+
+ QRect subRect( SubRect r,
+ const QWidget* widget ) const;
+
+ QPixmap stylePixmap( StylePixmap stylepixmap,
+ const QWidget* widget = 0,
+ const QStyleOption& = QStyleOption::Default ) const;
+
+ int styleHint( StyleHint sh,
+ const QWidget* w = 0,
+ const QStyleOption &opt = QStyleOption::Default,
+ QStyleHintReturn* shr = 0 ) const;
+
+ protected:
+ bool eventFilter( QObject* object, QEvent* event );
+
+ private:
+ // Disable copy constructor and = operator
+ QtCKStyle( const QtCKStyle & );
+ QtCKStyle& operator=( const QtCKStyle & );
+
+ protected:
+ virtual void virtual_hook( int id, void* data );
+ private:
+ QtCKStylePrivate *d;
+};
+
+
+// vim: set noet ts=4 sw=4:
+#endif
+
diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp
index de2cc1f..f5dbdbc 100644
--- a/style/qtcurve.cpp
+++ b/style/qtcurve.cpp
@@ -1,5 +1,5 @@
/*
- QtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
+ QtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -54,13 +54,17 @@ Srollbars:
For some reason Scrollbars in KHTML seem to lose the bottom/left pixels. As if KHTML expects
the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the pixelMetric
-function will return 1 scrollbar with 1 greater than standard for form widgets, or where widget==NULL
+function will return 1 scrollbar with 1 greater than standard for form widgets, or where widget==0L
In the CC_ScrollBar draw code, the rects used for each component are shrunk by 1, in the appropriate
dimension, so as to draw the scrollbar at the correct size.
*/
+#include <qtable.h>
+#include "config.h"
+#ifndef QTC_QT_ONLY
#include <kdeversion.h>
+#endif
#include <qsettings.h>
#include <qmenubar.h>
#include <qapplication.h>
@@ -95,11 +99,15 @@ dimension, so as to draw the scrollbar at the correct size.
#include <qtimer.h>
#include <qdatetimeedit.h>
#include <qobjectlist.h>
+#include <qpixmapcache.h>
+#include <qbitmap.h>
+#include <qmainwindow.h>
#include <math.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
-#define QTC_COMMON_FUNCTIONS
+#include <iostream>
+#define COMMON_FUNCTIONS
#include "qtcurve.h"
#define CONFIG_READ
#include "config_file.c"
@@ -109,9 +117,134 @@ dimension, so as to draw the scrollbar at the correct size.
#include <qstyleplugin.h>
#include <qgroupbox.h>
#include <qdir.h>
+// Need access to classname from within QMetaObject...
+#define private public
+#include <qmetaobject.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
-#include <fixx11h.h>
+#include "qtc_fixx11h.h"
+
+static const Atom constNetMoveResize = XInternAtom(qt_xdisplay(), "_NET_WM_MOVERESIZE", False);
+static const QWidget * getTopLevel(const QWidget *widget)
+{
+ const QWidget *w=widget;
+
+ while(w && !w->isTopLevel())
+ w=w->parentWidget();
+ return w;
+}
+
+static void emitMenuSize(const QWidget *widget, unsigned short size)
+{
+ const QWidget *w=getTopLevel(widget);
+
+ if(w)
+ {
+ static const Atom constAtom = XInternAtom(qt_xdisplay(), MENU_SIZE_ATOM, False);
+ XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(),
+ constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&size, 1);
+ }
+}
+
+void setBgndProp(QWidget *widget, unsigned short app)
+{
+ const QWidget *w=getTopLevel(widget);
+
+ if(w)
+ {
+ static const Atom constAtom = XInternAtom(qt_xdisplay(), BGND_ATOM, False);
+ XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(),
+ constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&app, 1);
+ }
+}
+
+static void triggerWMMove(const QWidget *w, const QPoint &p)
+{
+ //...Taken from bespin...
+ // stolen... errr "adapted!" from QSizeGrip
+ XEvent xev;
+ xev.xclient.type = ClientMessage;
+ xev.xclient.message_type = constNetMoveResize;
+ xev.xclient.display = qt_xdisplay();
+ xev.xclient.window = w->parentWidget() ? w->parentWidget()->winId() : w->winId();
+ xev.xclient.format = 32;
+ xev.xclient.data.l[0] = p.x();
+ xev.xclient.data.l[1] = p.y();
+ xev.xclient.data.l[2] = 8; // NET::Move
+ xev.xclient.data.l[3] = Button1;
+ xev.xclient.data.l[4] = 0;
+ XUngrabPointer(qt_xdisplay(), CurrentTime);
+ XSendEvent(qt_xdisplay(), qt_xrootwin(), False,
+ SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+}
+
+#define MO_ARROW_X(FLAGS, COL) (MO_NONE!=opts.coloredMouseOver && FLAGS&Style_MouseOver && FLAGS&Style_Enabled ? itsMouseOverCols[ARROW_MO_SHADE] : COL)
+#define MO_ARROW(COL) MO_ARROW_X(flags, COL)
+
+static const int constMenuPixmapWidth=22;
+
+static bool useQt3Settings()
+{
+ static int ver=0;
+
+ if(0==ver)
+ {
+ const char *sessionVersion=getenv("KDE_SESSION_VERSION");
+
+ ver=sessionVersion
+ ? atoi(sessionVersion)<4
+ ? 3
+ : 4
+#ifdef QTC_DEFAULT_TO_KDE3
+ : 3;
+#else
+ : getenv("KDE_FULL_SESSION")
+ ? 3
+ : 4;
+#endif
+ }
+
+ return 3==ver;
+}
+
+static QRect adjusted(const QRect r, int xp1, int yp1, int xp2, int yp2)
+{
+ int x1, y1, x2, y2;
+
+ r.coords(&x1, &y1, &x2, &y2);
+ return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2));
+}
+
+static void adjust(QRect &r, int dx1, int dy1, int dx2, int dy2)
+{
+ int x1, y1, x2, y2;
+
+ r.coords(&x1, &y1, &x2, &y2);
+ x1 += dx1;
+ y1 += dy1;
+ x2 += dx2;
+ y2 += dy2;
+ r.setCoords(x1, y1, x2, y2);
+}
+
+inline bool isSpecialHover(QWidget *w)
+{
+ return w && (
+#if QT_VERSION >= 0x030200
+ ::qt_cast<QRadioButton *>(w) ||
+ ::qt_cast<QCheckBox *>(w) ||
+#endif
+ ::qt_cast<QScrollBar *>(w) ||
+#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
+ ::qt_cast<QToolButton *>(w) ||
+
+#endif
+ ::qt_cast<QHeader *>(w) ||
+ ::qt_cast<QSpinWidget *>(w) ||
+ ::qt_cast<QComboBox *>(w) ||
+ ::qt_cast<QTabBar *>(w)
+ );
+}
static QString readEnvPath(const char *env)
{
@@ -120,41 +253,90 @@ static QString readEnvPath(const char *env)
return path.isEmpty() ? QString::null : QFile::decodeName(path);
}
-static QString kdeHome()
+static QString kdeHome(bool kde3=false)
{
- QString env(readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME"));
+ static QString kdeHome[2];
+
+ // Execute kde-config to ascertain users KDEHOME
+ if(kdeHome[kde3 ? 0 : 1].isEmpty())
+ {
+ FILE *fpipe;
+
+ if (fpipe = (FILE*)popen(kde3 ? "kde-config --localprefix 2> /dev/null" : "kde4-config --localprefix 2> /dev/null", "r"))
+ {
+ char line[1024];
+
+ while(fgets(line, sizeof line, fpipe))
+ {
+ kdeHome[kde3 ? 0 : 1]=QFile::decodeName(line).replace("\n", "");
+ break;
+ }
+ pclose(fpipe);
+ }
+ }
- return env.isEmpty()
- ? QDir::homeDirPath()+"/.kde"
- : env;
+ // Try env vars...
+ if(kdeHome[kde3 ? 0 : 1].isEmpty())
+ {
+ kdeHome[kde3 ? 0 : 1]=readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
+ if (kdeHome[kde3 ? 0 : 1].isEmpty())
+ {
+ QDir homeDir(QDir::homeDirPath());
+ QString kdeConfDir("/.kde");
+ if (!kde3 && homeDir.exists(".kde4"))
+ kdeConfDir = QString("/.kde4");
+ kdeHome[kde3 ? 0 : 1] = QDir::homeDirPath() + kdeConfDir;
+ }
+ }
+ return kdeHome[kde3 ? 0 : 1];
}
-static void getStyles(const QString &dir, QStringList &styles)
+#ifdef QTC_STYLE_SUPPORT
+static void getStyles(const QString &dir, const char *sub, QStringList &styles)
{
- QDir d(dir+QTC_THEME_DIR);
+ QDir d(dir+sub);
- d.setNameFilter(QTC_THEME_PREFIX"*"QTC_THEME_SUFFIX);
+ if(d.exists())
+ {
+ d.setNameFilter(THEME_PREFIX"*"THEME_SUFFIX);
- QStringList entries(d.entryList());
- QStringList::ConstIterator it(entries.begin()),
- end(entries.end());
+ QStringList entries(d.entryList());
+ QStringList::ConstIterator it(entries.begin()),
+ end(entries.end());
- for(; it!=end; ++it)
- {
- QString style((*it).left((*it).findRev(QTC_THEME_SUFFIX)));
+ for(; it!=end; ++it)
+ {
+ QString style((*it).left((*it).findRev(THEME_SUFFIX)));
- if(!styles.contains(style))
- styles.append(style);
+ if(!styles.contains(style))
+ styles.append(style);
+ }
}
}
-static QString themeFile(const QString &dir, const QString &n)
+static void getStyles(const QString &dir, QStringList &styles)
+{
+ getStyles(dir, THEME_DIR, styles);
+ getStyles(dir, THEME_DIR4, styles);
+}
+
+static QString themeFile(const QString &dir, const QString &n, const char *sub)
{
- QString name(dir+QTC_THEME_DIR+n+QTC_THEME_SUFFIX);
+ QString name(dir+sub+n+THEME_SUFFIX);
return QFile(name).exists() ? name : QString();
}
+static QString themeFile(const QString &dir, const QString &n, bool kde3=true)
+{
+ QString name(themeFile(dir, n, kde3 ? THEME_DIR : THEME_DIR4));
+
+ if(name.isEmpty())
+ name=themeFile(dir, n, kde3 ? THEME_DIR4 : THEME_DIR);
+ return name;
+}
+#endif
+
class QtCurveStylePlugin : public QStylePlugin
{
public:
@@ -166,9 +348,12 @@ class QtCurveStylePlugin : public QStylePlugin
QStringList list;
list << "QtCurve";
- getStyles(kdeHome(), list);
- getStyles(KDE_PREFIX(3), list);
- getStyles(KDE_PREFIX(4), list);
+#ifdef QTC_STYLE_SUPPORT
+ getStyles(kdeHome(useQt3Settings()), list);
+ getStyles(kdeHome(!useQt3Settings()), list);
+ getStyles(KDE_PREFIX(useQt3Settings() ? 3 : 4), list);
+ getStyles(KDE_PREFIX(useQt3Settings() ? 4 : 3), list);
+#endif
return list;
}
@@ -177,36 +362,42 @@ class QtCurveStylePlugin : public QStylePlugin
{
return "qtcurve"==s.lower()
? new QtCurveStyle
- : 0==s.find(QTC_THEME_PREFIX)
+#ifdef QTC_STYLE_SUPPORT
+ : 0==s.find(THEME_PREFIX)
? new QtCurveStyle(s)
+#endif
: 0;
}
};
Q_EXPORT_PLUGIN(QtCurveStylePlugin)
-#define QTC_SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp)
+#define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp)
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
#include <qfile.h>
#endif
-#define QTC_NO_SECT -1
+#define NO_SECT -1
+
+#define VERTICAL_TB_BUTTON 0x01000000
+#define CHECK_BUTTON 0x02000000
+#define STD_TOOLBUTTON 0x04000000
+#define TOGGLE_BUTTON 0x08000000
+#define NO_ETCH_BUTTON 0x10000000
+#define DW_CLOSE_BUTTON 0x80000000
+#define LISTVIEW_ITEM 0x20000000
+#define MENU_ITEM 0x40000000
+#define WINDOWTITLE_SPACER 0x10000000
-#define QTC_VERTICAL_TB_BUTTON 0x01000000
-#define QTC_CHECK_BUTTON 0x02000000
-#define QTC_STD_TOOLBUTTON 0x04000000
-#define QTC_TOGGLE_BUTTON 0x08000000
-#define QTC_NO_ETCH_BUTTON 0x10000000
-#define QTC_LISTVIEW_ITEM 0x20000000
-#define QTC_MENU_ITEM 0x40000000
+#define DW_BGND 105
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
// Try to read $KDEHOME/share/config/kickerrc to find out if kicker is transparent...
static bool kickerIsTrans()
{
- QString cfgFileName(kdeHome()+"/share/config/kickerrc");
+ QString cfgFileName(kdeHome(true)+"/share/config/kickerrc");
bool trans(false);
QFile cfgFile(cfgFileName);
@@ -223,16 +414,16 @@ static bool kickerIsTrans()
if(inGen)
{
- if(0==line.find("Transparent=")) // Found it!
+ if(0==line.find("Transparent=", false)) // Found it!
{
- if(-1!=line.find("true"))
+ if(-1!=line.find("true", false))
trans=true;
stop=true;
}
else if(line[0]==QChar('[')) // Then wasn't in General section...
stop=true;
}
- else if(0==line.find("[General]"))
+ else if(0==line.find("[General]", false))
inGen=true;
}
cfgFile.close();
@@ -242,13 +433,6 @@ static bool kickerIsTrans()
}
#endif
-inline QColor midColor(const QColor &a, const QColor &b, double factor=1.0)
-{
- return QColor((a.red()+limit(b.red()*factor))>>1,
- (a.green()+limit(b.green()*factor))>>1,
- (a.blue()+limit(b.blue()*factor))>>1);
-}
-
static bool isKhtmlWidget(const QWidget *w, int level=1)
{
return w && ((w->name() && 0==strcmp(w->name(), "__khtml")) ||
@@ -264,7 +448,7 @@ static bool isKhtmlFormWidget(const QWidget *widget)
//Form widgets are in the KHTMLView, but that has 2 further inner levels
//of widgets - QClipperWidget, and outside of that, QViewportWidget
- QWidget *potentialClipPort(widget ? widget->parentWidget() : NULL);
+ QWidget *potentialClipPort(widget ? widget->parentWidget() : 0L);
if (!potentialClipPort || potentialClipPort->isTopLevel())
return false;
@@ -284,20 +468,118 @@ static bool isKhtmlFormWidget(const QWidget *widget)
return true;
}
-QColor shade(const QColor &a, float k)
+static bool inStackWidget(const QWidget *w)
{
- QColor mod;
+ while(w)
+ {
+ if(::qt_cast<const QTabWidget *>(w))
+ return true;
+ w=w->parentWidget();
+ }
+
+ return false;
+}
- shade(a, &mod, k);
- return mod;
+static void setRgb(QColor *col, const QStringList &rgb)
+{
+ if(3==rgb.size())
+ *col=QColor(rgb[0].toInt(), rgb[1].toInt(), rgb[2].toInt());
+}
+
+struct KDESettings
+{
+ KDESettings()
+ {
+ inactiveHighlight=false;
+ }
+
+ bool inactiveHighlight;
+ QColor hover,
+ focus;
+};
+
+static KDESettings kdeSettings;
+static bool readKdeGlobals()
+{
+ static int lastCheck=0;
+
+ int now=time(0L);
+
+ // Dont keep on reading kdeglobals file - only read if its been at least 2 seconds since the last time...
+ if(abs(now-lastCheck)<3)
+ return false;
+
+
+ QColor highlight(QApplication::palette().active().highlight());
+ bool inactiveEnabled(false),
+ changeSelectionColor(false),
+ useQt3(useQt3Settings());
+ QFile f(kdeHome(useQt3)+"/share/config/kdeglobals");
+
+ lastCheck=now;
+
+ if(useQt3)
+ kdeSettings.hover=kdeSettings.focus=highlight;
+ else
+ {
+ kdeSettings.hover=QColor(119, 183, 255);
+ kdeSettings.focus=QColor( 43, 116, 199);
+ }
+
+ if(f.open(IO_ReadOnly))
+ {
+ QTextStream in(&f);
+ bool inPal(false),
+ inInactive(false),
+ donePal(useQt3),
+ doneInactive(false);
+
+ while (!in.atEnd() && (!donePal || !doneInactive))
+ {
+ QString line(in.readLine());
+ if(inPal)
+ {
+ if(0==line.find("DecorationFocus=", false))
+ setRgb(&kdeSettings.focus, QStringList::split(",", line.mid(16)));
+ else if(0==line.find("DecorationHover=", false))
+ setRgb(&kdeSettings.hover, QStringList::split(",", line.mid(16)));
+ else if (-1!=line.find('['))
+ {
+ donePal=true;
+ inPal=false;
+ }
+ }
+ else if(inInactive)
+ {
+ if(0==line.find("ChangeSelectionColor=", false))
+ changeSelectionColor=line.find("=true");
+ else if(0==line.find("Enable=", false))
+ inactiveEnabled=line.find("=true");
+ else if (-1!=line.find('['))
+ {
+ doneInactive=true;
+ inInactive=false;
+ }
+ }
+ if(!inPal && !inInactive)
+ if(!useQt3 && 0==line.find("[Colors:Button]", false))
+ inPal=true;
+ else if(!useQt3 && 0==line.find("[ColorEffects:Inactive]", false))
+ inInactive=true;
+ }
+ f.close();
+ }
+
+ kdeSettings.inactiveHighlight=changeSelectionColor && inactiveEnabled;
+ return true;
}
static void drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int offset,
- const QColor *cols, int startOffset, int dark, int etchedDisp=1,
- bool light=true)
+ const QColor *cols, int startOffset, int dark, ELine type)
{
- int space((nLines*2)+(etchedDisp || !light ? (nLines-1) : 0)),
- step(etchedDisp || !light ? 3 : 2),
+ int space((nLines*2)+(LINE_DASHES!=type ? (nLines-1) : 0)),
+ step(LINE_DASHES!=type ? 3 : 2),
+ etchedDisp(LINE_SUNKEN==type ? 1 : 0),
x(horiz ? r.x(): r.x()+((r.width()-space)>>1)),
y(horiz ? r.y()+((r.height()-space)>>1): r.y()),
x2(r.x()+r.width()-1),
@@ -311,13 +593,15 @@ static void drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int o
p->setPen(cols[dark]);
for(i=0; i<space; i+=step)
- p->drawLine(x+offset, y+i, x2-(offset+etchedDisp), y+i);
+ p->drawLine(x+offset, y+i, x2-offset, y+i);
- if(light)
+ if(LINE_FLAT!=type)
{
+ x+=etchedDisp;
+ x2+=etchedDisp;
p->setPen(cols[0]);
for(i=1; i<space; i+=step)
- p->drawLine(x+offset+etchedDisp, y+i, x2-offset, y+i);
+ p->drawLine(x+offset, y+i, x2-offset, y+i);
}
}
else
@@ -327,13 +611,15 @@ static void drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int o
p->setPen(cols[dark]);
for(i=0; i<space; i+=step)
- p->drawLine(x+i, y+offset, x+i, y2-(offset+etchedDisp));
+ p->drawLine(x+i, y+offset, x+i, y2-offset);
- if(light)
+ if(LINE_FLAT!=type)
{
+ y+=etchedDisp;
+ y2+=etchedDisp;
p->setPen(cols[0]);
for(i=1; i<space; i+=step)
- p->drawLine(x+i, y+offset+etchedDisp, x+i, y2-offset);
+ p->drawLine(x+i, y+offset, x+i, y2-offset);
}
}
}
@@ -387,38 +673,28 @@ static bool onToolBar(QWidget *widget, int l=0)
: false;
}
-enum ECacheAppearance
-{
- CACHE_APPEARANCE_SELECTED=APPEARANCE_BEVELLED+1
-};
+#define PIXMAP_DIMENSION 10
-inline int app2App(EAppearance app, bool sel)
+enum ECacheFlags
{
- return sel ? (int)CACHE_APPEARANCE_SELECTED : (int)app;
-}
-
-#define QTC_PIXMAP_DIMENSION 10
+ CACHE_STD,
+ CACHE_COL_SEL_TAB
+};
-static int double2int(double d) { return (int)(d*100); }
-static QString createKey(int size, QRgb color, bool horiz, bool increase=false, int app=0,
- EWidget w=WIDGET_OTHER, double shadeTop=0.0, double shadeBot=0.0)
+static QString createKey(int size, QRgb color, bool horiz, int app, ECacheFlags flags)
{
QString key;
- if(WIDGET_DEF_BUTTON==w && !IS_GLASS(app)) // Glass uses different shading for def button...
- w=WIDGET_STD_BUTTON;
-
- QTextOStream(&key) << size << color << horiz << increase << app << (int)w
- << ' ' << double2int(shadeTop) << ' ' << double2int(shadeBot);
+ QTextOStream(&key) << size << '-' << color << '-' << horiz << '-' << app << '-' << flags;
return key;
}
-static QString createKey(QRgb color)
+static QString createKey(QRgb color, char type='p')
{
QString key;
- QTextOStream(&key) << 'p' << color;
+ QTextOStream(&key) << type << color;
return key;
}
@@ -432,104 +708,39 @@ static QString createKey(QRgb color, EPixmap p)
return key;
}
-static void readPal(QString &line, QPalette::ColorGroup grp, QPalette &pal)
+#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
+static void parseWindowLine(const QString &line, QValueList<int> &data)
{
- QStringList cols(QStringList::split(", ", line.mid(line.find("=#")+1)));
-
- if(17==cols.count())
- {
- QStringList::ConstIterator it(cols.begin()),
- end(cols.end());
- QColorGroup group;
-
- for(int i=0; it!=end, i<16; ++it, ++i)
- {
- QColor col;
-
- setRgb(&col, (*it).latin1());
- group.setColor((QColorGroup::ColorRole)i, col);
- }
+ int len(line.length());
- switch(grp)
+ for(int i=0; i<len; ++i)
+ switch(line[i].latin1())
{
- case QPalette::Active:
- pal.setActive(group);
+ case 'M':
+ data.append(QStyle::SC_TitleBarSysMenu);
+ break;
+ case '_':
+ data.append(WINDOWTITLE_SPACER);
+ break;
+// case 'H':
+// data.append(QStyle::SC_TitleBarContextHelpButton);
+// break;
+ case 'L':
+ data.append(QStyle::SC_TitleBarShadeButton);
break;
- case QPalette::Disabled:
- pal.setDisabled(group);
+ case 'I':
+ data.append(QStyle::SC_TitleBarMinButton);
break;
- case QPalette::Inactive:
- pal.setInactive(group);
+ case 'A':
+ data.append(QStyle::SC_TitleBarMaxButton);
+ break;
+ case 'X':
+ data.append(QStyle::SC_TitleBarCloseButton);
default:
break;
}
- }
-}
-
-static bool readQt4(QFile &f, QPalette &pal, QFont &font)
-{
- bool inSect(false),
- gotPal(false),
- gotFont(false);
-
- if(f.open(IO_ReadOnly))
- {
- QTextStream in(&f);
-
- while (!in.atEnd())
- {
- QString line(in.readLine());
-
- if(inSect)
- {
- gotPal=true;
- if(0==line.find("Palette\\active=#"))
- {
- readPal(line, QPalette::Active, pal);
- gotPal=true;
- }
- else if(0==line.find("Palette\\disabled=#"))
- {
- readPal(line, QPalette::Disabled, pal);
- gotPal=true;
- }
- else if(0==line.find("Palette\\inactive=#"))
- {
- readPal(line, QPalette::Inactive, pal);
- gotPal=true;
- }
- else if(0==line.find("font=\""))
- gotFont=font.fromString(line.mid(6, line.findRev('\"')-6));
- else if (0==line.find('['))
- break;
- }
- else if(0==line.find("[Qt]"))
- inSect=true;
- }
- f.close();
- }
-
- return gotPal && gotFont;
-}
-
-static bool useQt4Settings()
-{
- static const char *vers=getenv("KDE_SESSION_VERSION");
-
- return vers && atoi(vers)>=4;
-}
-
-static bool readQt4(QPalette &pal, QFont &font)
-{
- if(useQt4Settings())
- {
- QFile file(xdgConfigFolder()+QString("Trolltech.conf"));
-
- if(file.exists())
- return readQt4(file, pal, font);
- }
- return false;
}
+#endif
static bool isCheckBoxOfGroupBox(const QObject *w)
{
@@ -538,108 +749,346 @@ static bool isCheckBoxOfGroupBox(const QObject *w)
!qstrcmp(w->name(), "qt_groupbox_checkbox");
}
-//
-// OO.o 2.x checks to see whether the used theme "inherits" from HighContrastStyle,
-// if so it uses the highlightedText color to draw highlighted menubar and popup menu
-// items. Otherwise it uses the standard color. So faking this inheritance, solves this
-// problem.
-HighContrastStyle::HighContrastStyle()
- : KStyle(AllowMenuTransparency, WindowsStyleScrollBar)
+static void drawArrow(QPainter *p, const QRect &r, const QColor &col, QStyle::PrimitiveElement pe, const Options &opts, bool small=false)
{
+ QPointArray a;
+
+ if(small)
+ switch(pe)
+ {
+ case QStyle::PE_ArrowUp:
+ a.setPoints(opts.vArrows ? 6 : 3, 2,0, 0,-2, -2,0, -2,1, 0,-1, 2,1);
+ break;
+ case QStyle::PE_ArrowDown:
+ a.setPoints(opts.vArrows ? 6 : 3, 2,0, 0,2, -2,0, -2,-1, 0,1, 2,-1);
+ break;
+ case QStyle::PE_ArrowRight:
+ a.setPoints(opts.vArrows ? 6 : 3, 0,-2, 2,0, 0,2, -1,2, 1,0 -1,-2);
+ break;
+ case QStyle::PE_ArrowLeft:
+ a.setPoints(opts.vArrows ? 6 : 3, 0,-2, -2,0, 0,2, 1,2, -1,0, 1,-2);
+ break;
+ default:
+ return;
+ }
+ else // Large arrows...
+ switch(pe)
+ {
+ case QStyle::PE_ArrowUp:
+ a.setPoints(opts.vArrows ? 8 : 3, 3,1, 0,-2, -3,1, -3,2, -2,2, 0,0, 2,2, 3,2);
+ break;
+ case QStyle::PE_ArrowDown:
+ a.setPoints(opts.vArrows ? 8 : 3, 3,-1, 0,2, -3,-1, -3,-2, -2,-2, 0,0, 2,-2, 3,-2);
+ break;
+ case QStyle::PE_ArrowRight:
+ a.setPoints(opts.vArrows ? 8 : 3, -1,-3, 2,0, -1,3, -2,3, -2,2, 0,0, -2,-2, -2,-3);
+ break;
+ case QStyle::PE_ArrowLeft:
+ a.setPoints(opts.vArrows ? 8 : 3, 1,-3, -2,0, 1,3, 2,3, 2,2, 0,0, 2,-2, 2,-3);
+ break;
+ default:
+ return;
+ }
+
+ if(a.isNull())
+ return;
+
+ p->save();
+ a.translate((r.x()+(r.width()>>1)),(r.y()+(r.height()>>1)));
+ p->setBrush(col);
+ p->setPen(col);
+ p->drawPolygon(a);
+ p->restore();
}
+#ifdef QTC_STYLE_SUPPORT
QtCurveStyle::QtCurveStyle(const QString &name)
- : itsSliderCols(NULL),
- itsDefBtnCols(NULL),
- itsMouseOverCols(NULL),
- itsSidebarButtonsCols(NULL),
+#else
+QtCurveStyle::QtCurveStyle()
+#endif
+ : BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar),
+ itsSliderCols(0L),
+ itsDefBtnCols(0L),
+ itsMouseOverCols(0L),
+ itsComboBtnCols(0L),
+ itsCheckRadioSelCols(0L),
+ itsSortedLvColors(0L),
+ itsProgressCols(0L),
+ itsSidebarButtonsCols(0L),
+ itsActiveMdiColors(0L),
+ itsMdiColors(0L),
itsThemedApp(APP_OTHER),
itsPixmapCache(150000, 499),
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsIsTransKicker(false),
#endif
itsHover(HOVER_NONE),
itsOldPos(-1, -1),
itsFormMode(false),
- itsHoverWidget(NULL),
- itsHoverSect(QTC_NO_SECT),
- itsHoverTab(NULL),
- itsMactorPal(NULL),
+ itsHoverWidget(0L),
+ itsHoverSect(NO_SECT),
+ itsHoverTab(0L),
+ itsMactorPal(0L),
itsActive(true),
- itsIsSpecialHover(false)
+ itsIsSpecialHover(false),
+ itsDragWidget(0L),
+ itsDragWidgetHadMouseTracking(false)
{
+#ifdef QTC_STYLE_SUPPORT
QString rcFile;
-
- defaultSettings(&opts);
if(!name.isEmpty())
{
- rcFile=themeFile(kdeHome(), name);
+ rcFile=themeFile(kdeHome(), name, useQt3Settings());
if(rcFile.isEmpty())
{
- rcFile=themeFile(KDE_PREFIX(useQt4Settings() ? 4 : 3), name);
+ rcFile=themeFile(kdeHome(true), name);
if(rcFile.isEmpty())
- rcFile=themeFile(KDE_PREFIX(useQt4Settings() ? 3 : 4), name);
+ {
+ rcFile=themeFile(KDE_PREFIX(useQt3Settings() ? 3 : 4), name, useQt3Settings());
+ if(rcFile.isEmpty())
+ rcFile=themeFile(KDE_PREFIX(useQt3Settings() ? 4 : 3), name, !useQt3Settings());
+ }
}
}
- readConfig(rcFile, &opts, &opts);
- opts.contrast=QSettings().readNumEntry("/Qt/KDE/contrast", 7);
+ readConfig(rcFile, &opts);
+#else
+ readConfig(QString(), &opts);
+#endif
+
+ if(FRAME_LINE==opts.groupBox || opts.gbLabel&GB_LBL_BOLD)
+ opts.groupBox=FRAME_NONE;
+
+ opts.contrast=QSettings().readNumEntry("/Qt/KDE/contrast", DEFAULT_CONTRAST);
if(opts.contrast<0 || opts.contrast>10)
- opts.contrast=7;
- itsPixmapCache.setAutoDelete(true);
+ opts.contrast=DEFAULT_CONTRAST;
- if ((SHADE_CUSTOM==opts.shadeMenubars || SHADE_BLEND_SELECTED==opts.shadeMenubars) &&
- "soffice.bin"==QString(qApp->argv()[0]) && TOO_DARK(SHADE_CUSTOM==opts.shadeMenubars
- ? opts.customMenubarsColor
- : itsMenuitemCols[ORIGINAL_SHADE]))
- opts.shadeMenubars=SHADE_DARKEN;
+ itsPixmapCache.setAutoDelete(true);
- shadeColors(QApplication::palette().active().highlight(), itsMenuitemCols);
+ shadeColors(QApplication::palette().active().highlight(), itsHighlightCols);
shadeColors(QApplication::palette().active().background(), itsBackgroundCols);
shadeColors(QApplication::palette().active().button(), itsButtonCols);
- if(SHADE_SELECTED==opts.shadeSliders)
- itsSliderCols=itsMenuitemCols;
- else if(SHADE_NONE!=opts.shadeSliders)
+
+ setDecorationColors(true);
+
+ switch(opts.shadeSliders)
{
- itsSliderCols=new QColor [TOTAL_SHADES+1];
- shadeColors(SHADE_BLEND_SELECTED==opts.shadeSliders
- ? midColor(itsMenuitemCols[ORIGINAL_SHADE],
- itsButtonCols[ORIGINAL_SHADE])
- : opts.customSlidersColor,
- itsSliderCols);
+ default:
+ case SHADE_DARKEN:
+ case SHADE_NONE:
+ break;
+ case SHADE_SELECTED:
+ itsSliderCols=itsHighlightCols;
+ break;
+ case SHADE_BLEND_SELECTED:
+ case SHADE_CUSTOM:
+ if(!itsSliderCols)
+ itsSliderCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(SHADE_BLEND_SELECTED==opts.shadeSliders
+ ? midColor(itsHighlightCols[ORIGINAL_SHADE],
+ itsButtonCols[ORIGINAL_SHADE])
+ : opts.customSlidersColor,
+ itsSliderCols);
}
- if(IND_COLORED==opts.defBtnIndicator)
- if(SHADE_BLEND_SELECTED==opts.shadeSliders)
- itsDefBtnCols=itsSliderCols;
- else
- {
+ switch(opts.defBtnIndicator)
+ {
+ case IND_GLOW:
+ case IND_SELECTED:
+ itsDefBtnCols=itsHighlightCols;
+ break;
+ case IND_TINT:
itsDefBtnCols=new QColor [TOTAL_SHADES+1];
- shadeColors(midColor(itsMenuitemCols[ORIGINAL_SHADE],
- itsButtonCols[ORIGINAL_SHADE]), itsDefBtnCols);
- }
+ shadeColors(tint(itsButtonCols[ORIGINAL_SHADE],
+ itsHighlightCols[ORIGINAL_SHADE], DEF_BNT_TINT), itsDefBtnCols);
+ break;
+ default:
+ break;
+ case IND_COLORED:
+ if(SHADE_BLEND_SELECTED==opts.shadeSliders)
+ itsDefBtnCols=itsSliderCols;
+ else
+ {
+ itsDefBtnCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE],
+ itsButtonCols[ORIGINAL_SHADE]), itsDefBtnCols);
+ }
+ }
+
+ switch(opts.comboBtn)
+ {
+ default:
+ case SHADE_DARKEN:
+ case SHADE_NONE:
+ break;
+ case SHADE_SELECTED:
+ itsComboBtnCols=itsHighlightCols;
+ break;
+ case SHADE_BLEND_SELECTED:
+ if(opts.shadeSliders==SHADE_BLEND_SELECTED)
+ {
+ itsComboBtnCols=itsSliderCols;
+ break;
+ }
+ case SHADE_CUSTOM:
+ if(opts.shadeSliders==SHADE_CUSTOM && opts.customSlidersColor==opts.customComboBtnColor)
+ {
+ itsComboBtnCols=itsSliderCols;
+ break;
+ }
+ if(!itsComboBtnCols)
+ itsComboBtnCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(SHADE_BLEND_SELECTED==opts.comboBtn
+ ? midColor(itsHighlightCols[ORIGINAL_SHADE],
+ itsButtonCols[ORIGINAL_SHADE])
+ : opts.customComboBtnColor,
+ itsComboBtnCols);
+ }
- if(opts.coloredMouseOver)
- if(itsDefBtnCols)
- itsMouseOverCols=itsDefBtnCols;
- else
- {
- itsMouseOverCols=new QColor [TOTAL_SHADES+1];
- shadeColors(midColor(itsMenuitemCols[ORIGINAL_SHADE],
- itsButtonCols[ORIGINAL_SHADE]), itsMouseOverCols);
- }
+ switch(opts.sortedLv)
+ {
+ case SHADE_DARKEN:
+ if(!itsSortedLvColors)
+ itsSortedLvColors=new QColor [TOTAL_SHADES+1];
+ shadeColors(shade(opts.lvButton ? itsButtonCols[ORIGINAL_SHADE] : itsBackgroundCols[ORIGINAL_SHADE], LV_HEADER_DARK_FACTOR), itsSortedLvColors);
+ break;
+ default:
+ case SHADE_NONE:
+ break;
+ case SHADE_SELECTED:
+ itsSortedLvColors=itsHighlightCols;
+ break;
+ case SHADE_BLEND_SELECTED:
+ if(SHADE_BLEND_SELECTED==opts.shadeSliders)
+ {
+ itsSortedLvColors=itsSliderCols;
+ break;
+ }
+ else if(SHADE_BLEND_SELECTED==opts.comboBtn)
+ {
+ itsSortedLvColors=itsComboBtnCols;
+ break;
+ }
+ case SHADE_CUSTOM:
+ if(opts.shadeSliders==SHADE_CUSTOM && opts.customSlidersColor==opts.customSortedLvColor)
+ {
+ itsSortedLvColors=itsSliderCols;
+ break;
+ }
+ if(opts.comboBtn==SHADE_CUSTOM && opts.customComboBtnColor==opts.customSortedLvColor)
+ {
+ itsSortedLvColors=itsComboBtnCols;
+ break;
+ }
+ if(!itsSortedLvColors)
+ itsSortedLvColors=new QColor [TOTAL_SHADES+1];
+ shadeColors(SHADE_BLEND_SELECTED==opts.sortedLv
+ ? midColor(itsHighlightCols[ORIGINAL_SHADE],
+ (opts.lvButton ? itsButtonCols[ORIGINAL_SHADE] : itsBackgroundCols[ORIGINAL_SHADE]))
+ : opts.customSortedLvColor,
+ itsSortedLvColors);
+ }
+
+ switch(opts.crColor)
+ {
+ default:
+ case SHADE_NONE:
+ itsCheckRadioSelCols=itsButtonCols;
+ break;
+ case SHADE_DARKEN:
+ if(!itsCheckRadioSelCols)
+ itsCheckRadioSelCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(shade(itsButtonCols[ORIGINAL_SHADE], LV_HEADER_DARK_FACTOR), itsCheckRadioSelCols);
+ break;
+ case SHADE_SELECTED:
+ itsCheckRadioSelCols=itsHighlightCols;
+ break;
+ case SHADE_CUSTOM:
+ if(SHADE_CUSTOM==opts.shadeSliders && opts.customSlidersColor==opts.customCrBgndColor)
+ itsCheckRadioSelCols=itsSliderCols;
+ else if(SHADE_CUSTOM==opts.comboBtn && opts.customComboBtnColor==opts.customCrBgndColor)
+ itsCheckRadioSelCols=itsComboBtnCols;
+ else if(SHADE_CUSTOM==opts.sortedLv && opts.customSortedLvColor==opts.customCrBgndColor)
+ itsCheckRadioSelCols=itsSortedLvColors;
+ else
+ {
+ if(!itsCheckRadioSelCols)
+ itsCheckRadioSelCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(opts.customCrBgndColor, itsCheckRadioSelCols);
+ }
+ break;
+ case SHADE_BLEND_SELECTED:
+ if(SHADE_BLEND_SELECTED==opts.shadeSliders)
+ itsCheckRadioSelCols=itsSliderCols;
+ else if(SHADE_BLEND_SELECTED==opts.comboBtn)
+ itsCheckRadioSelCols=itsComboBtnCols;
+ else if(SHADE_BLEND_SELECTED==opts.sortedLv)
+ itsCheckRadioSelCols=itsSortedLvColors;
+ else
+ {
+ if(!itsCheckRadioSelCols)
+ itsCheckRadioSelCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsCheckRadioSelCols);
+ }
+ }
+
+ switch(opts.progressColor)
+ {
+ case SHADE_NONE:
+ itsProgressCols=itsBackgroundCols;
+ break;
+ default:
+ // Not set!
+ break;
+ case SHADE_CUSTOM:
+ if(SHADE_CUSTOM==opts.shadeSliders && opts.customSlidersColor==opts.customProgressColor)
+ itsProgressCols=itsSliderCols;
+ else if(SHADE_CUSTOM==opts.comboBtn && opts.customComboBtnColor==opts.customProgressColor)
+ itsProgressCols=itsComboBtnCols;
+ else if(SHADE_CUSTOM==opts.sortedLv && opts.customSortedLvColor==opts.customProgressColor)
+ itsProgressCols=itsSortedLvColors;
+ else if(SHADE_CUSTOM==opts.crColor && opts.customCrBgndColor==opts.customProgressColor)
+ itsProgressCols=itsCheckRadioSelCols;
+ else
+ {
+ if(!itsProgressCols)
+ itsProgressCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(opts.customProgressColor, itsProgressCols);
+ }
+ break;
+ case SHADE_BLEND_SELECTED:
+ if(SHADE_BLEND_SELECTED==opts.shadeSliders)
+ itsProgressCols=itsSliderCols;
+ else if(SHADE_BLEND_SELECTED==opts.comboBtn)
+ itsProgressCols=itsComboBtnCols;
+ else if(SHADE_BLEND_SELECTED==opts.sortedLv)
+ itsProgressCols=itsSortedLvColors;
+ else
+ {
+ if(!itsProgressCols)
+ itsProgressCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsBackgroundCols[ORIGINAL_SHADE]), itsProgressCols);
+ }
+ }
setMenuColors(QApplication::palette().active());
- if(opts.lighterPopupMenuBgnd)
+ if(USE_LIGHTER_POPUP_MENU)
itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE],
- POPUPMENU_LIGHT_FACTOR);
+ TO_FACTOR(opts.lighterPopupMenuBgnd));
+
+ if ((SHADE_CUSTOM==opts.shadeMenubars || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars) &&
+ "soffice.bin"==QString(qApp->argv()[0]) && TOO_DARK(SHADE_CUSTOM==opts.shadeMenubars
+ ? opts.customMenubarsColor
+ : itsHighlightCols[ORIGINAL_SHADE]))
+ opts.shadeMenubars=SHADE_DARKEN;
switch(opts.shadeCheckRadio)
{
default:
- itsCheckRadioCol=QApplication::palette().active().text();
+ itsCheckRadioCol=opts.crButton ? QApplication::palette().active().buttonText()
+ : QApplication::palette().active().text();
break;
case SHADE_BLEND_SELECTED:
case SHADE_SELECTED:
@@ -663,12 +1112,28 @@ QtCurveStyle::~QtCurveStyle()
if(itsSidebarButtonsCols!=itsSliderCols &&
itsSidebarButtonsCols!=itsDefBtnCols)
delete [] itsSidebarButtonsCols;
+ if(itsActiveMdiColors && itsActiveMdiColors!=itsHighlightCols)
+ delete [] itsActiveMdiColors;
+ if(itsMdiColors && itsMdiColors!=itsBackgroundCols)
+ delete [] itsMdiColors;
if(itsMouseOverCols && itsMouseOverCols!=itsDefBtnCols &&
itsMouseOverCols!=itsSliderCols)
delete [] itsMouseOverCols;
- if(itsDefBtnCols && itsDefBtnCols!=itsSliderCols)
+ if(itsDefBtnCols && itsDefBtnCols!=itsSliderCols && itsDefBtnCols!=itsFocusCols && itsDefBtnCols!=itsHighlightCols)
delete [] itsDefBtnCols;
- if(itsSliderCols && itsSliderCols!=itsMenuitemCols)
+ if(itsProgressCols && itsProgressCols!=itsHighlightCols && itsProgressCols!=itsBackgroundCols &&
+ itsProgressCols!=itsSliderCols && itsProgressCols!=itsComboBtnCols && itsProgressCols!=itsCheckRadioSelCols && itsProgressCols!=itsSortedLvColors)
+ delete [] itsProgressCols;
+ if(itsCheckRadioSelCols && itsCheckRadioSelCols!=itsDefBtnCols && itsCheckRadioSelCols!=itsSliderCols &&
+ itsCheckRadioSelCols!=itsComboBtnCols && itsCheckRadioSelCols!=itsSortedLvColors &&
+ itsCheckRadioSelCols!=itsButtonCols && itsCheckRadioSelCols!=itsHighlightCols)
+ delete [] itsCheckRadioSelCols;
+ if(itsSortedLvColors && itsSortedLvColors!=itsHighlightCols && itsSortedLvColors!=itsSliderCols &&
+ itsSortedLvColors!=itsComboBtnCols)
+ delete [] itsSortedLvColors;
+ if(itsComboBtnCols && itsComboBtnCols!=itsHighlightCols && itsComboBtnCols!=itsSliderCols)
+ delete [] itsComboBtnCols;
+ if(itsSliderCols && itsSliderCols!=itsHighlightCols)
delete [] itsSliderCols;
delete itsMactorPal;
}
@@ -689,10 +1154,13 @@ void QtCurveStyle::polish(QApplication *app)
{
QString appName(getFile(app->argv()[0]));
+ if(NULL!=getenv("QTCURVE_DEBUG"))
+ std::cout << "QtCurve: Application name: \"" << appName.latin1() << "\"\n";
+
if ("kicker"==appName || "appletproxy"==appName)
{
itsThemedApp=APP_KICKER;
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsIsTransKicker=kickerIsTrans();
#endif
}
@@ -700,12 +1168,15 @@ void QtCurveStyle::polish(QApplication *app)
itsThemedApp=APP_KONTACT;
else if ("konqueror"==appName)
itsThemedApp=APP_KONQUEROR;
+ else if ("kate"==appName)
+ itsThemedApp=APP_KATE;
else if ("kpresenter"==appName)
itsThemedApp=APP_KPRESENTER;
else if ("soffice.bin"==appName)
{
itsThemedApp=APP_OPENOFFICE;
- opts.framelessGroupBoxes=false;
+ opts.groupBox=FRAME_PLAIN;
+ opts.gbLabel=0;
}
else if ("kdefilepicker"==appName)
itsThemedApp=APP_SKIP_TASKBAR;
@@ -719,10 +1190,12 @@ void QtCurveStyle::polish(QApplication *app)
itsThemedApp=APP_TORA;
else if ("opera"==appName)
itsThemedApp=APP_OPERA;
+ else if ("systemsettings"==appName)
+ itsThemedApp=APP_SYSTEMSETTINGS;
else if ("korn"==appName)
{
itsThemedApp=APP_KORN;
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsIsTransKicker=kickerIsTrans();
#endif
}
@@ -737,12 +1210,31 @@ void QtCurveStyle::polish(QApplication *app)
if(APP_OPENOFFICE==itsThemedApp)
{
+ //
+ // OO.o 2.x checks to see whether the used theme "inherits" from HighContrastStyle,
+ // if so it uses the highlightedText color to draw highlighted menubar and popup menu
+ // items. Otherwise it uses the standard color. Changing the metaobject's class name
+ // works around this...
+ if(opts.useHighlightForMenu)
+ {
+ QMetaObject *meta=(QMetaObject *)metaObject();
+
+ meta->classname="HighContrastStyle";
+ }
+
if(opts.scrollbarType==SCROLLBAR_NEXT)
opts.scrollbarType=SCROLLBAR_KDE;
else if(opts.scrollbarType==SCROLLBAR_NONE)
opts.scrollbarType=SCROLLBAR_WINDOWS;
setSbType();
}
+
+ if(SHADE_NONE!=opts.menuStripe && opts.noMenuStripeApps.contains(appName))
+ opts.menuStripe=SHADE_NONE;
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ if(opts.fixParentlessDialogs && (opts.noDlgFixApps.contains(appName) || opts.noDlgFixApps.contains("kde")))
+ opts.fixParentlessDialogs=false;
+#endif
}
void QtCurveStyle::polish(QPalette &pal)
@@ -751,16 +1243,13 @@ void QtCurveStyle::polish(QPalette &pal)
pal.active().background()!=itsMactorPal->active().background())
return;
- QPalette pal4;
- QFont font;
QSettings settings;
+ int contrast(settings.readNumEntry("/Qt/KDE/contrast", DEFAULT_CONTRAST));
+ bool newContrast(false);
- if(readQt4(pal4, font))
- {
- pal=pal4;
- QApplication::setFont(font);
- }
- else if(!opts.inactiveHighlight)// Read in Qt3 palette... Required for the inactive settings...
+ readKdeGlobals();
+
+ if(!kdeSettings.inactiveHighlight)// Read in Qt3 palette... Required for the inactive settings...
{
QStringList active(settings.readListEntry("/Qt/Palette/active")),
inactive(settings.readListEntry("/Qt/Palette/inactive"));
@@ -775,7 +1264,7 @@ void QtCurveStyle::polish(QPalette &pal)
QColor(active[QColorGroup::HighlightedText])==pal.color(QPalette::Active, QColorGroup::HighlightedText))
{
QColor h(inactive[QColorGroup::Highlight]),
- t(inactive[QColorGroup::HighlightedText]);
+ t(inactive[QColorGroup::HighlightedText]);
if(h!=pal.color(QPalette::Inactive, QColorGroup::Highlight) || t!=QPalette::Inactive, QColorGroup::HighlightedText)
{
@@ -785,40 +1274,52 @@ void QtCurveStyle::polish(QPalette &pal)
}
}
- if(opts.inactiveHighlight)
+ if(contrast<0 || contrast>10)
+ contrast=DEFAULT_CONTRAST;
+
+ if(contrast!=opts.contrast)
{
- pal.setColor(QPalette::Inactive, QColorGroup::Highlight,
- midColor(pal.color(QPalette::Active, QColorGroup::Background),
- pal.color(QPalette::Active, QColorGroup::Highlight), INACTIVE_HIGHLIGHT_FACTOR));
- pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, pal.color(QPalette::Active, QColorGroup::Foreground));
+ opts.contrast=contrast;
+ newContrast=true;
}
- int c(settings.readNumEntry("/Qt/KDE/contrast", 7));
- bool newContrast(false);
-
- if(c<0 || c>10)
- c=7;
-
- if(c!=opts.contrast)
+ if(kdeSettings.inactiveHighlight)
{
- opts.contrast=c;
- newContrast=true;
+ pal.setColor(QPalette::Inactive, QColorGroup::Highlight,
+ tint(QApplication::palette().active().background(),
+ QApplication::palette().active().highlight(), 0.4));
+ // KDE4 does not set text colour :-(
+ //pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, pal.color(QPalette::Active, QColorGroup::Foreground));
}
bool newMenu(newContrast ||
- itsMenuitemCols[ORIGINAL_SHADE]!=QApplication::palette().active().highlight()),
+ itsHighlightCols[ORIGINAL_SHADE]!=QApplication::palette().active().highlight()),
newGray(newContrast ||
itsBackgroundCols[ORIGINAL_SHADE]!=QApplication::palette().active().background()),
newButton(newContrast ||
itsButtonCols[ORIGINAL_SHADE]!=QApplication::palette().active().button()),
newSlider(itsSliderCols && SHADE_BLEND_SELECTED==opts.shadeSliders &&
(newContrast || newButton || newMenu)),
- newDefBtn(itsDefBtnCols && IND_COLORED==opts.defBtnIndicator &&
- SHADE_BLEND_SELECTED!=opts.shadeSliders &&
+ newDefBtn(itsDefBtnCols && /*( (IND_COLORED==opts.defBtnIndicator &&*/
+ SHADE_BLEND_SELECTED!=opts.shadeSliders/*) ||*/
+ /*(IND_TINT==opts.defBtnIndicator) )*/ &&
+ IND_SELECTED!=opts.defBtnIndicator && IND_GLOW!=opts.defBtnIndicator &&
(newContrast || newButton || newMenu)),
- newMouseOver(itsMouseOverCols && itsMouseOverCols!=itsDefBtnCols &&
- itsMouseOverCols!=itsSliderCols &&
- (newContrast || newButton || newMenu));
+ newComboBtn(itsComboBtnCols && itsHighlightCols!=itsComboBtnCols && itsSliderCols!=itsComboBtnCols &&
+ SHADE_BLEND_SELECTED==opts.comboBtn &&
+ (newContrast || newButton || newMenu)),
+ newSortedLv(itsSortedLvColors && ( (SHADE_BLEND_SELECTED==opts.sortedLv && itsHighlightCols!=itsSortedLvColors && itsSliderCols!=itsSortedLvColors &&
+ itsComboBtnCols!=itsSortedLvColors) ||
+ SHADE_DARKEN==opts.sortedLv) &&
+ (newContrast || (opts.lvButton ? newButton : newGray))),
+ newCheckRadioSelCols(itsCheckRadioSelCols && ( (SHADE_BLEND_SELECTED==opts.crColor && itsDefBtnCols!=itsCheckRadioSelCols &&
+ itsSliderCols!=itsCheckRadioSelCols && itsComboBtnCols!=itsCheckRadioSelCols &&
+ itsSortedLvColors!=itsCheckRadioSelCols) ||
+ SHADE_DARKEN==opts.crColor) &&
+ (newContrast || newButton)),
+ newProgressCols(itsProgressCols && SHADE_BLEND_SELECTED==opts.progressColor &&
+ itsSliderCols!=itsProgressCols && itsComboBtnCols!=itsProgressCols &&
+ itsSortedLvColors!=itsProgressCols && itsCheckRadioSelCols!=itsProgressCols && (newContrast || newButton));
if(newGray)
shadeColors(QApplication::palette().active().background(), itsBackgroundCols);
@@ -827,72 +1328,60 @@ void QtCurveStyle::polish(QPalette &pal)
shadeColors(QApplication::palette().active().button(), itsButtonCols);
if(newMenu)
- shadeColors(QApplication::palette().active().highlight(), itsMenuitemCols);
+ shadeColors(QApplication::palette().active().highlight(), itsHighlightCols);
+
+ setDecorationColors();
setMenuColors(QApplication::palette().active());
if(newSlider)
- shadeColors(midColor(itsMenuitemCols[ORIGINAL_SHADE],
- itsButtonCols[ORIGINAL_SHADE]), itsSliderCols);
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSliderCols);
- if(newDefBtn)
- shadeColors(midColor(itsMenuitemCols[ORIGINAL_SHADE],
- itsButtonCols[ORIGINAL_SHADE]), itsDefBtnCols);
+ if(newComboBtn)
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsComboBtnCols);
- if(newMouseOver)
- shadeColors(midColor(itsMenuitemCols[ORIGINAL_SHADE],
- itsButtonCols[ORIGINAL_SHADE]), itsMouseOverCols);
+ if(newSortedLv)
+ if(SHADE_BLEND_SELECTED==opts.sortedLv)
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE],
+ opts.lvButton ? itsButtonCols[ORIGINAL_SHADE] : itsBackgroundCols[ORIGINAL_SHADE]), itsSortedLvColors);
+ else
+ shadeColors(shade(opts.lvButton ? itsButtonCols[ORIGINAL_SHADE] : itsBackgroundCols[ORIGINAL_SHADE], LV_HEADER_DARK_FACTOR), itsSortedLvColors);
+
+ if(newDefBtn)
+ if(IND_TINT==opts.defBtnIndicator)
+ shadeColors(tint(itsButtonCols[ORIGINAL_SHADE],
+ itsHighlightCols[ORIGINAL_SHADE], DEF_BNT_TINT), itsDefBtnCols);
+ else if(IND_GLOW!=opts.defBtnIndicator)
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE],
+ itsButtonCols[ORIGINAL_SHADE]), itsDefBtnCols);
if(itsSidebarButtonsCols && SHADE_BLEND_SELECTED!=opts.shadeSliders &&
IND_COLORED!=opts.defBtnIndicator)
- shadeColors(midColor(itsMenuitemCols[ORIGINAL_SHADE],
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE],
itsButtonCols[ORIGINAL_SHADE]), itsSidebarButtonsCols);
- if(opts.lighterPopupMenuBgnd && newGray)
+ if(USE_LIGHTER_POPUP_MENU && newGray)
itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE],
- POPUPMENU_LIGHT_FACTOR);
-
- const QColorGroup &actGroup(pal.active()),
- &inactGroup(pal.inactive()),
- &disGroup(pal.disabled());
- const QColor *use(backgroundColors(actGroup));
- QColorGroup newAct(actGroup.foreground(), actGroup.button(), use[0], use[QT_STD_BORDER],
- actGroup.mid(), actGroup.text(), actGroup.brightText(),
- actGroup.base(), actGroup.background());
- QColorGroup::ColorRole roles[]={QColorGroup::Midlight, QColorGroup::ButtonText,
- QColorGroup::Shadow, QColorGroup::Highlight,
- QColorGroup::HighlightedText,
- QColorGroup::NColorRoles };
- int r(0);
+ TO_FACTOR(opts.lighterPopupMenuBgnd));
- for(r=0; roles[r]!=QColorGroup::NColorRoles; ++r)
- newAct.setColor(roles[r], actGroup.color(roles[r]));
- pal.setActive(newAct);
-
- use=backgroundColors(inactGroup);
-
- QColorGroup newInact(inactGroup.foreground(), inactGroup.button(), use[0], use[QT_STD_BORDER],
- inactGroup.mid(), inactGroup.text(), inactGroup.brightText(),
- inactGroup.base(), inactGroup.background());
-
- for(r=0; roles[r]!=QColorGroup::NColorRoles; ++r)
- newInact.setColor(roles[r], inactGroup.color(roles[r]));
- pal.setInactive(newInact);
-
- use=backgroundColors(disGroup);
+ if(newCheckRadioSelCols)
+ if(SHADE_BLEND_SELECTED==opts.crColor)
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsCheckRadioSelCols);
+ else
+ shadeColors(shade(itsButtonCols[ORIGINAL_SHADE], LV_HEADER_DARK_FACTOR), itsCheckRadioSelCols);
- QColorGroup newDis(disGroup.foreground(), disGroup.button(), use[0], use[QT_STD_BORDER],
- disGroup.mid(), disGroup.text(), disGroup.brightText(),
- disGroup.base(), disGroup.background());
+ if(newProgressCols)
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsBackgroundCols[ORIGINAL_SHADE]), itsProgressCols);
- for(r=0; roles[r]!=QColorGroup::NColorRoles; ++r)
- newDis.setColor(roles[r], disGroup.color(roles[r]));
- pal.setDisabled(newDis);
+ pal.setActive(setColorGroup(pal.active(), pal.active()));
+ pal.setInactive(setColorGroup(pal.inactive(), pal.active()));
+ pal.setDisabled(setColorGroup(pal.disabled(), pal.active(), true));
switch(opts.shadeCheckRadio)
{
default:
- itsCheckRadioCol=QApplication::palette().active().text();
+ itsCheckRadioCol=opts.crButton ? QApplication::palette().active().buttonText()
+ : QApplication::palette().active().text();
break;
case SHADE_SELECTED:
case SHADE_BLEND_SELECTED:
@@ -904,13 +1393,56 @@ void QtCurveStyle::polish(QPalette &pal)
if(itsMactorPal)
*itsMactorPal=pal;
+ // Force this to be re-generated!
+ if(SHADE_BLEND_SELECTED==opts.menuStripe)
+ opts.customMenuStripeColor=Qt::black;
+
+ if(APPEARANCE_STRIPED==opts.bgndAppearance)
+ pal.setBrush(QColorGroup::Background, QBrush(pal.active().background(), *createStripePixmap(pal.active().background(), true)));
+}
+
+static QColor disable(const QColor &col, const QColor &bgnd)
+{
+ QColor c = col;
+ c = ColorUtils_darken(&c, 0.1, 1.0);
+ c = ColorUtils_mix(&c, &bgnd, 0.65);
+ return c;
+}
+
+QColorGroup QtCurveStyle::setColorGroup(const QColorGroup &old, const QColorGroup &act, bool dis)
+{
+ QColor mid(old.mid());
+
+ if(dis)
+ mid=disable(act.foreground(), old.background());
+
+ const QColor *use(backgroundColors(old));
+ QColorGroup newGrp(old.foreground(), old.button(), use[0], use[STD_BORDER],
+ mid, old.text(), old.brightText(),
+ old.base(), old.background());
+ QColorGroup::ColorRole roles[]={QColorGroup::Midlight, QColorGroup::ButtonText,
+ QColorGroup::Shadow, QColorGroup::Highlight,
+ QColorGroup::HighlightedText, QColorGroup::Link,
+ QColorGroup::LinkVisited, QColorGroup::NColorRoles };
+ int r(0);
+
+ for(r=0; roles[r]!=QColorGroup::NColorRoles; ++r)
+ newGrp.setColor(roles[r], old.color(roles[r]));
+
+ if(dis)
+ {
+ newGrp.setColor(QColorGroup::ButtonText, disable(act.buttonText(), old.button()));
+ newGrp.setColor(QColorGroup::Text, disable(act.text(), old.background()));
+ }
+
+ return newGrp;
}
static const char * kdeToolbarWidget="kde toolbar widget";
void QtCurveStyle::polish(QWidget *widget)
{
- bool enableFilter(!equal(opts.highlightFactor, 1.0) || opts.coloredMouseOver);
+ bool enableFilter(opts.highlightFactor || opts.coloredMouseOver);
if(::isKhtmlFormWidget(widget))
{
@@ -918,6 +1450,15 @@ void QtCurveStyle::polish(QWidget *widget)
connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(khtmlWidgetDestroyed(QObject *)));
}
+ if(enableFilter && isSpecialHover(widget))
+ connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(hoverWidgetDestroyed(QObject *)));
+
+ if(isWindowDragWidget(widget))
+ widget->installEventFilter(this);
+
+ if(APPEARANCE_STRIPED==opts.bgndAppearance && (::qt_cast<QDialog *>(widget) || ::qt_cast<QMainWindow *>(widget)))
+ setBgndProp(widget, APPEARANCE_STRIPED);
+
if(widget->parentWidget() && ::qt_cast<QScrollView *>(widget) && ::qt_cast<QComboBox *>(widget->parentWidget()))
{
QPalette pal(widget->palette());
@@ -928,12 +1469,12 @@ void QtCurveStyle::polish(QWidget *widget)
#if 0
if(opts.gtkComboMenus)
- act.setColor(QColorGroup::Base, opts.lighterPopupMenuBgnd ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
+ act.setColor(QColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
act.setColor(QColorGroup::Background, opts.gtkComboMenus
- ? opts.lighterPopupMenuBgnd ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]
+ ? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]
: QApplication::palette().active().base());
#endif
- act.setColor(QColorGroup::Foreground, itsBackgroundCols[QT_STD_BORDER]);
+ act.setColor(QColorGroup::Foreground, itsBackgroundCols[STD_BORDER]);
pal.setActive(act);
widget->setPalette(pal);
@@ -962,9 +1503,32 @@ void QtCurveStyle::polish(QWidget *widget)
0==qstrcmp(widget->parentWidget()->className(), "Kontact::MainWindow"))
((QHBox *)widget)->setLineWidth(0);
+ if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::qt_cast<const QPopupMenu *>(widget))
+ widget->installEventFilter(this);
+
+ #if 0
+ if(opts.menubarHiding && ::qt_cast<QMainWindow *>(widget) && static_cast<QMainWindow *>(widget)->menuBar())
+ widget->installEventFilter(this);
+ #endif
+
+ if ((opts.square&SQUARE_SCROLLVIEW) && widget &&
+ (::qt_cast<const QScrollView *>(widget) ||
+ (widget->parentWidget() && ::qt_cast<const QFrame *>(widget) &&
+ widget->parentWidget()->inherits("KateView"))) &&
+ ((QFrame *)widget)->lineWidth()>1)
+ ((QFrame *)widget)->setLineWidth(opts.gtkScrollViews ? 1 : 2);
+ else if(!opts.popupBorder && widget &&
+ (::qt_cast<const QPopupMenu *>(widget) ||
+ (widget->parentWidget() && ::qt_cast<const QListBox *>(widget) &&
+ ::qt_cast<const QComboBox *>(widget->parentWidget()))))
+ ((QFrame *)widget)->setLineWidth(0);
+ else if ((USE_LIGHTER_POPUP_MENU || !IS_FLAT_BGND(opts.menuBgndAppearance)) && !opts.borderMenuitems &&
+ widget && ::qt_cast<const QPopupMenu *>(widget))
+ ((QFrame *)widget)->setLineWidth(1);
+
if (::qt_cast<QRadioButton *>(widget) || ::qt_cast<QCheckBox *>(widget))
{
- bool framelessGroupBoxCheckBox=(opts.framelessGroupBoxes && isCheckBoxOfGroupBox(widget));
+ bool framelessGroupBoxCheckBox=(NO_FRAME(opts.groupBox) && isCheckBoxOfGroupBox(widget));
if(framelessGroupBoxCheckBox || enableFilter)
{
@@ -998,7 +1562,7 @@ void QtCurveStyle::polish(QWidget *widget)
if(enableFilter)
{
widget->installEventFilter(this);
-#if KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
+#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
widget->setMouseTracking(true);
#endif
}
@@ -1018,7 +1582,7 @@ void QtCurveStyle::polish(QWidget *widget)
widget->setBackgroundMode(PaletteBackground);
widget->installEventFilter(this);
- if(QTC_DO_EFFECT && onToolBar(widget))
+ if(DO_EFFECT && onToolBar(widget))
widget->setName(kdeToolbarWidget);
if(enableFilter)
@@ -1027,12 +1591,52 @@ void QtCurveStyle::polish(QWidget *widget)
if(((QComboBox *)widget)->listBox())
((QComboBox *)widget)->listBox()->installEventFilter(this);
}
- else if(::qt_cast<QMenuBar *>(widget) || ::qt_cast<QToolBar *>(widget))
+ else if(::qt_cast<QMenuBar *>(widget))
{
if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground);
if(SHADE_NONE!=opts.shadeMenubars)
widget->installEventFilter(this);
+ if(BLEND_TITLEBAR || opts.windowBorder&WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR)
+ emitMenuSize(widget, widget->rect().height());
+ if(SHADE_WINDOW_BORDER==opts.shadeMenubars)
+ {
+ QPalette pal(widget->palette());
+ QColorGroup act(pal.active());
+ QColorGroup inact(pal.inactive());
+
+ getMdiColors(act, true);
+ act.setColor(QColorGroup::Foreground, itsActiveMdiTextColor);
+ inact.setColor(QColorGroup::Foreground, opts.shadeMenubarOnlyWhenActive ? itsMdiTextColor : itsActiveMdiTextColor);
+ pal.setInactive(inact);
+ pal.setActive(act);
+ widget->setPalette(pal);
+ }
+ else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
+ (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
+ {
+ QPalette pal(widget->palette());
+ QColorGroup act(pal.active());
+
+ act.setColor(QColorGroup::Foreground, opts.customMenuTextColor
+ ? opts.customMenuNormTextColor
+ : QApplication::palette().active().highlightedText());
+
+ if(!opts.shadeMenubarOnlyWhenActive)
+ {
+ QColorGroup inact(pal.inactive());
+ inact.setColor(QColorGroup::Foreground, act.color(QColorGroup::Foreground));
+ pal.setInactive(inact);
+ }
+
+ pal.setActive(act);
+ widget->setPalette(pal);
+ }
+ }
+ else if(::qt_cast<QToolBar *>(widget))
+ {
+ if(NoBackground!=widget->backgroundMode())
+ widget->setBackgroundMode(PaletteBackground);
}
else if(::qt_cast<QPopupMenu *>(widget))
widget->setBackgroundMode(NoBackground); // PaletteBackground);
@@ -1061,6 +1665,9 @@ void QtCurveStyle::polish(QWidget *widget)
{
widget->setName(kdeToolbarWidget);
widget->setBackgroundMode(NoBackground); // We paint whole background.
+
+ if(!enableFilter)
+ widget->installEventFilter(this);
}
// This bit stolen form polyester...
@@ -1077,7 +1684,7 @@ void QtCurveStyle::polish(QWidget *widget)
::qt_cast<QFrame *>(widget))
((QFrame *)widget)->setLineWidth(0);
}
- else if (widget->inherits("QSplitterHandle") || widget->inherits("QDockWindowHandle"))
+ else if (widget->inherits("QSplitterHandle") || widget->inherits("QDockWindowHandle") || widget->inherits("QDockWindowResizeHandle"))
{
if(enableFilter)
widget->installEventFilter(this);
@@ -1120,18 +1727,16 @@ void QtCurveStyle::polish(QWidget *widget)
}
if(opts.animatedProgress)
- {
- widget->installEventFilter(this);
- itsProgAnimWidgets[widget] = 0;
- connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(progressBarDestroyed(QObject *)));
- if (!itsAnimationTimer->isActive())
- itsAnimationTimer->start(PROGRESS_ANIMATION, false);
- }
+ {
+ widget->installEventFilter(this);
+ itsProgAnimWidgets[widget] = 0;
+ connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(progressBarDestroyed(QObject *)));
+ if (!itsAnimationTimer->isActive())
+ itsAnimationTimer->start(PROGRESS_ANIMATION, false);
+ }
}
-#ifdef QTC_HIGHLIGHT_SCROLVIEWS
- else if(::qt_cast<QScrollView*>(widget))
+ else if(opts.highlightScrollViews && ::qt_cast<QScrollView*>(widget))
widget->installEventFilter(this);
-#endif
else if(!qstrcmp(widget->className(), "KonqFrameStatusBar"))
{
// This disables the white background of the KonquerorFrameStatusBar.
@@ -1145,15 +1750,21 @@ void QtCurveStyle::polish(QWidget *widget)
pal.setColor(QColorGroup::Midlight, pal.active().background());
QApplication::setPalette(pal);
}
- else if(widget->inherits("KTabCtl") || (opts.framelessGroupBoxes && ::qt_cast<QGroupBox *>(widget)))
+ else if(widget->inherits("KTabCtl"))
widget->installEventFilter(this);
+ else if(NO_FRAME(opts.groupBox) && ::qt_cast<QGroupBox *>(widget))
+ {
+ ((QGroupBox *)widget)->setFlat(false);
+ ((QGroupBox *)widget)->setFrameShape(QFrame::NoFrame);
+ }
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
else if(opts.fixParentlessDialogs && ::qt_cast<QDialog *>(widget))
{
QDialog *dlg=(QDialog *)widget;
// The parent->isShown is needed for KWord. It's insert picure file dialog is a child of
// the insert picture dialog - but the file dialog is shown *before* the picture dialog!
- if( (QTC_SKIP_TASKBAR && !dlg->parentWidget()) ||
+ if( (SKIP_TASKBAR && !dlg->parentWidget()) ||
( (!dlg->parentWidget() || !dlg->parentWidget()->isShown())// &&
/*(dlg->isModal() || ::qt_cast<QProgressDialog *>(widget))*/) )
widget->installEventFilter(this);
@@ -1175,8 +1786,36 @@ void QtCurveStyle::polish(QWidget *widget)
(index+17)==(int)cap.length())) )
widget->QWidget::setCaption(cap.left(index));
}
+#endif
+
+ if(APP_SYSTEMSETTINGS==itsThemedApp)
+ {
+ if(widget && widget->parentWidget() && widget->parentWidget()->parentWidget() &&
+ ::qt_cast<QFrame *>(widget) && QFrame::NoFrame!=((QFrame *)widget)->frameShape() &&
+ ::qt_cast<QFrame *>(widget->parentWidget()) &&
+ ::qt_cast<QTabWidget *>(widget->parentWidget()->parentWidget()))
+ ((QFrame *)widget)->setFrameShape(QFrame::NoFrame);
+
+ if(widget->parentWidget() && widget->parentWidget()->parentWidget() &&
+ ::qt_cast<QScrollView *>(widget->parentWidget()->parentWidget()) &&
+ widget->inherits("KCMultiWidget") && widget->parentWidget()->inherits("QViewportWidget"))
+ ((QScrollView *)(widget->parentWidget()->parentWidget()))->setLineWidth(0);
+ }
- KStyle::polish(widget);
+ if(opts.tabBgnd && widget && widget->parentWidget() && ::qt_cast<QWidgetStack *>(widget) &&
+ ::qt_cast<QTabWidget *>(widget->parentWidget()) &&
+ 0==qstrcmp(widget->name(), "tab pages"))
+ {
+ QPalette pal(widget->palette());
+
+ pal.setColor(QColorGroup::Background, shade(pal.active().background(), TO_FACTOR(opts.tabBgnd)));
+ widget->setBackgroundMode(PaletteBackground);
+ widget->setPalette(pal);
+ }
+
+ if(APPEARANCE_STRIPED==opts.bgndAppearance)
+ widget->setBackgroundOrigin(QWidget::WindowOrigin);
+ BASE_STYLE::polish(widget);
}
void QtCurveStyle::unPolish(QWidget *widget)
@@ -1184,6 +1823,17 @@ void QtCurveStyle::unPolish(QWidget *widget)
if(isFormWidget(widget))
itsKhtmlWidgets.remove(widget);
+ if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::qt_cast<const QPopupMenu *>(widget))
+ widget->removeEventFilter(this);
+
+ #if 0
+ if(opts.menubarHiding && ::qt_cast<QMainWindow *>(widget) && static_cast<QMainWindow *>(widget)->menuBar())
+ widget->removeEventFilter(this);
+ #endif
+
+ if(isWindowDragWidget(widget))
+ widget->removeEventFilter(this);
+
if (::qt_cast<QRadioButton *>(widget) || ::qt_cast<QCheckBox *>(widget))
{
#if QT_VERSION >= 0x030200
@@ -1208,7 +1858,7 @@ void QtCurveStyle::unPolish(QWidget *widget)
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteButton);
widget->removeEventFilter(this);
-#if KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
+#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
widget->setMouseTracking(false);
#endif
}
@@ -1232,6 +1882,9 @@ void QtCurveStyle::unPolish(QWidget *widget)
widget->setBackgroundMode(PaletteBackground);
if(SHADE_NONE!=opts.shadeMenubars)
widget->removeEventFilter(this);
+ if(SHADE_WINDOW_BORDER==opts.shadeMenubars || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars ||
+ SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars &&TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
+ widget->setPalette(QApplication::palette());
}
else if (widget->inherits("KToolBarSeparator"))
{
@@ -1252,17 +1905,15 @@ void QtCurveStyle::unPolish(QWidget *widget)
}
else if (::qt_cast<QLineEdit*>(widget) || ::qt_cast<QTextEdit*>(widget))
widget->removeEventFilter(this);
- else if (widget->inherits("QSplitterHandle") || widget->inherits("QDockWindowHandle"))
+ else if (widget->inherits("QSplitterHandle") || widget->inherits("QDockWindowHandle") || widget->inherits("QDockWindowResizeHandle"))
widget->removeEventFilter(this);
else if (::qt_cast<QProgressBar*>(widget))
{
itsProgAnimWidgets.remove(widget);
widget->removeEventFilter(this);
}
-#ifdef QTC_HIGHLIGHT_SCROLVIEWS
- else if(::qt_cast<QScrollView*>(widget))
+ else if(opts.highlightScrollViews && ::qt_cast<QScrollView*>(widget))
widget->removeEventFilter(this);
-#endif
else if(0==qstrcmp(widget->name(), kdeToolbarWidget))
{
widget->removeEventFilter(this);
@@ -1273,12 +1924,14 @@ void QtCurveStyle::unPolish(QWidget *widget)
widget->removeEventFilter(this);
widget->setBackgroundMode(PaletteBackground); // We paint whole background.
}
- else if(widget->inherits("KTabCtl") || (opts.framelessGroupBoxes && ::qt_cast<QGroupBox *>(widget)))
+ else if(widget->inherits("KTabCtl"))
widget->removeEventFilter(this);
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
else if(opts.fixParentlessDialogs && ::qt_cast<QDialog *>(widget))
widget->removeEventFilter(this);
+#endif
- KStyle::unPolish(widget);
+ BASE_STYLE::unPolish(widget);
}
static void sendXEvent(QDialog *dlg, const char *msg)
@@ -1319,14 +1972,23 @@ bool QtCurveStyle::appIsNotEmbedded(QDialog *dlg)
bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
{
if(itsHoverWidget && object==itsHoverWidget && (QEvent::Destroy==event->type() || QEvent::Hide==event->type()))
+ resetHover();
+
+ #if 0
+ // Works for qtconfig, but k3b hangs?
+ if(opts.menubarHiding && QEvent::KeyRelease==event->type() && ::qt_cast<QMainWindow *>(object))
{
- itsOldPos.setX(-1);
- itsOldPos.setY(-1);
- itsHoverWidget=NULL;
- itsIsSpecialHover=false;
- itsHoverSect=QTC_NO_SECT;
- itsHover=HOVER_NONE;
+ QMainWindow *window=static_cast<QMainWindow *>(object);
+
+ if(window->isVisible() && window->menuBar())
+ {
+ QKeyEvent *k=static_cast<QKeyEvent *>(event);
+
+ if(k->state()&Qt::ControlButton && k->state()&Qt::AltButton && Qt::Key_M==k->key())
+ window->menuBar()->setHidden(window->menuBar()->isVisible());
+ }
}
+ #endif
if(object->parent() && 0==qstrcmp(object->name(), kdeToolbarWidget))
{
@@ -1371,11 +2033,11 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
}
if(!::qt_cast<QLineEdit*>(object) && !::qt_cast<QTextEdit*>(object) &&
- !(QTC_DO_EFFECT && ::qt_cast<QComboBox*>(object)))
+ !(DO_EFFECT && ::qt_cast<QComboBox*>(object)))
return false; // Now draw the contents
}
}
- else if (opts.framelessGroupBoxes && QEvent::Move==event->type() && isCheckBoxOfGroupBox(object))
+ else if (NO_FRAME(opts.groupBox) && QEvent::Move==event->type() && isCheckBoxOfGroupBox(object))
{
QCheckBox *cb=static_cast<QCheckBox *>(object);
QRect r(cb->geometry());
@@ -1391,38 +2053,18 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
}
else if (QEvent::Paint==event->type())
{
- if (opts.framelessGroupBoxes && ::qt_cast<QGroupBox *>(object))
+ if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::qt_cast<QPopupMenu *>(object))
{
- QGroupBox *box=static_cast<QGroupBox*>(object);
-
- if (!box->isCheckable())
- {
- QString title(box->title());
+ QWidget *widget=(QWidget*)object;
+ QPainter painter(widget);
+ QColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->palette().active().background());
- if(title.length())
- {
- int left,
- right,
- top,
- bottom,
- width,
- height;
- QPainter p(box);
- QFontMetrics fm(p.fontMetrics());
- QRect r(box->rect());
- int th(fm.height()+2);
- QFont f(p.font());
-
- r.rect(&left, &top, &width, &height);
- r.coords(&left, &top, &right, &bottom);
- f.setBold(true);
- p.setPen(box->colorGroup().foreground());
- p.setFont(f);
- p.drawText(QRect(left, top, width, th),
- (QApplication::reverseLayout() ? AlignRight : AlignLeft)|AlignVCenter|ShowPrefix|SingleLine, title);
- return true;
- }
- }
+ if(APPEARANCE_STRIPED==opts.menuBgndAppearance)
+ painter.drawTiledPixmap(widget->rect(), *createStripePixmap(col, false));
+ else
+ drawBevelGradientReal(col, &painter, widget->rect(), GT_HORIZ==opts.menuBgndGrad, false,
+ opts.menuBgndAppearance, WIDGET_OTHER);
+ return false;
}
else if (object->inherits("KToolBarSeparator"))
{
@@ -1446,7 +2088,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
{
QWidget *widget((QWidget*)object);
QObject *child(object->child("_tabbar"));
- QTabBar *tb(child ? ::qt_cast<QTabBar *>(child) : NULL);
+ QTabBar *tb(child ? ::qt_cast<QTabBar *>(child) : 0L);
QPainter painter(widget);
QRect r(widget->rect());
int tbHeight(tb ? tb->height()-1 : 28);
@@ -1496,7 +2138,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
r.setY(r.y()-y_offset);
r.setHeight(parent->rect().height());
- drawMenuOrToolBarBackground(&p, r, parent->colorGroup(), true, true);
+ drawMenuOrToolBarBackground(&p, r, parent->colorGroup());
return true;
}
}
@@ -1505,7 +2147,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
// focus highlight
if (::qt_cast<QLineEdit*>(object) || ::qt_cast<QTextEdit*>(object)/* || ::qt_cast<QDateTimeEditBase*>(object)*/)
{
- if((QEvent::FocusIn==event->type() || QEvent::FocusOut==event->type()))
+ if(QEvent::FocusIn==event->type() || QEvent::FocusOut==event->type() || QEvent::Enter==event->type() || QEvent::Leave==event->type())
{
QWidget *widget(static_cast<QWidget*>(object));
@@ -1520,22 +2162,114 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
return false;
}
- if(opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars &&
- ::qt_cast<QMenuBar *>(object))
+ if(::qt_cast<QMenuBar *>(object))
+ {
+ bool useWindowCols=SHADE_WINDOW_BORDER==opts.shadeMenubars;
+
+ if( (useWindowCols || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
+ SHADE_CUSTOM==opts.shadeMenubars) && QEvent::Paint==event->type())
+ {
+ const QColor &col(((QWidget *)object)->palette().active().color(QColorGroup::Foreground));
+
+ // If we're relouring the menubar text, check to see if menubar palette has changed, if so set back to
+ // our values. This fixes opera - which seems to change the widgets palette after it is polished.
+ if((opts.customMenuTextColor && col!=opts.customMenuNormTextColor) ||
+ ( (SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
+ (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) &&
+ col!=QApplication::palette().active().highlightedText()))
+ {
+ QPalette pal(((QWidget *)object)->palette());
+ QColorGroup act(pal.active());
+
+ act.setColor(QColorGroup::Foreground, useWindowCols
+ ? itsActiveMdiTextColor
+ : opts.customMenuTextColor
+ ? opts.customMenuNormTextColor
+ : QApplication::palette().active().highlightedText());
+
+ if(!opts.shadeMenubarOnlyWhenActive || useWindowCols)
+ {
+ QColorGroup inact(pal.inactive());
+ inact.setColor(QColorGroup::Foreground, useWindowCols ? itsMdiTextColor : act.color(QColorGroup::Foreground));
+ pal.setInactive(inact);
+ }
+
+ pal.setActive(act);
+ ((QWidget *)object)->setPalette(pal);
+ }
+ }
+
+ if(opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars)
+ switch(event->type())
+ {
+ case QEvent::WindowActivate:
+ itsActive=true;
+ ((QWidget *)object)->repaint(false);
+ return false;
+ case QEvent::WindowDeactivate:
+ itsActive=false;
+ ((QWidget *)object)->repaint(false);
+ return false;
+ default:
+ break;
+ }
+ if(BLEND_TITLEBAR || opts.windowBorder&WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR)
+ switch(event->type())
+ {
+ case QEvent::Resize:
+ {
+ QResizeEvent *re = static_cast<QResizeEvent *>(event);
+
+ if (re->size().height() != re->oldSize().height())
+ emitMenuSize((QMenuBar *)object, re->size().height());
+ break;
+ }
+ }
+ }
+
+ if(dynamic_cast<QMouseEvent*>(event))
switch(event->type())
{
- case QEvent::WindowActivate:
- itsActive=true;
- ((QWidget *)object)->repaint(false);
- return false;
- case QEvent::WindowDeactivate:
- itsActive=false;
- ((QWidget *)object)->repaint(false);
- return false;
- default:
+ case QEvent::MouseMove: // Only occurs for widgets with mouse tracking enabled
+ if(itsDragWidget)
+ {
+ itsDragWidget->setMouseTracking(itsDragWidgetHadMouseTracking);
+ bool move=isWindowDragWidget(object);
+
+ if(move)
+ triggerWMMove(itsDragWidget, ((QMouseEvent *)event)->globalPos());
+ itsDragWidget = 0L;
+ return move;
+ }
+ case QEvent::MouseButtonPress:
+ {
+ QMouseEvent *mev = (QMouseEvent *)event;
+
+ if(isWindowDragWidget(object, mev->pos()))
+ {
+
+ if(/*Qt::NoModifier==mev->modifiers() && */ Qt::LeftButton==mev->button())
+ {
+ QWidget *wid = static_cast<QWidget*>(object);
+ itsDragWidget=wid;
+ itsDragWidgetHadMouseTracking=itsDragWidget->hasMouseTracking();
+ itsDragWidget->setMouseTracking(true);
+ return false;
+ }
+ }
break;
+ }
+ case QEvent::MouseButtonRelease:
+ if(itsDragWidget)
+ {
+ itsDragWidget->setMouseTracking(itsDragWidgetHadMouseTracking);
+ itsDragWidget = 0L;
+ return false;
+ }
+ break;
}
+#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
if(opts.fixParentlessDialogs && ::qt_cast<QDialog *>(object))
{
QDialog *dlg=(QDialog *)object;
@@ -1543,7 +2277,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
switch(event->type())
{
case QEvent::ShowMinimized:
- if(QTC_SKIP_TASKBAR && appIsNotEmbedded(dlg))
+ if(SKIP_TASKBAR && appIsNotEmbedded(dlg))
{
// Ugly hack :-( Cant seem to get KWin to remove the minimize button. So when
// the dialog gets minimized, restore.
@@ -1552,7 +2286,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
}
break;
case QEvent::WindowActivate:
- if(QTC_SKIP_TASKBAR && appIsNotEmbedded(dlg))
+ if(SKIP_TASKBAR && appIsNotEmbedded(dlg))
{
// OO.o's filepicker is a spawned process - but is not set transient :-(
// --plus no reliable way of finding which widget to make it transient for...
@@ -1608,6 +2342,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
}
return false;
}
+#endif
// Track show events for progress bars
if (opts.animatedProgress && ::qt_cast<QProgressBar*>(object))
@@ -1619,13 +2354,11 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
switch(event->type())
{
-#ifdef QTC_HIGHLIGHT_SCROLVIEWS
case QEvent::FocusIn:
case QEvent::FocusOut:
- if(object->isWidgetType() && ::qt_cast<QScrollView*>(object))
+ if(opts.highlightScrollViews && object->isWidgetType() && ::qt_cast<QScrollView*>(object))
((QWidget *)object)->repaint(false);
break;
-#endif
case QEvent::Hide:
case QEvent::Show:
if(::qt_cast<QListBox *>(object) &&
@@ -1646,7 +2379,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
{
if(::qt_cast<QTabBar*>(object) && static_cast<QWidget*>(object)->isEnabled())
{
- itsHoverTab=NULL;
+ itsHoverTab=0L;
itsHoverWidget->repaint(false);
}
else if(!itsHoverWidget->hasMouseTracking() ||
@@ -1657,36 +2390,16 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
}
}
else
- itsHoverWidget=NULL;
-
- if(itsHoverWidget && !itsIsSpecialHover &&
- (
-#if QT_VERSION >= 0x030200
- ::qt_cast<QRadioButton *>(itsHoverWidget) ||
- ::qt_cast<QCheckBox *>(itsHoverWidget) ||
-#endif
- ::qt_cast<QScrollBar *>(itsHoverWidget) ||
-#if KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
- ::qt_cast<QToolButton *>(itsHoverWidget) ||
-
-#endif
- ::qt_cast<QHeader *>(itsHoverWidget) ||
- ::qt_cast<QSpinWidget *>(itsHoverWidget) ||
- ::qt_cast<QComboBox *>(itsHoverWidget) ||
- ::qt_cast<QTabBar *>(itsHoverWidget)))
+ itsHoverWidget=0L;
+ if(itsHoverWidget && !itsIsSpecialHover && isSpecialHover(itsHoverWidget))
itsIsSpecialHover=true;
}
break;
case QEvent::Leave:
if(itsHoverWidget && object==itsHoverWidget)
{
- itsOldPos.setX(-1);
- itsOldPos.setY(-1);
- itsHoverWidget=NULL;
- itsHoverSect=QTC_NO_SECT;
- itsHover=HOVER_NONE;
- itsHoverTab=NULL;
+ resetHover();
((QWidget *)object)->repaint(false);
}
break;
@@ -1706,7 +2419,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
break;
}
- return KStyle::eventFilter(object, event);
+ return BASE_STYLE::eventFilter(object, event);
}
void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &rOrig,
@@ -1719,18 +2432,26 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
br(r);
bool bevelledButton(WIDGET_BUTTON(w) && APPEARANCE_BEVELLED==app),
sunken(flags &(Style_Down|Style_On|Style_Sunken)),
- lightBorder(QTC_DRAW_LIGHT_BORDER(sunken , w, app)),
- doColouredMouseOver(doBorder &&
+ flatWidget(WIDGET_PROGRESSBAR==w && !opts.borderProgress),
+ lightBorder(!flatWidget && DRAW_LIGHT_BORDER(sunken , w, app)),
+ draw3dfull(!flatWidget && !lightBorder && DRAW_3D_FULL_BORDER(sunken, app)),
+ draw3d(!flatWidget && (draw3dfull || (!lightBorder && DRAW_3D_BORDER(sunken, app)))),
+ doColouredMouseOver(!sunken && doBorder &&
opts.coloredMouseOver && flags&Style_MouseOver &&
- (!IS_SLIDER(w) || (WIDGET_SB_SLIDER==w && MO_PLASTIK==opts.coloredMouseOver)) &&
- (flags&QTC_CHECK_BUTTON || flags&QTC_TOGGLE_BUTTON || !sunken)),
+ WIDGET_SPIN!=w && WIDGET_COMBO_BUTTON!=w && WIDGET_SB_BUTTON!=w &&
+ (WIDGET_SB_SLIDER!=w || !opts.colorSliderMouseOver) &&
+ !(flags&DW_CLOSE_BUTTON) &&
+ (opts.coloredTbarMo || !(flags&STD_TOOLBUTTON)) &&
+ (flags&CHECK_BUTTON || flags&TOGGLE_BUTTON || !sunken)),
plastikMouseOver(doColouredMouseOver && MO_PLASTIK==opts.coloredMouseOver),
- colouredMouseOver(doColouredMouseOver && MO_COLORED==opts.coloredMouseOver),
- doEtch(!itsFormMode && doBorder && ETCH_WIDGET(w) && !(flags&QTC_CHECK_BUTTON) &&
- QTC_DO_EFFECT),
+ colouredMouseOver(doColouredMouseOver &&
+ (MO_COLORED==opts.coloredMouseOver || MO_COLORED_THICK==opts.coloredMouseOver ||
+ (MO_GLOW==opts.coloredMouseOver && itsFormMode))),
+ doEtch(!itsFormMode && doBorder && ETCH_WIDGET(w) && !(flags&CHECK_BUTTON) &&
+ DO_EFFECT),
+ glowFocus(doEtch && USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled),
+ sunkenToggleMo(sunken && !(flags&Style_Down) && flags&(Style_MouseOver|TOGGLE_BUTTON)),
horiz(flags&Style_Horizontal);
- int dark(bevelledButton ? 2 : 4),
- c1(sunken ? dark : 0);
const QColor *cols(custom ? custom : itsBackgroundCols),
*border(colouredMouseOver ? borderColors(flags, cols) : cols);
@@ -1738,26 +2459,44 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
if(doEtch)
{
- r.addCoords(0, 1, 0, -1);
+ r.addCoords(1, 1, -1, -1);
br=r;
}
+ // fill
+ if(br.width()>0 && br.height()>0)
+ {
+ // Adjust paint rect, so that gradient is drawn from the same coords as KDE4 and Gtk2
+ if(WIDGET_PROGRESSBAR==w && opts.stripedProgress)
+ {
+ p->save();
+ p->setClipRegion(p->clipRegion().eor(QRegion(br)));
+ }
+ br.addCoords(1, 1,-1,-1);
+ drawBevelGradient(fill, p, br, horiz, sunken, app, w);
+ br.addCoords(-1, -1, 1, 1);
+ if(WIDGET_PROGRESSBAR==w && opts.stripedProgress)
+ p->restore();
+ }
+
if(!colouredMouseOver && lightBorder)
br.addCoords(1, 1,-1,-1);
- else if(colouredMouseOver || (!IS_GLASS(app) && !sunken && flags&Style_Raised))
+ else if(colouredMouseOver || (draw3d && flags&Style_Raised))
{
+ int dark(/*bevelledButton ? */2/* : 4*/);
+
if(colouredMouseOver)
- p->setPen(border[QTC_MO_STD_LIGHT(w, sunken)]);
+ p->setPen(border[MO_STD_LIGHT(w, sunken)]);
else
- p->setPen(border[c1]);
- if(colouredMouseOver || bevelledButton || APPEARANCE_RAISED==app)
+ p->setPen(border[sunken ? dark : 0]);
+ if(colouredMouseOver || bevelledButton || draw3dfull)
{
//Left & top
p->drawLine(br.x()+1, br.y()+2, br.x()+1, br.y()+br.height()-3);
p->drawLine(br.x()+1, br.y()+1, br.x()+br.width()-2, br.y()+1);
if(colouredMouseOver)
- p->setPen(border[QTC_MO_STD_DARK(w)]);
+ p->setPen(border[MO_STD_DARK(w)]);
else
p->setPen(border[sunken ? 0 : dark]);
//Right & bottom
@@ -1785,7 +2524,7 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
br.addCoords(1,1,-1,-1);
p->drawRect(br);
- if(WIDGET_PROGRESSBAR==w && !IS_GLASS(app))
+ if(IS_CUSTOM(app) || (WIDGET_PROGRESSBAR==w && (!IS_GLASS(app) || opts.fillProgress)))
br.addCoords(1,1,-1,-1);
else if(horiz)
br.addCoords(1,0,-1,-1);
@@ -1794,37 +2533,29 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
}
// fill
- if(br.width()>0 && br.height()>0)
- {
- drawBevelGradient(fill, !sunken, p, br, horiz, getWidgetShade(w, true, sunken, app),
- getWidgetShade(w, false, sunken, app), sunken, app, w);
-
+ if(br.width()>0 && br.height()>0 && (!sunken || sunkenToggleMo))
if(plastikMouseOver)
{
if(WIDGET_SB_SLIDER==w)
{
- int len(QTC_SB_SLIDER_MO_LEN(horiz ? r.width() : r.height())),
- so(lightBorder ? QTC_SLIDER_MO_BORDER : 1),
+ int len(SB_SLIDER_MO_LEN(horiz ? r.width() : r.height())),
+ so(lightBorder ? SLIDER_MO_PLASTIK_BORDER : 1),
eo(len+so),
- col(QTC_SLIDER_MO_SHADE);
+ col(SLIDER_MO_SHADE);
if(horiz)
{
- drawBevelGradient(itsMouseOverCols[col], !sunken, p, QRect(r.x()+so, r.y(), len, r.height()),
- horiz, getWidgetShade(w, true, sunken, app),
- getWidgetShade(w, false, sunken, app), sunken, app, w);
- drawBevelGradient(itsMouseOverCols[col], !sunken, p, QRect(r.x()+r.width()-eo, r.y(), len, r.height()),
- horiz, getWidgetShade(w, true, sunken, app),
- getWidgetShade(w, false, sunken, app), sunken, app, w);
+ drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x()+so, r.y(), len, r.height()),
+ horiz, sunken, app, w);
+ drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x()+r.width()-eo, r.y(), len, r.height()),
+ horiz, sunken, app, w);
}
else
{
- drawBevelGradient(itsMouseOverCols[col], !sunken, p, QRect(r.x(), r.y()+so, r.width(), len),
- horiz, getWidgetShade(w, true, sunken, app),
- getWidgetShade(w, false, sunken, app), sunken, app, w);
- drawBevelGradient(itsMouseOverCols[col], !sunken, p, QRect(r.x(), r.y()+r.height()-eo, r.width(), len),
- horiz, getWidgetShade(w, true, sunken, app),
- getWidgetShade(w, false, sunken, app), sunken, app, w);
+ drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x(), r.y()+so, r.width(), len),
+ horiz, sunken, app, w);
+ drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x(), r.y()+r.height()-eo, r.width(), len),
+ horiz, sunken, app, w);
}
}
else
@@ -1832,7 +2563,7 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
bool horizontal((horiz && WIDGET_SB_BUTTON!=w)|| (!horiz && WIDGET_SB_BUTTON==w)),
thin(WIDGET_SB_BUTTON==w || WIDGET_SPIN==w || ((horiz ? r.height() : r.width())<16));
- p->setPen(itsMouseOverCols[QTC_MO_PLASTIK_DARK(w)]);
+ p->setPen(itsMouseOverCols[MO_PLASTIK_DARK(w)]);
if(horizontal)
{
p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1);
@@ -1845,7 +2576,7 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
}
if(!thin)
{
- p->setPen(itsMouseOverCols[QTC_MO_PLASTIK_LIGHT(w)]);
+ p->setPen(itsMouseOverCols[MO_PLASTIK_LIGHT(w)]);
if(horizontal)
{
p->drawLine(r.x()+1, r.y()+2, r.x()+r.width()-2, r.y()+2);
@@ -1859,42 +2590,128 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
}
}
}
- }
+ else if(colouredMouseOver && 0!=round && FULLLY_ROUNDED)
+ {
+ p->setPen(itsMouseOverCols[MO_STD_LIGHT(w, sunken)]);
+
+ if(round&CORNER_TL)
+ p->drawPoint(br.left(), br.top());
+ if(round&CORNER_BL)
+ p->drawPoint(br.left(), br.bottom());
+ if(round&CORNER_BR)
+ p->drawPoint(br.right(), br.bottom());
+ if(round&CORNER_TR)
+ p->drawPoint(br.right(), br.top());
+ }
if(doBorder)
- drawBorder(bgnd, p, r, cg, flags, round, cols, w, doCorners);
+ {
+ const QColor *borderCols=glowFocus ||
+ (WIDGET_COMBO==w && USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled)
+ ? itsFocusCols
+ : (WIDGET_COMBO==w || WIDGET_COMBO_BUTTON==w) && cols==itsComboBtnCols
+ ? flags&Style_MouseOver && MO_GLOW==opts.coloredMouseOver && !sunken
+ ? itsMouseOverCols
+ : itsButtonCols
+ : cols;
+
+ if((!sunken || sunkenToggleMo) && flags&Style_Enabled && !glowFocus &&
+ ((((doEtch && WIDGET_OTHER!=w && WIDGET_SLIDER_TROUGH!=w) || WIDGET_COMBO==w || WIDGET_SB_SLIDER==w) &&
+ MO_GLOW==opts.coloredMouseOver && flags&Style_MouseOver) ||
+ (WIDGET_DEF_BUTTON==w && IND_GLOW==opts.defBtnIndicator)))
+ drawBorder(bgnd, p, r, cg, flags, round,
+ WIDGET_DEF_BUTTON==w && IND_GLOW==opts.defBtnIndicator &&
+ (!(flags&Style_MouseOver) || !itsMouseOverCols)
+ ? itsDefBtnCols : itsMouseOverCols, w, doCorners);
+ else
+ drawBorder(bgnd, p, r, cg, flags, round,
+ colouredMouseOver && MO_COLORED_THICK==opts.coloredMouseOver ? itsMouseOverCols : borderCols,
+ w, doCorners);
+ }
- if(doEtch)
- drawEtch(p, rOrig, cg, true, true, EFFECT_SHADOW==opts.buttonEffect && WIDGET_BUTTON(w) && !sunken);
+ if(doEtch || glowFocus)
+ if( (!sunken || sunkenToggleMo) &&
+ ((WIDGET_OTHER!=w && WIDGET_SLIDER_TROUGH!=w && MO_GLOW==opts.coloredMouseOver && flags&Style_MouseOver) ||
+ glowFocus ||
+ (WIDGET_DEF_BUTTON==w && IND_GLOW==opts.defBtnIndicator)/* ||
+ (flags&Style_HasFocus && FOCUS_FULL==opts.focus)*/ ))
+ drawGlow(p, rOrig, cg, WIDGET_DEF_BUTTON==w && flags&Style_MouseOver ? WIDGET_STD_BUTTON : w,
+ glowFocus ? itsFocusCols : 0);
+ else
+ drawEtch(p, rOrig, cg, EFFECT_SHADOW==opts.buttonEffect && WIDGET_BUTTON(w) && !sunken, ROUNDED_NONE==round);
p->restore();
}
-void QtCurveStyle::drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool top, bool bot, bool raised) const
+void QtCurveStyle::drawGlow(QPainter *p, const QRect &r, const QColorGroup &cg, EWidget w, const QColor *cols) const
{
- if(top && !raised)
+ if(itsMouseOverCols || itsDefBtnCols || cols)
{
- QColor darkCol(shade(cg.background(), QTC_ETCHED_DARK));
-
- p->setPen(darkCol);
- p->drawLine(r.x()+2, r.y(), r.x()+r.width()-3, r.y());
- p->setPen(midColor(darkCol, cg.background()));
- p->drawPoint(r.x()+1, r.y());
- p->drawPoint(r.x()+r.width()-2, r.y());
- p->drawPoint(r.x(), r.y()+1);
- p->drawPoint(r.x()+r.width()-1, r.y()+1);
+ bool def(WIDGET_DEF_BUTTON==w && IND_GLOW==opts.defBtnIndicator),
+ defShade=def && (!itsDefBtnCols ||
+ (itsMouseOverCols && itsDefBtnCols[ORIGINAL_SHADE]==itsMouseOverCols[ORIGINAL_SHADE]));
+ QColor col(cols ? cols[GLOW_MO]
+ : (def && itsDefBtnCols) || !itsMouseOverCols
+ ? itsDefBtnCols[GLOW_DEFBTN] : itsMouseOverCols[GLOW_MO]);
+
+ col=midColorF(cg.background(), col, 1.5-GLOW_ALPHA(defShade));
+ p->setPen(col);
+ if(ROUND_NONE==opts.round)
+ p->drawRect(r);
+ else
+ {
+ p->drawLine(r.x()+2, r.y()+r.height()-1, r.x()+r.width()-3, r.y()+r.height()-1);
+ p->drawLine(r.x()+r.width()-1, r.y()+2, r.x()+r.width()-1, r.y()+r.height()-3);
+ p->drawLine(r.x()+3, r.y(), r.x()+r.width()-4, r.y());
+ p->drawLine(r.x(), r.y()+3, r.x(), r.y()+r.height()-4);
+ //p->setPen(midColor(col, cg.background()));
+ p->drawLine(r.x()+r.width()-1, r.y()+r.height()-3, r.x()+r.width()-3, r.y()+r.height()-1);
+ p->drawLine(r.x(), r.y()+r.height()-3, r.x()+2, r.y()+r.height()-1);
+ p->drawLine(r.x(), r.y()+2, r.x()+2, r.y());
+ p->drawLine(r.x()+r.width()-3, r.y(), r.x()+r.width()-1, r.y()+2);
+ p->setPen(midColor(col, cg.background()));
+ p->drawLine(r.x()+r.width()-1, r.y()+r.height()-2, r.x()+r.width()-2, r.y()+r.height()-1);
+ p->drawLine(r.x(), r.y()+r.height()-2, r.x()+1, r.y()+r.height()-1);
+ p->drawLine(r.x(), r.y()+1, r.x()+1, r.y());
+ p->drawLine(r.x()+r.width()-2, r.y(), r.x()+r.width()-1, r.y()+1);
+ }
}
- if(bot)
+}
+
+void QtCurveStyle::drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool raised, bool square) const
+{
+ square=square || ROUND_NONE==opts.round;
+
+ int mod(square ? 0 : 2);
+
{
- QColor col(raised ? shade(cg.background(), QTC_ETCHED_DARK) : itsBackgroundCols[1]);
+ QColor col(raised ? shade(cg.background(), ETCHED_DARK) : itsBackgroundCols[1]);
p->setPen(col);
- p->drawLine(r.x()+2, r.y()+r.height()-1, r.x()+r.width()-3, r.y()+r.height()-1);
- p->setPen(midColor(raised ? col : itsBackgroundCols[0], cg.background()));
- p->drawPoint(r.x()+1, r.y()+r.height()-1);
- p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-1);
- p->drawPoint(r.x(), r.y()+r.height()-2);
- p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-2);
+ p->drawLine(r.x()+mod, r.y()+r.height()-1, r.x()+r.width()-(1+mod), r.y()+r.height()-1);
+ p->drawLine(r.x()+r.width()-1, r.y()+mod, r.x()+r.width()-1, r.y()+r.height()-(1+mod));
+ if(!square)
+ {
+ p->setPen(midColor(raised ? col : itsBackgroundCols[0], cg.background()));
+ p->drawLine(r.x()+r.width()-1, r.y()+r.height()-3, r.x()+r.width()-3, r.y()+r.height()-1);
+ p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+2, r.y()+r.height()-1);
+ p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-1, r.y()+2);
+ }
+ }
+ if(!raised)
+ {
+ QColor darkCol(shade(cg.background(), ETCHED_DARK));
+
+ p->setPen(darkCol);
+ p->drawLine(r.x()+1+mod, r.y(), r.x()+r.width()-(2+mod), r.y());
+ p->drawLine(r.x(), r.y()+1+mod, r.x(), r.y()+r.height()-(2+mod));
+ if(!square)
+ {
+ p->setPen(midColor(darkCol, cg.background()));
+ p->drawLine(r.x(), r.y()+2, r.x()+2, r.y());
+ p->drawLine(r.x()+r.width()-3, r.y(), r.x()+r.width()-2, r.y()+1);
+ p->drawLine(r.x(), r.y()+r.height()-3, r.x()+1, r.y()+r.height()-2);
+ }
}
}
@@ -1907,8 +2724,19 @@ void QtCurveStyle::drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, c
QColor border(flags&Style_ButtonDefault && IND_FONT_COLOR==opts.defBtnIndicator &&
flags&Style_Enabled
? cg.buttonText()
- : cols[!(flags&Style_Enabled) && (WIDGET_BUTTON(w) || WIDGET_SLIDER_TROUGH==w || flags&QTC_CHECK_BUTTON)
- ? QT_DISABLED_BORDER : borderVal]);
+ : cols[WIDGET_PROGRESSBAR==w
+ ? PBAR_BORDER
+ : !(flags&Style_Enabled) && (WIDGET_BUTTON(w) || WIDGET_SLIDER_TROUGH==w ||
+ flags&CHECK_BUTTON)
+ ? DISABLED_BORDER
+ : itsMouseOverCols==cols && IS_SLIDER(w)
+ ? SLIDER_MO_BORDER_VAL
+ : borderVal]);
+ bool hasFocus(cols==itsFocusCols /* CPD USED TO INDICATE FOCUS! */),
+ hasMouseOver(cols==itsMouseOverCols && ENTRY_MO);
+
+ if(WIDGET_TAB_BOT==w || WIDGET_TAB_TOP==w)
+ cols=itsBackgroundCols;
switch(borderProfile)
{
@@ -1916,28 +2744,40 @@ void QtCurveStyle::drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, c
break;
case BORDER_RAISED:
case BORDER_SUNKEN:
- p->setPen(flags&Style_Enabled && (BORDER_RAISED==borderProfile || APPEARANCE_FLAT!=app)
- ? blendBorderColors
- ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile
- ? 0 : QT_FRAME_DARK_SHADOW]) // Was base???
- : cols[BORDER_RAISED==borderProfile ? 0 : QT_FRAME_DARK_SHADOW]
- : cg.background());
+ case BORDER_LIGHT:
+ if(flags&Style_Enabled && (hasMouseOver || hasFocus) && (WIDGET_ENTRY==w || WIDGET_SCROLLVIEW==w || WIDGET_COMBO==w || WIDGET_SPIN==w))
+ p->setPen(midColorF(cg.background(), cols[BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile
+ ? 0 : FRAME_DARK_SHADOW], 1.5-ENTRY_INNER_ALPHA));
+ else
+ p->setPen(flags&Style_Enabled && (BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile || APPEARANCE_FLAT!=app)
+ ? blendBorderColors
+ ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile
+ ? 0 : FRAME_DARK_SHADOW]) // Was base???
+ : cols[BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile ? 0 : FRAME_DARK_SHADOW]
+ : cg.background());
p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2);
p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1);
- p->setPen(flags&Style_Enabled && (BORDER_SUNKEN==borderProfile || APPEARANCE_FLAT!=app)
- ? blendBorderColors
- ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile
- ? QT_FRAME_DARK_SHADOW : 0]) // Was base???
- : cols[BORDER_RAISED==borderProfile ? QT_FRAME_DARK_SHADOW : 0]
- : cg.background());
+ if(!hasFocus && !hasMouseOver && BORDER_LIGHT!=borderProfile)
+ p->setPen(WIDGET_SCROLLVIEW==w
+ ? cg.background()
+ : WIDGET_ENTRY==w
+ ? cg.base()
+ : flags&Style_Enabled && (BORDER_SUNKEN==borderProfile || APPEARANCE_FLAT!=app ||
+ WIDGET_TAB_TOP==w || WIDGET_TAB_BOT==w)
+ ? blendBorderColors
+ ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile
+ ? FRAME_DARK_SHADOW : 0]) // Was base???
+ : cols[BORDER_RAISED==borderProfile ? FRAME_DARK_SHADOW : 0]
+ : cg.background());
p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()+r.height()-2);
p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+r.width()-2, r.y()+r.height()-2);
}
- if(QTC_ROUNDED && ROUNDED_NONE!=round)
+ if(ROUNDED && ROUNDED_NONE!=round)
{
- bool largeArc(ROUND_FULL==opts.round && !(flags&QTC_CHECK_BUTTON) &&
- r.width()>=QTC_MIN_BTN_SIZE && r.height()>=QTC_MIN_BTN_SIZE);
+ bool largeArc(WIDGET_FOCUS!=w && FULLLY_ROUNDED && !(flags&CHECK_BUTTON) &&
+ r.width()>=MIN_ROUND_FULL_SIZE && r.height()>=MIN_ROUND_FULL_SIZE &&
+ !(flags&DW_CLOSE_BUTTON) && (WIDGET_PROGRESSBAR!=w || opts.fillProgress));
p->setPen(border);
if(itsFormMode)
@@ -1982,137 +2822,140 @@ void QtCurveStyle::drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, c
p->drawLine(r.x()+r.width()-1, r.y()+1, r.x()+r.width()-1, r.y()+r.height()-2);
}
- QColor largeArcMid(midColor(border, bgnd)),
- aaColor(midColor(custom ? custom[3] : itsBackgroundCols[3], bgnd));
- QPixmap *pix=itsFormMode ? getPixelPixmap(border) : NULL;
-
- if(round&CORNER_TL)
+ //if(!opts.fillProgress || WIDGET_PROGRESSBAR!=w)
{
- if(largeArc)
+ QColor largeArcMid(midColor(border, bgnd)),
+ aaColor(midColor(custom ? custom[3] : itsBackgroundCols[3], bgnd));
+ QPixmap *pix=itsFormMode ? getPixelPixmap(border) : 0L;
+
+ if(round&CORNER_TL)
{
- p->drawPoint(r.x()+1, r.y()+1);
- if(itsFormMode)
- {
- p->drawPixmap(r.x(), r.y()+1, *pix);
- p->drawPixmap(r.x()+1, r.y(), *pix);
- }
- else
+ if(largeArc)
{
- p->setPen(largeArcMid);
- p->drawLine(r.x(), r.y()+1, r.x()+1, r.y());
+ p->drawPoint(r.x()+1, r.y()+1);
+ if(itsFormMode)
+ {
+ p->drawPixmap(r.x(), r.y()+1, *pix);
+ p->drawPixmap(r.x()+1, r.y(), *pix);
+ }
+ else
+ {
+ p->setPen(largeArcMid);
+ p->drawLine(r.x(), r.y()+1, r.x()+1, r.y());
+ }
}
+ if(doCorners)
+ if(itsFormMode)
+ {
+ if(!largeArc)
+ p->drawPixmap(r.x(), r.y(), *pix);
+ }
+ else
+ {
+ p->setPen(largeArc ? bgnd : aaColor);
+ p->drawPoint(r.x(), r.y());
+ }
}
- if(doCorners)
- if(itsFormMode)
- {
- if(!largeArc)
- p->drawPixmap(r.x(), r.y(), *pix);
- }
- else
- {
- p->setPen(largeArc ? bgnd : aaColor);
- p->drawPoint(r.x(), r.y());
- }
- }
- else
- p->drawPoint(r.x(), r.y());
+ else
+ p->drawPoint(r.x(), r.y());
- p->setPen(border);
- if(round&CORNER_TR)
- {
- if(largeArc)
+ p->setPen(border);
+ if(round&CORNER_TR)
{
- p->drawPoint(r.x()+r.width()-2, r.y()+1);
- if(itsFormMode)
- {
- p->drawPixmap(r.x()+r.width()-2, r.y(), *pix);
- p->drawPixmap(r.x()+r.width()-1, r.y()+1, *pix);
- }
- else
+ if(largeArc)
{
- p->setPen(largeArcMid);
- p->drawLine(r.x()+r.width()-2, r.y(), r.x()+r.width()-1, r.y()+1);
+ p->drawPoint(r.x()+r.width()-2, r.y()+1);
+ if(itsFormMode)
+ {
+ p->drawPixmap(r.x()+r.width()-2, r.y(), *pix);
+ p->drawPixmap(r.x()+r.width()-1, r.y()+1, *pix);
+ }
+ else
+ {
+ p->setPen(largeArcMid);
+ p->drawLine(r.x()+r.width()-2, r.y(), r.x()+r.width()-1, r.y()+1);
+ }
}
+ if(doCorners)
+ if(itsFormMode)
+ {
+ if(!largeArc)
+ p->drawPixmap(r.x()+r.width()-1, r.y(), *pix);
+ }
+ else
+ {
+ p->setPen(largeArc ? bgnd : aaColor);
+ p->drawPoint(r.x()+r.width()-1, r.y());
+ }
}
- if(doCorners)
- if(itsFormMode)
- {
- if(!largeArc)
- p->drawPixmap(r.x()+r.width()-1, r.y(), *pix);
- }
- else
- {
- p->setPen(largeArc ? bgnd : aaColor);
- p->drawPoint(r.x()+r.width()-1, r.y());
- }
- }
- else
- p->drawPoint(r.x()+r.width()-1, r.y());
+ else
+ p->drawPoint(r.x()+r.width()-1, r.y());
- p->setPen(border);
- if(round&CORNER_BR)
- {
- if(largeArc)
+ p->setPen(border);
+ if(round&CORNER_BR)
{
- p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-2);
- if(itsFormMode)
- {
- p->drawPixmap(r.x()+r.width()-2, r.y()+r.height()-1, *pix);
- p->drawPixmap(r.x()+r.width()-1, r.y()+r.height()-2, *pix);
- }
- else
+ if(largeArc)
{
- p->setPen(largeArcMid);
- p->drawLine(r.x()+r.width()-2, r.y()+r.height()-1, r.x()+r.width()-1,
- r.y()+r.height()-2);
+ p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-2);
+ if(itsFormMode)
+ {
+ p->drawPixmap(r.x()+r.width()-2, r.y()+r.height()-1, *pix);
+ p->drawPixmap(r.x()+r.width()-1, r.y()+r.height()-2, *pix);
+ }
+ else
+ {
+ p->setPen(largeArcMid);
+ p->drawLine(r.x()+r.width()-2, r.y()+r.height()-1, r.x()+r.width()-1,
+ r.y()+r.height()-2);
+ }
}
+ if(doCorners)
+ if(itsFormMode)
+ {
+ if(!largeArc)
+ p->drawPixmap(r.x()+r.width()-1, r.y()+r.height()-1, *pix);
+ }
+ else
+ {
+ p->setPen(largeArc ? bgnd : aaColor);
+ p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-1);
+ }
}
- if(doCorners)
- if(itsFormMode)
- {
- if(!largeArc)
- p->drawPixmap(r.x()+r.width()-1, r.y()+r.height()-1, *pix);
- }
- else
- {
- p->setPen(largeArc ? bgnd : aaColor);
- p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-1);
- }
- }
- else
- p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-1);
+ else
+ p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-1);
- p->setPen(border);
- if(round&CORNER_BL)
- {
- if(largeArc)
+ p->setPen(border);
+ if(round&CORNER_BL)
{
- p->drawPoint(r.x()+1, r.y()+r.height()-2);
- if(itsFormMode)
- {
- p->drawPixmap(r.x(), r.y()+r.height()-2, *pix);
- p->drawPixmap(r.x()+1, r.y()+r.height()-1, *pix);
- }
- else
+ if(largeArc)
{
- p->setPen(largeArcMid);
- p->drawLine(r.x(), r.y()+r.height()-2, r.x()+1, r.y()+r.height()-1);
+ p->drawPoint(r.x()+1, r.y()+r.height()-2);
+ if(itsFormMode)
+ {
+ p->drawPixmap(r.x(), r.y()+r.height()-2, *pix);
+ p->drawPixmap(r.x()+1, r.y()+r.height()-1, *pix);
+ }
+ else
+ {
+ p->setPen(largeArcMid);
+ p->drawLine(r.x(), r.y()+r.height()-2, r.x()+1, r.y()+r.height()-1);
+ }
}
+ if(doCorners)
+ if(itsFormMode)
+ {
+ if(!largeArc)
+ p->drawPixmap(r.x(), r.y()+r.height()-1, *pix);
+ }
+ else
+ {
+ p->setPen(largeArc ? bgnd : aaColor);
+ p->drawPoint(r.x(), r.y()+r.height()-1);
+ }
}
- if(doCorners)
- if(itsFormMode)
- {
- if(!largeArc)
- p->drawPixmap(r.x(), r.y()+r.height()-1, *pix);
- }
- else
- {
- p->setPen(largeArc ? bgnd : aaColor);
- p->drawPoint(r.x(), r.y()+r.height()-1);
- }
+ else
+ p->drawPoint(r.x(), r.y()+r.height()-1);
}
- else
- p->drawPoint(r.x(), r.y()+r.height()-1);
}
else
{
@@ -2122,118 +2965,156 @@ void QtCurveStyle::drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, c
}
}
+void QtCurveStyle::drawMdiIcon(QPainter *painter, const QColor &color, const QColor &shadow, const QRect &r, bool sunken, int margin,
+ SubControl button) const
+{
+ if(!sunken)
+ drawWindowIcon(painter, shadow, adjusted(r, 1, 1, 1, 1), sunken, margin, button);
+ drawWindowIcon(painter, color, r, sunken, margin, button);
+}
+
+void QtCurveStyle::drawWindowIcon(QPainter *painter, const QColor &color, const QRect &r, bool sunken, int margin, SubControl button) const
+{
+ QRect rect(r);
+
+ // Icons look best at 22x22...
+ if(rect.height()>22)
+ {
+ int diff=(rect.height()-22)/2;
+ adjust(rect, diff, diff, -diff, -diff);
+ }
+
+ if(sunken)
+ adjust(rect, 1, 1, 1, 1);
+
+ if(margin)
+ adjust(rect, margin, margin, -margin, -margin);
+
+ painter->setPen(color);
+
+ switch(button)
+ {
+ case SC_TitleBarMinButton:
+ painter->drawLine(rect.center().x() - 2, rect.center().y() + 3, rect.center().x() + 3, rect.center().y() + 3);
+ painter->drawLine(rect.center().x() - 2, rect.center().y() + 4, rect.center().x() + 3, rect.center().y() + 4);
+ painter->drawLine(rect.center().x() - 3, rect.center().y() + 3, rect.center().x() - 3, rect.center().y() + 4);
+ painter->drawLine(rect.center().x() + 4, rect.center().y() + 3, rect.center().x() + 4, rect.center().y() + 4);
+ break;
+ case SC_TitleBarMaxButton:
+ painter->drawRect(rect); // adjusted(rect, 0, 0, -1, -1));
+ painter->drawLine(rect.left() + 1, rect.top() + 1, rect.right() - 1, rect.top() + 1);
+ painter->drawPoint(rect.topLeft());
+ painter->drawPoint(rect.topRight());
+ painter->drawPoint(rect.bottomLeft());
+ painter->drawPoint(rect.bottomRight());
+ break;
+ case SC_TitleBarCloseButton:
+ painter->drawLine(rect.left() + 1, rect.top(), rect.right(), rect.bottom() - 1);
+ painter->drawLine(rect.left(), rect.top() + 1, rect.right() - 1, rect.bottom());
+ painter->drawLine(rect.right() - 1, rect.top(), rect.left(), rect.bottom() - 1);
+ painter->drawLine(rect.right(), rect.top() + 1, rect.left() + 1, rect.bottom());
+ painter->drawPoint(rect.topLeft());
+ painter->drawPoint(rect.topRight());
+ painter->drawPoint(rect.bottomLeft());
+ painter->drawPoint(rect.bottomRight());
+ painter->drawLine(rect.left() + 1, rect.top() + 1, rect.right() - 1, rect.bottom() - 1);
+ painter->drawLine(rect.left() + 1, rect.bottom() - 1, rect.right() - 1, rect.top() + 1);
+ break;
+ case SC_TitleBarNormalButton:
+ {
+ QRect r2 = adjusted(rect, 0, 3, -3, 0);
+
+ painter->drawRect(r2); // adjusted(r2, 0, 0, -1, -1));
+ painter->drawLine(r2.left() + 1, r2.top() + 1, r2.right() - 1, r2.top() + 1);
+ painter->drawPoint(r2.topLeft());
+ painter->drawPoint(r2.topRight());
+ painter->drawPoint(r2.bottomLeft());
+ painter->drawPoint(r2.bottomRight());
+
+ QRect backWindowRect(adjusted(rect, 3, 0, 0, -3));
+ QRegion clipRegion(backWindowRect);
+
+ clipRegion -= r2;
+ if(sunken)
+ adjust(backWindowRect, 1, 1, 1, 1);
+ painter->drawRect(backWindowRect); // adjusted(backWindowRect, 0, 0, -1, -1));
+ painter->drawLine(backWindowRect.left() + 1, backWindowRect.top() + 1,
+ backWindowRect.right() - 1, backWindowRect.top() + 1);
+ painter->drawPoint(backWindowRect.topLeft());
+ painter->drawPoint(backWindowRect.topRight());
+ painter->drawPoint(backWindowRect.bottomLeft());
+ painter->drawPoint(backWindowRect.bottomRight());
+ break;
+ }
+ case SC_TitleBarShadeButton:
+ ::drawArrow(painter, rect, color, PE_ArrowUp, opts, true);
+ break;
+ case SC_TitleBarUnshadeButton:
+ ::drawArrow(painter, rect, color, PE_ArrowDown, opts, true);
+ default:
+ break;
+ }
+}
+
void QtCurveStyle::drawEntryField(QPainter *p, const QRect &rx, const QColorGroup &cg,
- SFlags flags, bool highlight, int round, EWidget w) const
+ SFlags flags, EntryColor coloration, int round, EWidget w) const
{
- const QColor *use(highlight ? itsMenuitemCols : buttonColors(cg));
+ const QColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols
+ ? itsMouseOverCols
+ : ENTRY_FOCUS==coloration && itsFocusCols
+ ? itsFocusCols
+ : backgroundColors(cg));
bool isSpin(WIDGET_SPIN==w),
- doEtch(!itsFormMode && QTC_DO_EFFECT);
+ doEtch(!itsFormMode && opts.etchEntry && (!isSpin || opts.unifySpin) && WIDGET_COMBO!=w && DO_EFFECT),
+ reverse(QApplication::reverseLayout());
+
+ if(WIDGET_SCROLLVIEW!=w && (opts.square&SQUARE_ENTRY))
+ round=ROUNDED_NONE;
QRect r(rx);
if(doEtch)
- r.addCoords(0, 1, 0, -1);
+ r.addCoords(1, 1, -1, -1);
- if(isSpin)
+ if(!itsFormMode)
{
- if(QApplication::reverseLayout())
- r.addCoords(-1, 0, 0, 0);
-
- p->setPen(flags&Style_Enabled ? cg.base() : cg.background());
- p->drawLine(r.x()+r.width()-2, r.y(), r.x()+r.width()-2, r.y()+r.height()-1);
- p->drawLine(r.x()+r.width()-3, r.y(), r.x()+r.width()-3, r.y()+r.height()-1);
+ p->setPen(cg.background());
+ p->drawRect(rx);
}
- if(!itsFormMode)
- p->fillRect(rx, cg.background());
- p->fillRect(QRect(rx.x()+2, rx.y()+2, rx.x()+rx.width()-3, rx.y()+rx.height()-3),
- flags&Style_Enabled ? cg.base() : cg.background());
+ if(isSpin || WIDGET_ENTRY==w || WIDGET_COMBO==w)
+ {
+ if(reverse && isSpin)
+ r.addCoords(-1, 0, 0, 0);
- p->setPen(APPEARANCE_FLAT!=opts.appearance || highlight
- ? midColor(flags&Style_Enabled ? cg.base() : cg.background(), use[3])
- : cg.base());
- p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2);
- p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-(isSpin ? 0 : 2), r.y()+1);
+ if(isSpin || WIDGET_COMBO==w)
+ p->fillRect(r, flags&Style_Enabled ? cg.base() : cg.background());
+ }
- p->setPen(flags&Style_Enabled ? midColor(cg.base(), use[0]) : cg.background());
- p->drawLine(r.x()+r.width()-(isSpin && highlight ? 3 : 2), r.y()+1,
- r.x()+r.width()-(isSpin && highlight ? 3 : 2), r.y()+r.height()-2);
- p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+r.width()-(isSpin ? 0 : 2), r.y()+r.height()-2);
+ if(ENTRY_NONE!=coloration && isSpin && !opts.unifySpin)
+ if(reverse)
+ r.addCoords(1, 0, 0, 0);
+ else
+ r.addCoords(0, 0, -1, 0);
- if(highlight && isSpin)
- {
- p->setPen(use[QT_STD_BORDER]);
- p->drawLine(r.x()+r.width()-2, r.y(), r.x()+r.width()-2, r.y()+r.height()-1);
- }
+ drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal), round, use,
+ WIDGET_SCROLLVIEW==w ? w : WIDGET_ENTRY, true, isSpin && !(flags&Style_Enabled) ? BORDER_FLAT : BORDER_SUNKEN);
- drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal), round, use);
if(doEtch)
{
- r=rx;
+ QRect r(rx);
p->setClipRegion(r);
if(!(round&CORNER_TR) && !(round&CORNER_BR))
r.addCoords(0, 0, 2, 0);
if(!(round&CORNER_TL) && !(round&CORNER_BL))
r.addCoords(-2, 0, 0, 0);
- drawEtch(p, r, cg, true, true, EFFECT_SHADOW==opts.buttonEffect && WIDGET_BUTTON(w) &&
- !(flags &(Style_Down | Style_On | Style_Sunken)));
+ drawEtch(p, r, cg, EFFECT_SHADOW==opts.buttonEffect && WIDGET_BUTTON(w) &&
+ !(flags &(Style_Down | Style_On | Style_Sunken)), ROUNDED_NONE==round);
p->setClipping(false);
}
}
-static void drawArrow(QPainter *p, const QRect &r, const QColor &col, QStyle::PrimitiveElement pe, const Options &opts, bool small=false)
-{
- QPointArray a;
-
- if(small)
- switch(pe)
- {
- case QStyle::PE_ArrowUp:
- a.setPoints(opts.vArrows ? 7 : 3, 2,0, 0,-2, -2,0, -2,1, -1,0, 1,0, 2,1);
- break;
- case QStyle::PE_ArrowDown:
- a.setPoints(opts.vArrows ? 7 : 3, 2,0, 0,2, -2,0, -2,-1, -1,0, 1,0, 2,-1);
- break;
- case QStyle::PE_ArrowRight:
- a.setPoints(opts.vArrows ? 7 : 3, 0,-2, 2,0, 0,2, -1,2, 0,1, 0,-1, -1,-2);
- break;
- case QStyle::PE_ArrowLeft:
- a.setPoints(opts.vArrows ? 7 : 3, 0,-2, -2,0, 0,2, 1,2, 0,1, 0,-1, 1,-2);
- break;
- default:
- return;
- }
- else // Large arrows...
- switch(pe)
- {
- case QStyle::PE_ArrowUp:
- a.setPoints(opts.vArrows ? 6 : 3, 3,1, 0,-2, -3,1, -2, 2, 0,0, 2,2);
- break;
- case QStyle::PE_ArrowDown:
- a.setPoints(opts.vArrows ? 6 : 3, 3,-1, 0,2, -3,-1, -2,-2, 0,0, 2,-2);
- break;
- case QStyle::PE_ArrowRight:
- a.setPoints(opts.vArrows ? 6 : 3, -1,-3, 2,0, -1,3, -2,2, 0,0, -2,-2);
- break;
- case QStyle::PE_ArrowLeft:
- a.setPoints(opts.vArrows ? 6 : 3, 1,-3, -2,0, 1,3, 2,2, 0,0, 2,-2);
- break;
- default:
- return;
- }
-
- if(a.isNull())
- return;
-
- p->save();
- a.translate((r.x()+(r.width()>>1)),(r.y()+(r.height()>>1)));
- p->setBrush(col);
- p->setPen(col);
- p->drawPolygon(a);
- p->restore();
-}
-
void QtCurveStyle::drawArrow(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
PrimitiveElement pe, bool small, bool checkActive) const
{
@@ -2243,7 +3124,7 @@ void QtCurveStyle::drawArrow(QPainter *p, const QRect &r, const QColorGroup &cg,
: cg.text()
: cg.mid());
- ::drawArrow(p, r, col, pe, opts, small);
+ ::drawArrow(p, r, p->pen()==QPen::NoPen ? col : p->pen().color(), pe, opts, small);
}
void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &r,
@@ -2262,8 +3143,8 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(flags&Style_Down)
flags=((flags|Style_Down)^Style_Down)| Style_Sunken;
flags|=Style_Enabled;
-#if KDE_VERSION >= 0x30200
-#if KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
if(HOVER_KICKER==itsHover && itsHoverWidget) // && itsHoverWidget==p->device())
flags|=Style_MouseOver;
#endif
@@ -2271,15 +3152,14 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
#endif
drawLightBevel(p, r, cg, flags|Style_Horizontal, ROUNDED_ALL,
getFill(flags, use), use, true, false);
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsFormMode=false;
#endif
}
else
{
- bool isFirst(false), isLast(false), isTable(false);
- QHeader *header(p && p->device() ? dynamic_cast<QHeader*>(p->device())
- : NULL);
+ bool isFirst(false), isLast(false), isTable(false), isSort(false);
+ QHeader *header(p && p->device() ? dynamic_cast<QHeader*>(p->device()) : 0L);
if (header)
{
@@ -2294,20 +3174,31 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
isLast=tbl->rowAt(r.y()+header->offset())==(tbl->numRows()-1);
}
else
- isFirst = header->mapToIndex(header->sectionAt(r.x()+header->offset())) == 0;
+ {
+ int index=header->mapToIndex(header->sectionAt(r.x()+header->offset()));
+ isFirst = index == 0;
+ isSort = header->sortIndicatorSection() == index;
+ }
}
else if(0==flags) // Header on popup menu?
- {
+ { QWidget *widget(p && p->device() ? dynamic_cast<QWidget*>(p->device()) : 0L);
+ bool menuTitle(widget && 0==qstrcmp(widget->className(), "KPopupTitle"));
const QColor *use(buttonColors(cg));
-
- drawLightBevel(p, r, cg, flags|Style_Horizontal, ROUNDED_ALL,
- getFill(flags, use), use);
+ QRect r2(r);
+
+ if(menuTitle)
+ r2.addCoords(2, 2, -2, -2);
+ drawLightBevel(p, r2, cg, flags|Style_Horizontal, ROUNDED_ALL, getFill(flags, use), use);
break;
}
+ const QColor *use(flags&Style_Enabled && itsSortedLvColors && isSort
+ ? itsSortedLvColors
+ : opts.lvButton ? buttonColors(cg) : backgroundColors(cg));
+
flags=((flags|Style_Sunken)^Style_Sunken)| Style_Raised;
- if(QTC_NO_SECT!=itsHoverSect && HOVER_HEADER==itsHover && itsHoverWidget)
+ if(NO_SECT!=itsHoverSect && HOVER_HEADER==itsHover && itsHoverWidget)
{
QHeader *hd(::qt_cast<QHeader *>(itsHoverWidget));
@@ -2317,70 +3208,57 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
bool sunken(flags &(Style_Down | Style_On | Style_Sunken));
- drawBevelGradient(getFill(flags, itsBackgroundCols), !sunken, p, r, flags&Style_Horizontal,
- sunken ? SHADE_BEVEL_GRAD_SEL_LIGHT : SHADE_BEVEL_GRAD_LIGHT,
- sunken ? SHADE_BEVEL_GRAD_SEL_DARK : SHADE_BEVEL_GRAD_DARK,
+ drawBevelGradient(getFill(flags, use), p, r, flags&Style_Horizontal,
sunken, opts.lvAppearance, WIDGET_LISTVIEW_HEADER);
if(APPEARANCE_RAISED==opts.lvAppearance)
{
- p->setPen(itsBackgroundCols[4]);
+ p->setPen(use[4]);
if(flags&Style_Horizontal)
p->drawLine(r.x(), r.y()+r.height()-2, r.x()+r.width()-1, r.y()+r.height()-2);
else
p->drawLine(r.x()+r.width()-2, r.y(), r.x()+r.width()-2, r.y()+r.height()-1);
}
- const QColor *border(borderColors(flags, NULL));
-
if(flags&Style_Horizontal)
{
- if(border)
- {
- p->setPen(border[ORIGINAL_SHADE]);
- p->drawLine(r.x(), r.y()+r.height()-2, r.x()+r.width()-1,
- r.y()+r.height()-2);
- p->setPen(border[QT_STD_BORDER]);
- }
- else
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(use[STD_BORDER]);
p->drawLine(r.x(), r.y()+r.height()-1, r.x()+r.width()-1, r.y()+r.height()-1);
+ if(itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver)
+ drawHighlight(p, QRect(r.x(), r.y()+r.height()-2, r.width(), 2), cg, true, true);
+
if(!isFirst)
{
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(use[STD_BORDER]);
p->drawLine(r.x(), r.y()+5, r.x(), r.y()+r.height()-6);
- p->setPen(itsBackgroundCols[0]);
+ p->setPen(use[0]);
p->drawLine(r.x()+1, r.y()+5, r.x()+1, r.y()+r.height()-6);
}
}
else
{
- if(border)
- {
- p->setPen(border[ORIGINAL_SHADE]);
- p->drawLine(r.x()+r.width()-2, r.y(), r.x()+r.width()-2, r.y()+r.height()-1);
- p->setPen(border[QT_STD_BORDER]);
- }
- else
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(use[STD_BORDER]);
p->drawLine(r.x()+r.width()-1, r.y(), r.x()+r.width()-1, r.y()+r.height()-1);
if(!isLast)
{
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(use[STD_BORDER]);
p->drawLine(r.x()+5, r.y()+r.height()-2, r.x()+r.width()-6,
r.y()+r.height()-2);
- p->setPen(itsBackgroundCols[0]);
+ p->setPen(use[0]);
p->drawLine(r.x()+5, r.y()+r.height()-1, r.x()+r.width()-6,
r.y()+r.height()-1);
}
+
+ if(itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver)
+ drawHighlight(p, QRect(r.x(), r.y()+r.height()-3, r.width(), 2), cg, true, true);
}
}
break;
}
case PE_HeaderArrow:
- drawArrow(p, r, cg, flags, flags&Style_Up ? PE_ArrowUp : PE_ArrowDown);
+ ::drawArrow(p, r, MO_ARROW(cg.buttonText()), flags&Style_Up ? PE_ArrowUp : PE_ArrowDown, opts, false);
break;
case PE_ButtonBevel:
flags|=Style_Enabled;
@@ -2388,10 +3266,11 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_ButtonTool:
case PE_ButtonDropDown:
{
- const QColor *use(buttonColors(cg));
+ const QColor *use((IND_TINT==opts.defBtnIndicator || IND_SELECTED==opts.defBtnIndicator) && flags&Style_Enabled && flags&Style_ButtonDefault
+ ? itsDefBtnCols : buttonColors(cg));
bool glassMod(PE_ButtonTool==pe && IS_GLASS(opts.appearance) &&
IS_GLASS(opts.toolbarAppearance)),
- mdi(!(flags&QTC_CHECK_BUTTON) && (!(flags&QTC_STD_TOOLBUTTON)||flags&QTC_NO_ETCH_BUTTON) &&
+ mdi(!(flags&CHECK_BUTTON) && (!(flags&STD_TOOLBUTTON)||flags&NO_ETCH_BUTTON) &&
PE_ButtonTool==pe && r.width()<=16 && r.height()<=16),
operaMdi(PE_ButtonTool==pe && APP_OPERA==itsThemedApp && r.width()==16 && r.height()==16);
@@ -2399,9 +3278,9 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(!(flags&Style_Sunken))
flags|=Style_Raised;
- if(PE_ButtonTool==pe && flags&QTC_VERTICAL_TB_BUTTON)
+ if(PE_ButtonTool==pe && flags&VERTICAL_TB_BUTTON)
{
- flags-=QTC_VERTICAL_TB_BUTTON;
+ flags-=VERTICAL_TB_BUTTON;
if(flags&Style_Horizontal)
flags-=Style_Horizontal;
}
@@ -2410,26 +3289,43 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
itsFormMode=itsFormMode || mdi || operaMdi;
if(mdi || operaMdi)
+ {
flags|=Style_Horizontal;
+ if(!operaMdi)
+ {
+ if(flags<0x14000000 && !(flags&(Style_Down|Style_On|Style_Sunken|Style_MouseOver)))
+ break;
+ if(flags<0x14000000)
+ use=getMdiColors(cg, true);
+ }
+ }
- drawLightBevel(p, r, cg, glassMod ? flags : flags|Style_Horizontal,
-#if KDE_VERSION >= 0x30200
+ drawLightBevel(/*flags&DW_CLOSE_BUTTON
+ ? cg.background().dark(DW_BGND)
+ : */cg.background(),
+ p, r, cg, glassMod ? flags : flags|Style_Horizontal,
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
(APP_KORN==itsThemedApp && itsIsTransKicker && PE_ButtonTool==pe) ||
#endif
operaMdi || mdi
- ? ROUNDED_NONE
- : ROUNDED_ALL,
- getFill(flags, use), use, true, true,
- flags&QTC_NO_ETCH_BUTTON ? WIDGET_NO_ETCH_BTN : WIDGET_STD_BUTTON);
-
- if(IND_COLORED==opts.defBtnIndicator && (flags&Style_ButtonDefault))
+ ? ROUNDED_NONE
+ : ROUNDED_ALL,
+ getFill(flags, use, false,
+ flags&Style_ButtonDefault && flags&Style_Enabled && IND_DARKEN==opts.defBtnIndicator),
+ use, true, true,
+ flags&NO_ETCH_BUTTON
+ ? WIDGET_NO_ETCH_BTN
+ : flags&Style_ButtonDefault && flags&Style_Enabled && IND_COLORED!=opts.defBtnIndicator
+ ? WIDGET_DEF_BUTTON
+ : WIDGET_STD_BUTTON);
+
+ if(IND_COLORED==opts.defBtnIndicator && flags&Style_ButtonDefault && flags&Style_Enabled)
{
- const QColor *cols=itsMouseOverCols && flags&Style_MouseOver ? itsMouseOverCols : itsDefBtnCols;
- QRegion outer(r);
- QRect r2(r);
+ QRegion outer(r);
+ QRect r2(r);
- if(!itsFormMode && QTC_DO_EFFECT)
- r2.addCoords(0, 1, 0, -1);
+ if(!itsFormMode && DO_EFFECT)
+ r2.addCoords(1, 1, -1, -1);
r2.addCoords(COLORED_BORDER_SIZE, COLORED_BORDER_SIZE, -COLORED_BORDER_SIZE,
-COLORED_BORDER_SIZE);
@@ -2439,12 +3335,12 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
p->setClipRegion(outer.eor(inner));
drawLightBevel(p, r, cg, glassMod ? flags : flags|Style_Horizontal,
- flags&QTC_CHECK_BUTTON
-#if KDE_VERSION >= 0x30200
+ flags&CHECK_BUTTON
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|| (APP_KORN==itsThemedApp && itsIsTransKicker && PE_ButtonTool==pe)
#endif
? ROUNDED_NONE : ROUNDED_ALL,
- cols[QTC_MO_DEF_BTN], cols, true, true,
+ itsDefBtnCols[MO_DEF_BTN], itsDefBtnCols, true, true,
WIDGET_DEF_BUTTON);
p->setClipping(false);
}
@@ -2457,16 +3353,17 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
case IND_CORNER:
{
- const QColor *use(buttonColors(cg));
QPointArray points;
bool sunken(flags&Style_Down || flags&Style_Sunken);
- int offset(sunken ? 4 : 3);
+ int offset(sunken ? 5 : 4),
+ etchOffset(DO_EFFECT ? 1 : 0);
+ const QColor *cols(itsFocusCols ? itsFocusCols : itsHighlightCols);
- points.setPoints(3, r.x()+offset, r.y()+offset+1, r.x()+offset+6, r.y()+offset+1,
- r.x()+offset, r.y()+offset+7);
+ points.setPoints(3, r.x()+offset+etchOffset, r.y()+offset+etchOffset, r.x()+offset+6+etchOffset, r.y()+offset+etchOffset,
+ r.x()+offset+etchOffset, r.y()+offset+6+etchOffset);
- p->setBrush(use[sunken ? 0 : 4]);
- p->setPen(use[sunken ? 0 : 4]);
+ p->setBrush(cols[sunken ? 0 : 4]);
+ p->setPen(cols[sunken ? 0 : 4]);
p->drawPolygon(points);
break;
}
@@ -2477,13 +3374,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_CheckMark:
if(flags&Style_On)
{
- QPixmap *pix(getPixmap(flags&Style_Enabled
- ? (flags&Style_Selected && !(flags&QTC_LISTVIEW_ITEM)) ||
- (flags&Style_Active && flags&QTC_MENU_ITEM)
- ? cg.highlightedText()
- : itsCheckRadioCol
- : cg.mid(),
- PIX_CHECK, 1.0));
+ QPixmap *pix(getPixmap(checkRadioCol(flags, cg), PIX_CHECK, 1.0));
p->drawPixmap(r.center().x()-(pix->width()/2), r.center().y()-(pix->height()/2),
*pix);
@@ -2492,11 +3383,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
int x(r.center().x()), y(r.center().y());
- p->setPen(flags&Style_Enabled
- ? flags&Style_Selected && !(flags&QTC_LISTVIEW_ITEM)
- ? cg.highlightedText()
- : itsCheckRadioCol
- : cg.mid());
+ p->setPen(checkRadioCol(flags, cg));
p->drawLine(x-3, y, x+3, y);
p->drawLine(x-3, y+1, x+3, y+1);
}
@@ -2507,13 +3394,13 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(item)
{
- const QColor *bc(borderColors(flags, NULL)),
+ const QColor *bc(borderColors(flags, 0L)),
*btn(buttonColors(cg)),
*use(bc ? bc : btn);
int x(r.x()+1), y(r.y()+2);
p->drawPixmap(x, y, *getPixmap(use[opts.coloredMouseOver && flags&Style_MouseOver
- ? 4 : QT_BORDER(flags&Style_Enabled)],
+ ? 4 : BORDER_VAL(flags&Style_Enabled)],
PIX_RADIO_BORDER, 0.8));
::drawArrow(p, QRect(r.x()-1, r.y()-1, r.width(), r.height()),
use[opts.coloredMouseOver && flags&Style_MouseOver ? 4:5], PE_ArrowDown, opts);
@@ -2547,13 +3434,13 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
}
- QRect checkRect(r.x()+1, r.y()+1, QTC_CHECK_SIZE, QTC_CHECK_SIZE);
- drawPrimitive(PE_Indicator, p, checkRect, cg, flags|QTC_LISTVIEW_ITEM);
+ QRect checkRect(r.x()+1, r.y()+1, opts.crSize, opts.crSize);
+ drawPrimitive(PE_Indicator, p, checkRect, cg, flags|LISTVIEW_ITEM);
}
break;
}
case PE_IndicatorMask:
- if(QTC_ROUNDED)
+ if(ROUNDED)
{
p->fillRect(r, color0);
p->fillRect(r.x()+1, r.y(), r.width()-2, r.height(), color1);
@@ -2566,38 +3453,95 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
break;
case PE_Indicator:
{
- bool on(flags&Style_On || !(flags&Style_Off));
+ bool doEtch(DO_EFFECT && !itsFormMode && !(flags&LISTVIEW_ITEM)),
+ on(flags&Style_On || !(flags&Style_Off)),
+ sunken(flags&Style_Down);
+ QRect rect(doEtch ? QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) : r);
SFlags sflags(!(flags&Style_Off) ? flags|Style_On : flags);
- if(!itsFormMode && sflags&Style_MouseOver && HOVER_NONE==itsHover)
- sflags-=Style_MouseOver;
+ if(sunken || (!itsFormMode && HOVER_NONE==itsHover))
+ sflags&=~Style_MouseOver;
- const QColor *bc(borderColors(sflags, NULL)),
- *btn(buttonColors(cg)),
+ bool glowFocus(USE_GLOW_FOCUS(flags&Style_MouseOver) && sflags&Style_Enabled && sflags&Style_HasFocus),
+ glow(doEtch && sflags&Style_Enabled && ((MO_GLOW==opts.coloredMouseOver && sflags&Style_MouseOver) || glowFocus));
+ const QColor *bc(glowFocus ? itsFocusCols : borderColors(sflags, 0L)),
+ *btn(checkRadioColors(cg, sflags)),
*use(bc ? bc : btn),
- &bgnd(sflags&Style_Enabled
- ? sflags&Style_MouseOver
- ? use[QTC_CR_MO_FILL]
- : cg.base()
- : cg.background());
+ &bgnd(opts.crButton
+ ? getFill(flags, btn, true)
+ : sflags&Style_Enabled && !sunken
+ ? MO_NONE==opts.coloredMouseOver && !opts.crHighlight && sflags&Style_MouseOver
+ ? use[CR_MO_FILL]
+ : cg.base()
+ : cg.background());
+ EWidget wid=opts.crButton ? WIDGET_STD_BUTTON : WIDGET_TROUGH;
+ EAppearance app=opts.crButton ? opts.appearance : APPEARANCE_INVERTED;
+ bool drawSunken=opts.crButton ? sunken : false,
+ lightBorder=DRAW_LIGHT_BORDER(drawSunken, wid, app),
+ draw3dFull=!lightBorder && DRAW_3D_FULL_BORDER(drawSunken, app),
+ draw3d=draw3dFull || (!lightBorder && DRAW_3D_BORDER(drawSunken, app)),
+ drawLight=opts.crButton && !drawSunken && (lightBorder || draw3d),
+ drawDark=drawLight && draw3dFull && !lightBorder;
if(IS_FLAT(opts.appearance))
- p->fillRect(QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2), bgnd);
+ p->fillRect(QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), bgnd);
else
- drawBevelGradient(bgnd, false, p, QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2), true,
- getWidgetShade(WIDGET_TROUGH, true, false, APPEARANCE_GRADIENT),
- getWidgetShade(WIDGET_TROUGH, false, false, APPEARANCE_GRADIENT),
- false, APPEARANCE_GRADIENT, WIDGET_TROUGH);
+ drawBevelGradient(bgnd, p, QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), true,
+ drawSunken, app, wid);
- p->setPen(midColor(sflags&Style_Enabled ? cg.base() : cg.background(), use[3]));
- p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2);
- p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1);
+ if(MO_NONE!=opts.coloredMouseOver && !glow && sflags&Style_MouseOver && sflags&Style_Enabled)
+ {
+ p->setPen(use[CR_MO_FILL]);
+ p->drawRect(QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2));
+ // p->drawRect(QRect(rect.x()+2, rect.y()+2, rect.width()-4, rect.height()-4));
+ }
+ else if(!opts.crButton || drawLight)
+ {
+ p->setPen(drawLight ? btn[LIGHT_BORDER(app)] : midColor(sflags&Style_Enabled ? cg.base() : cg.background(), use[3]));
+ if(lightBorder)
+ p->drawRect(QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2));
+ else
+ {
+ p->drawLine(rect.x()+1, rect.y()+1, rect.x()+1, rect.y()+rect.height()-2);
+ p->drawLine(rect.x()+1, rect.y()+1, rect.x()+rect.width()-2, rect.y()+1);
+
+ if(drawDark)
+ {
+ p->setPen(btn[2]);
+ p->drawLine(rect.x()+rect.width()-2, rect.y()+1,
+ rect.x()+rect.width()-2, rect.y()+rect.height()-2);
+ p->drawLine(rect.x()+1, rect.y()+rect.height()-2,
+ rect.x()+rect.width()-2, rect.y()+rect.height()-2);
+ }
+ }
+ }
+
+ drawBorder(cg.background(), p, rect, cg, (SFlags)(sflags|Style_Horizontal|CHECK_BUTTON),
+ ROUNDED_ALL, use, WIDGET_OTHER, !(flags&LISTVIEW_ITEM));
- drawBorder(cg.background(), p, r, cg, (SFlags)(sflags|Style_Horizontal|QTC_CHECK_BUTTON),
- ROUNDED_ALL, use, WIDGET_OTHER, !(flags&QTC_LISTVIEW_ITEM));
+ if(doEtch)
+ {
+ QColor topCol(glow
+ ? glowFocus ? itsFocusCols[GLOW_MO] : itsMouseOverCols[GLOW_MO]
+ : shade(cg.background(), ETCHED_DARK)),
+ botCol(glow
+ ? topCol
+ : itsBackgroundCols[1]);
+
+ p->setBrush(Qt::NoBrush);
+ p->setPen(topCol);
+ if(!opts.crButton || EFFECT_SHADOW!=opts.buttonEffect || drawSunken || glow)
+ {
+ p->drawLine(r.x()+1, r.y(), r.x()+r.width()-2, r.y());
+ p->drawLine(r.x(), r.y()+1, r.x(), r.y()+r.height()-2);
+ p->setPen(botCol);
+ }
+ p->drawLine(r.x()+1, r.y()+r.height()-1, r.x()+r.width()-2, r.y()+r.height()-1);
+ p->drawLine(r.x()+r.width()-1, r.y()+1, r.x()+r.width()-1, r.y()+r.height()-2);
+ }
if(on)
- drawPrimitive(PE_CheckMark, p, r, cg, flags);
+ drawPrimitive(PE_CheckMark, p, rect, cg, flags);
break;
}
case PE_CheckListExclusiveIndicator:
@@ -2606,16 +3550,13 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(item)
{
- const QColor *bc(borderColors(flags, NULL)),
+ const QColor *bc(borderColors(flags, 0L)),
*btn(buttonColors(cg)),
*use(bc ? bc : btn),
- &on(flags&Style_Enabled
- ? itsCheckRadioCol
- : cg.mid());
-
+ &on(checkRadioCol(flags, cg));
int x(r.x()), y(r.y()+2);
- p->drawPixmap(x, y, *getPixmap(use[opts.coloredMouseOver && flags&Style_MouseOver ? 4 : QT_BORDER(flags&Style_Enabled)],
+ p->drawPixmap(x, y, *getPixmap(use[opts.coloredMouseOver && flags&Style_MouseOver ? 4 : BORDER_VAL(flags&Style_Enabled)],
PIX_RADIO_BORDER, 0.8));
if(flags&Style_On)
@@ -2625,9 +3566,6 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
case PE_ExclusiveIndicator:
case PE_ExclusiveIndicatorMask:
- {
- int x(r.x()), y(r.y());
-
if(PE_ExclusiveIndicatorMask==pe)
{
p->fillRect(r, color0);
@@ -2637,6 +3575,11 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
else
{
+ bool doEtch(DO_EFFECT && !itsFormMode),
+ sunken(flags&Style_Down);
+ QRect rect(doEtch ? QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) : r);
+ int x(rect.x()), y(rect.y());
+
QPointArray clipRegion;
clipRegion.setPoints(8, x, y+8, x, y+4, x+4, y, x+8, y,
@@ -2644,56 +3587,114 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
SFlags sflags(flags);
- if(!itsFormMode && sflags&Style_MouseOver && HOVER_NONE==itsHover)
- sflags-=Style_MouseOver;
-
- const QColor *bc(borderColors(sflags, NULL)),
- *btn(buttonColors(cg)),
+ if(sunken || (!itsFormMode && HOVER_NONE==itsHover))
+ sflags&=~Style_MouseOver;
+
+ bool glowFocus(USE_GLOW_FOCUS(flags&Style_MouseOver) && sflags&Style_Enabled && sflags&Style_HasFocus),
+ glow(doEtch && sflags&Style_Enabled && ((MO_GLOW==opts.coloredMouseOver && sflags&Style_MouseOver) ||
+ glowFocus)),
+ set(sflags&Style_On),
+ coloredMo(MO_NONE!=opts.coloredMouseOver && !glow &&
+ sflags&Style_MouseOver && sflags&Style_Enabled);
+ const QColor *bc(glowFocus ? itsFocusCols : borderColors(sflags, 0L)),
+ *btn(checkRadioColors(cg, sflags)),
*use(bc ? bc : btn);
- const QColor &on(sflags&Style_Enabled
- ? sflags&Style_Selected && !(flags&QTC_LISTVIEW_ITEM)
- ? cg.highlightedText()
- : itsCheckRadioCol
- : cg.mid()),
- &bgnd(sflags&Style_Enabled
- ? sflags&Style_MouseOver
- ? use[QTC_CR_MO_FILL]
- : cg.base()
- : cg.background());
- bool set(sflags&Style_On);
+ const QColor &on(checkRadioCol(flags, cg)),
+ &bgnd(opts.crButton
+ ? getFill(flags, btn, true)
+ : sflags&Style_Enabled && !sunken
+ ? MO_NONE==opts.coloredMouseOver && !opts.crHighlight && sflags&Style_MouseOver
+ ? use[CR_MO_FILL]
+ : cg.base()
+ : cg.background());
+ EWidget wid=opts.crButton ? WIDGET_STD_BUTTON : WIDGET_TROUGH;
+ EAppearance app=opts.crButton ? opts.appearance : APPEARANCE_INVERTED;
+ bool drawSunken=opts.crButton ? sunken : EFFECT_NONE!=opts.buttonEffect,
+ lightBorder=DRAW_LIGHT_BORDER(drawSunken, wid, app),
+ draw3d=!lightBorder &&
+ (DRAW_3D_BORDER(drawSunken, app) || DRAW_3D_FULL_BORDER(drawSunken, app)),
+ drawLight=opts.crButton && !drawSunken && (lightBorder || draw3d),
+ doneShadow=false;
p->save();
- p->fillRect(r, cg.background());
+
+ if(opts.crHighlight && sflags&Style_MouseOver)
+ drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, r, true,
+ false, opts.selectionAppearance, WIDGET_SELECTION);
+ else
+ p->fillRect(r, cg.background());
+
+ if(doEtch && !glow && opts.crButton && !drawSunken && EFFECT_SHADOW==opts.buttonEffect)
+ {
+ p->setBrush(Qt::NoBrush);
+ p->setPen(shade(cg.background(), ETCHED_DARK));
+ p->drawArc(QRect(r.x(), r.y(), opts.crSize, opts.crSize), 225*16, 180*16);
+ doneShadow=true;
+ }
p->setClipRegion(QRegion(clipRegion));
if(IS_FLAT(opts.appearance))
- p->fillRect(QRect(x+1, y+1, r.width()-2, r.height()-2), bgnd);
+ p->fillRect(QRect(x+1, y+1, rect.width()-2, rect.height()-2), bgnd);
else
- drawBevelGradient(bgnd, false, p, QRect(x+1, y+1, r.width()-2, r.height()-2), true,
- getWidgetShade(WIDGET_TROUGH, true, false, APPEARANCE_GRADIENT),
- getWidgetShade(WIDGET_TROUGH, false, false, APPEARANCE_GRADIENT),
- false, APPEARANCE_GRADIENT, WIDGET_TROUGH);
+ drawBevelGradient(bgnd, p, QRect(x+1, y+1, rect.width()-2, rect.height()-2), true,
+ drawSunken, app, wid);
+
+ if(coloredMo)
+ {
+ p->setPen(use[CR_MO_FILL]);
+ p->drawArc(QRect(x+1, y+1, opts.crSize-2, opts.crSize-2), 0, 360*16);
+// p->drawArc(QRect(x+2, y+2, opts.crSize-4, opts.crSize-4), 0, 360*16);
+// p->drawArc(QRect(x+3, y+3, opts.crSize-6, opts.crSize-6), 0, 360*16);
+ p->drawPoint(x+2, y+4);
+ p->drawPoint(x+4, y+2);
+ p->drawPoint(x+8, y+2);
+ p->drawPoint(x+10, y+4);
+ p->drawPoint(x+2, y+8);
+ p->drawPoint(x+4, y+10);
+ p->drawPoint(x+8, y+10);
+ p->drawPoint(x+10, y+8);
+ }
p->setClipping(false);
- p->drawPixmap(r.x(), r.y(),
- *getPixmap(use[opts.coloredMouseOver && sflags&Style_MouseOver ? 4 : QT_BORDER(flags&Style_Enabled)],
- PIX_RADIO_BORDER, 0.8));
+ if(doEtch && !doneShadow)
+ {
+ QColor topCol(glow
+ ? glowFocus ? itsFocusCols[GLOW_MO] : itsMouseOverCols[GLOW_MO]
+ : shade(cg.background(), ETCHED_DARK)),
+ botCol(glow
+ ? topCol
+ : itsBackgroundCols[1]);
+
+ p->setBrush(Qt::NoBrush);
+ p->setPen(topCol);
+ if(drawSunken || glow)
+ {
+ p->drawArc(QRect(r.x(), r.y(), opts.crSize, opts.crSize), 45*16, 180*16);
+ p->setPen(botCol);
+ }
+ p->drawArc(QRect(r.x(), r.y(), opts.crSize, opts.crSize), 225*16, 180*16);
+ }
+
+ p->drawPixmap(rect.x(), rect.y(),
+ *getPixmap(use[BORDER_VAL(flags&Style_Enabled)], PIX_RADIO_BORDER, 0.8));
if(QApplication::NormalColor!=QApplication::colorSpec() || itsFormMode)
{
- p->setPen(QPen(use[opts.coloredMouseOver && sflags&Style_MouseOver ? 4 : QT_BORDER(flags&Style_Enabled)], 1));
- p->drawArc(r, 0, 5760);
+ p->setPen(QPen(use[opts.coloredMouseOver && sflags&Style_MouseOver ? 4 : BORDER_VAL(flags&Style_Enabled)], 1));
+ p->drawArc(rect, 0, 5760);
}
if(set)
- p->drawPixmap(r.x(), r.y(), *getPixmap(on, PIX_RADIO_ON, 1.0));
- if(QApplication::NormalColor==QApplication::colorSpec() || itsFormMode)
- p->drawPixmap(r.x(), r.y(), *getPixmap(btn[sflags&Style_MouseOver ? 3 : 4], PIX_RADIO_LIGHT));
+ p->drawPixmap(rect.x(), rect.y(), *getPixmap(on, PIX_RADIO_ON, 1.0));
+ if(!coloredMo && (!opts.crButton || drawLight) && (QApplication::NormalColor==QApplication::colorSpec() || itsFormMode))
+ p->drawPixmap(rect.x(), rect.y(),
+ *getPixmap(btn[drawLight ? LIGHT_BORDER(app)
+ : (sflags&Style_MouseOver ? 3 : 4)],
+ lightBorder ? PIX_RADIO_INNER : PIX_RADIO_LIGHT));
p->restore();
}
break;
- }
case PE_DockWindowSeparator:
{
QRect r2(r);
@@ -2732,12 +3733,21 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
}
break;
+ case LINE_1DOT:
+ drawDot(p, r, itsBackgroundCols);
+ break;
default:
case LINE_DOTS:
drawDots(p, r, !(flags & Style_Horizontal), 1, 5, itsBackgroundCols, 0, 5);
}
break;
}
+ case PE_DockWindowResizeHandle:
+ if(flags&Style_Horizontal)
+ flags-=Style_Horizontal;
+ else
+ flags+=Style_Horizontal;
+ // Fall through intentional
case PE_Splitter:
{
if(itsHoverWidget && itsHoverWidget == p->device())
@@ -2746,66 +3756,110 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
const QColor *use(buttonColors(cg));
const QColor *border(borderColors(flags, use));
- p->fillRect(r, QColor(flags&Style_MouseOver
- ? shade(cg.background(), opts.highlightFactor)
- : cg.background()));
+ QColor color(cg.background());
+
+ if(0!=opts.tabBgnd && p->device() && inStackWidget(dynamic_cast<const QWidget *>(p->device())))
+ color=shade(color, TO_FACTOR(opts.tabBgnd));
+
+ if(flags&Style_MouseOver && opts.splitterHighlight)
+ drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.splitterHighlight)), p, r, !(flags&Style_Horizontal),
+ false, opts.selectionAppearance, WIDGET_SELECTION);
+ else
+ p->fillRect(r, color);
+
switch(opts.splitters)
{
+ case LINE_NONE:
+ break;
default:
+ case LINE_1DOT:
+ drawDot(p, r, border);
+ break;
case LINE_DOTS:
drawDots(p, r, flags&Style_Horizontal, NUM_SPLITTER_DASHES, 1, border, 0, 5);
break;
- case LINE_SUNKEN:
- drawLines(p, r, flags&Style_Horizontal, NUM_SPLITTER_DASHES, 1, border, 0, 3);
- break;
case LINE_FLAT:
- drawLines(p, r, flags&Style_Horizontal, NUM_SPLITTER_DASHES, 3, border, 0, 3, 0, false);
- break;
+ case LINE_SUNKEN:
case LINE_DASHES:
- drawLines(p, r, flags&Style_Horizontal, NUM_SPLITTER_DASHES, 1, border, 0, 3, 0);
+ drawLines(p, r, flags&Style_Horizontal, NUM_SPLITTER_DASHES, 3, border, 0, 3, opts.splitters);
}
break;
}
- case PE_DockWindowResizeHandle:
- {
- const QColor *use(backgroundColors(cg));
-
- drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal),
- ROUNDED_ALL, use, WIDGET_OTHER, true, BORDER_RAISED, false);
- break;
- }
case PE_GroupBoxFrame:
case PE_PanelGroupBox:
- if (!opts.framelessGroupBoxes)
+ if(FRAME_LINE==opts.groupBox)
+ {
+ QRect r2(r);
+ if(p && p->device() && dynamic_cast<QGroupBox *>(p->device()) &&
+ (!((QGroupBox *)(p->device()))->title().isEmpty() || ((QGroupBox *)(p->device()))->isCheckable()))
+ r2.addCoords(8, 0, -8, 0);
+ p->setPen(backgroundColors(cg)[STD_BORDER]);
+ p->drawLine(r2.x(), r2.y(), r2.x()+r2.width()-1, r2.y());
+ }
+ else if (FRAME_NONE!=opts.groupBox)
if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault())
{
const QColor *use(backgroundColors(cg));
drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal),
- ROUNDED_ALL, use, WIDGET_OTHER, true, BORDER_FLAT);
+ opts.square&SQUARE_FRAME ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true, BORDER_FLAT);
}
else
QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
- case PE_Panel:
case PE_WindowFrame:
+ if(data.lineWidth()>0 || data.isDefault())
+ drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal),
+ ROUNDED_NONE, backgroundColors(cg), WIDGET_MDI_WINDOW, true, BORDER_RAISED, false);
+ break;
+ case PE_Panel:
+ if((APP_KICKER==itsThemedApp && data.isDefault()) ||
+ dynamic_cast<QDockWindow *>(p->device()))
+ break;
+
if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault())
{
- const QColor *use(
-#ifdef QTC_HIGHLIGHT_SCROLVIEWS
- flags&Style_HasFocus ? itsMenuitemCols :
-#endif
+ const QWidget *widget=p && p->device() ? dynamic_cast<const QWidget *>(p->device()) : 0L;
+ bool sv(widget && ::qt_cast<const QScrollView *>(widget)),
+ square((opts.square&SQUARE_SCROLLVIEW) &&
+ (sv ||
+ (widget && widget->parentWidget() && ::qt_cast<const QFrame *>(widget) &&
+ widget->parentWidget()->inherits("KateView"))));
+ const QColor *use(opts.highlightScrollViews && /*!square &&*/ flags&Style_HasFocus ? itsHighlightCols :
backgroundColors(cg));
- itsFormMode=itsIsTransKicker;
- drawBorder(cg.background(), p, r, cg,
- (SFlags)(flags|Style_Horizontal|Style_Enabled),
- ROUNDED_ALL, use, WIDGET_OTHER, APP_KICKER!=itsThemedApp, itsIsTransKicker
- ? BORDER_FLAT
- : flags&Style_Sunken
- ? BORDER_SUNKEN
- : BORDER_RAISED);
- itsFormMode=false;
+// if(square)
+// {
+// p->setPen(use[STD_BORDER]);
+// p->drawLine(r.bottomLeft(), r.topLeft());
+// p->drawLine(r.topLeft(), r.topRight());
+// if(!opts.gtkScrollViews)
+// p->setPen(use[STD_BORDER_BR]);
+// p->drawLine(r.topRight(), r.bottomRight());
+// p->drawLine(r.bottomRight(), r.bottomLeft());
+// }
+// else
+ {
+ itsFormMode=itsIsTransKicker;
+ if(sv && !opts.highlightScrollViews)
+ flags&=~Style_HasFocus;
+ if(sv && opts.etchEntry && ((QFrame *)widget)->lineWidth()>2)
+ {
+ drawEntryField(p, r, cg, flags, flags&Style_Enabled
+ ? /*flags&Style_MouseOver
+ ? ENTRY_MOUSE_OVER
+ :*/ flags&Style_HasFocus
+ ? ENTRY_FOCUS
+ : ENTRY_NONE
+ : ENTRY_NONE, square ? ROUNDED_NONE : ROUNDED_ALL, WIDGET_SCROLLVIEW);
+ }
+ else
+ drawBorder(cg.background(), p, r, cg,
+ (SFlags)(flags|Style_Horizontal|Style_Enabled),
+ square ? ROUNDED_NONE : ROUNDED_ALL, use, sv ? WIDGET_SCROLLVIEW : WIDGET_OTHER, APP_KICKER!=itsThemedApp,
+ itsIsTransKicker ? BORDER_FLAT : (flags&Style_Sunken ? BORDER_SUNKEN : BORDER_RAISED) );
+ itsFormMode=false;
+ }
}
else
QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
@@ -2815,20 +3869,23 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
const QColor *use(backgroundColors(cg));
drawBorder(cg.background(), p, r, cg,
- (SFlags)(flags|Style_Horizontal|Style_Enabled),
- ROUNDED_ALL, use, WIDGET_OTHER, true, BORDER_RAISED, false);
+ (SFlags)(flags|Style_Horizontal|Style_Enabled),
+ opts.square&SQUARE_TAB_FRAME ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true,
+ opts.borderTab ? BORDER_LIGHT : BORDER_RAISED, false);
break;
}
case PE_PanelPopup:
{
const QColor *use(backgroundColors(cg));
- p->setPen(use[QT_STD_BORDER]);
+ p->setPen(use[STD_BORDER]);
p->setBrush(NoBrush);
p->drawRect(r);
- if(opts.lighterPopupMenuBgnd)
+ if(!IS_FLAT_BGND(opts.menuBgndAppearance))
+ ;
+ else if(USE_LIGHTER_POPUP_MENU)
{
- p->setPen(/*opts.lighterPopupMenuBgnd ? */itsLighterPopupMenuBgndCol/* : cg.background()*/);
+ p->setPen(/*USE_LIGHTER_POPUP_MENU ? */itsLighterPopupMenuBgndCol/* : cg.background()*/);
p->drawRect(QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2));
}
else
@@ -2836,7 +3893,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
p->setPen(use[0]);
p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1);
p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2);
- p->setPen(use[QT_FRAME_DARK_SHADOW]);
+ p->setPen(use[FRAME_DARK_SHADOW]);
p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+r.width()-2, r.y()+r.height()-2);
p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()+r.height()-2);
}
@@ -2849,7 +3906,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(data.isDefault() || data.lineWidth()>1)
{
- p->setPen(use[QT_STD_BORDER]);
+ p->setPen(use[STD_BORDER]);
p->setBrush(NoBrush);
p->drawRect(r);
qDrawShadePanel(p, r.x()+1, r.y()+1, r.width()-2, r.height()-2,
@@ -2890,8 +3947,8 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(TB_NONE!=opts.toolbarBorders)
{
- const QColor *use=PE_PanelMenuBar==pe && itsActive
- ? itsMenubarCols
+ const QColor *use=PE_PanelMenuBar==pe
+ ? menuColors(cg, itsActive)
: backgroundColors(cg.background());
bool dark(TB_DARK==opts.toolbarBorders || TB_DARK_ALL==opts.toolbarBorders);
@@ -2929,7 +3986,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
QRect br(r),
ar(r);
- const QColor *use(itsButtonCols); // buttonColors(cg));
+ const QColor *use(flags&Style_Enabled ? itsButtonCols : itsBackgroundCols); // buttonColors(cg));
pe=flags&Style_Horizontal
? PE_ScrollBarAddLine==pe ? PE_ArrowRight : PE_ArrowLeft
@@ -2940,7 +3997,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
PE_ArrowDown==pe ? ROUNDED_BOTTOM :
PE_ArrowUp==pe ? ROUNDED_TOP : ROUNDED_NONE;
- if(flags&Style_Down)
+ if(flags&Style_Down && !opts.flatSbarButtons)
ar.addCoords(1, 1, 1, 1);
switch(opts.scrollbarType)
@@ -2954,13 +4011,15 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
round=ROUNDED_NONE;
br.addCoords(0, 0, 1, 0);
- ar.addCoords(1, 0, 1, 0);
+ if(opts.flatSbarButtons || !opts.vArrows)
+ ar.addCoords(1, 0, 1, 0);
}
else if(PE_ArrowUp==pe && r.y()>3)
{
round=ROUNDED_NONE;
br.addCoords(0, 0, 0, 1);
- ar.addCoords(0, 1, 0, 1);
+ if(opts.flatSbarButtons || !opts.vArrows)
+ ar.addCoords(0, 1, 0, 1);
}
break;
case SCROLLBAR_NEXT:
@@ -2968,20 +4027,32 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
round=ROUNDED_NONE;
br.addCoords(-1, 0, 0, 0);
- ar.addCoords(-1, 0, 0, -1);
+ if(opts.flatSbarButtons || !opts.vArrows)
+ ar.addCoords(-1, 0, 0, -1);
}
else if(PE_ArrowDown==pe)
{
round=ROUNDED_NONE;
br.addCoords(0, -1, 0, 0);
- ar.addCoords(0, -1, 0, -1);
+ if(opts.flatSbarButtons || !opts.vArrows)
+ ar.addCoords(0, -1, 0, -1);
}
break;
}
- drawLightBevel(p, br, cg, flags|Style_Raised,
- round, getFill(flags, use), use, true, true, WIDGET_SB_BUTTON);
+ if(!opts.flatSbarButtons)
+// No need to draw background here - drawn in CC_ScrollBar
+// {
+// if(!IS_FLAT(opts.sbarBgndAppearance) && SCROLLBAR_NONE!=opts.scrollbarType)
+// drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], p, r, flags&Style_Horizontal, false,
+// opts.sbarBgndAppearance, WIDGET_SB_BGND);
+// else
+// p->fillRect(br, itsBackgroundCols[ORIGINAL_SHADE]);
+// }
+// else
+ drawLightBevel(p, br, cg, flags|Style_Raised,
+ round, getFill(flags, use), use, true, true, WIDGET_SB_BUTTON);
- drawPrimitive(pe, p, ar, cg, flags);
+ ::drawArrow(p, ar, MO_ARROW(cg.buttonText()), pe, opts, false);
break;
}
case PE_ScrollBarSlider:
@@ -3013,40 +4084,51 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
//p->fillRect(r, Qt::black);
drawMenuItem(p, r, cg, false, ROUNDED_ALL,
- opts.lighterPopupMenuBgnd ? itsLighterPopupMenuBgndCol
- : itsBackgroundCols[ORIGINAL_SHADE], itsMenuitemCols);
+ USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol
+ : itsBackgroundCols[ORIGINAL_SHADE], itsHighlightCols);
item->paintContents(p);
break;
}
}
}
#endif
-#ifndef QTC_PLAIN_FOCUS_ONLY
- if(opts.stdFocus)
+ if(FOCUS_STANDARD==opts.focus)
{
-#endif
p->setPen(Qt::black);
p->drawWinFocusRect(r);
-#ifndef QTC_PLAIN_FOCUS_ONLY
}
else
{
//Figuring out in what beast we are painting...
- const QColor *use(backgroundColors(cg));
- QWidget *widget(dynamic_cast<QWidget*>(p->device()));
+ QWidget *widget(dynamic_cast<QWidget*>(p->device()));
+ bool view(widget && (dynamic_cast<QScrollView*>(widget->parent()) ||
+ dynamic_cast<QListBox*>(widget->parent())));
- if(r.width()<4 || r.height()<4 ||
- (widget && (dynamic_cast<QScrollView*>(widget->parent()) ||
- dynamic_cast<QListBox*>(widget->parent()))))
+ if(widget && FOCUS_GLOW==opts.focus &&
+ (dynamic_cast<const QButton *>(widget) || dynamic_cast<const QComboBox *>(widget)))
+ return;
+
+ if(FOCUS_LINE==opts.focus)
+ {
+ p->setPen(view && flags&Style_Selected
+ ? cg.highlightedText()
+ : itsFocusCols[FOCUS_SHADE(flags&Style_Selected)]);
+ p->drawLine(r.x(), r.y()+r.height()-1, r.x()+r.width()-1, r.y()+r.height()-1);
+ }
+ else if(r.width()<4 || r.height()<4 || view)
{
- p->setPen(use[QT_FOCUS]);
- p->drawRect(r);
+// QRect r2(r);
+ p->setPen(view ? (flags&Style_Selected ? cg.highlightedText() : cg.text())
+ : itsFocusCols[FOCUS_SHADE(flags&Style_Selected)]);
+// if(view)
+// r2.addCoords(0, 0, 0, -2);
+ p->drawRect(r); // r2);
}
else
drawBorder(cg.background(), p, r, cg, Style_Horizontal,
- ROUNDED_ALL, use, WIDGET_OTHER, false, BORDER_FLAT, true, QT_FOCUS);
+ ROUNDED_ALL, itsFocusCols, WIDGET_FOCUS, false, BORDER_FLAT, true,
+ FOCUS_SHADE(flags&Style_Selected));
}
-#endif
break;
case PE_ArrowUp:
case PE_ArrowDown:
@@ -3061,45 +4143,32 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
QRect sr(r);
const QColor *use(buttonColors(cg));
- bool reverse(QApplication::reverseLayout()),
- doEtch(!itsFormMode && QTC_DO_EFFECT);
-
- if(doEtch)
- if(PE_SpinWidgetDown==pe || PE_SpinWidgetMinus==pe)
- sr.addCoords(0, 0, 0, -1);
- else
- sr.addCoords(0, 1, 0, 0);
-
- drawLightBevel(p, sr, cg, flags|Style_Horizontal, PE_SpinWidgetDown==pe || PE_SpinWidgetMinus==pe
- ? reverse
- ? ROUNDED_BOTTOMLEFT
- : ROUNDED_BOTTOMRIGHT
- : reverse
- ? ROUNDED_TOPLEFT
- : ROUNDED_TOPRIGHT,
- getFill(flags, use), use, true, true, WIDGET_SPIN);
-
- if(doEtch)
- {
- QRect er(r);
- p->setClipRegion(er);
- if(reverse)
- er.addCoords(0, 0, 2, 0);
- else
- er.addCoords(-2, 0, 0, 0);
- drawEtch(p, er, cg, PE_SpinWidgetUp==pe || PE_SpinWidgetPlus==pe,
- PE_SpinWidgetDown==pe || PE_SpinWidgetMinus==pe);
- p->setClipping(false);
- }
+ bool reverse(QApplication::reverseLayout());
+
+ if((!opts.unifySpinBtns || flags&Style_Sunken) && !opts.unifySpin)
+ drawLightBevel(p, sr, cg, flags|Style_Horizontal, PE_SpinWidgetDown==pe || PE_SpinWidgetMinus==pe
+ ? reverse
+ ? ROUNDED_BOTTOMLEFT
+ : ROUNDED_BOTTOMRIGHT
+ : reverse
+ ? ROUNDED_TOPLEFT
+ : ROUNDED_TOPRIGHT,
+ getFill(flags, use), use, true, true, WIDGET_SPIN);
if(PE_SpinWidgetUp==pe || PE_SpinWidgetDown==pe)
{
sr.setY(sr.y()+(PE_SpinWidgetDown==pe ? -2 : 1));
- if(flags&Style_Sunken)
+ if(opts.unifySpin)
+ {
+ sr.addCoords(reverse ? 1 : -1, 0, reverse ? 1 : -1, 0);
+ if(!opts.vArrows)
+ sr.setY(sr.y()+(PE_SpinWidgetDown==pe ? -2 : 2));
+ }
+ else if(flags&Style_Sunken)
sr.addCoords(1, 1, 1, 1);
- drawArrow(p, sr, cg, flags, PE_SpinWidgetUp==pe ? PE_ArrowUp : PE_ArrowDown, true);
+ ::drawArrow(p, sr, MO_ARROW(cg.buttonText()), PE_SpinWidgetUp==pe ? PE_ArrowUp : PE_ArrowDown, opts, !opts.unifySpin);
}
else
{
@@ -3110,10 +4179,10 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(l%2 != 0)
--l;
- if(flags&Style_Sunken)
+ if(flags&Style_Sunken && !opts.unifySpin)
c+=QPoint(1, 1);
- p->setPen(cg.buttonText());
+ p->setPen(MO_ARROW(cg.buttonText()));
p->drawLine(c.x()-l, c.y(), c.x()+l, c.y());
if(PE_SpinWidgetPlus==pe)
p->drawLine(c.x(), c.y()-l, c.x(), c.y()+l);
@@ -3122,20 +4191,37 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
case PE_PanelLineEdit:
{
+ const QWidget *widget=p && p->device() ? dynamic_cast<const QWidget *>(p->device()) : 0L;
+ bool scrollView=widget && ::qt_cast<const QScrollView *>(widget);
+
+// if((opts.square&SQUARE_SCROLLVIEW) && scrollView)
+// {
+// const QColor *use(backgroundColors(cg));
+//
+// p->setPen(use[STD_BORDER]);
+// p->drawLine(r.bottomLeft(), r.topLeft());
+// p->drawLine(r.topLeft(), r.topRight());
+// if(!opts.gtkScrollViews)
+// p->setPen(use[STD_BORDER_BR]);
+// p->drawLine(r.topRight(), r.bottomRight());
+// p->drawLine(r.bottomRight(), r.bottomLeft());
+// break;
+// }
+
bool isReadOnly(false),
isEnabled(true);
// panel is highlighted by default if it has focus, but if we have access to the
// widget itself we can try to avoid highlighting in case it's readOnly or disabled.
- if (p->device() && dynamic_cast<QLineEdit*>(p->device()))
+ if (!scrollView && widget && dynamic_cast<const QLineEdit*>(widget))
{
- QLineEdit *lineEdit(dynamic_cast<QLineEdit*>(p->device()));
+ const QLineEdit *lineEdit(dynamic_cast<const QLineEdit*>(widget));
isReadOnly = lineEdit->isReadOnly();
isEnabled = lineEdit->isEnabled();
if(flags&Style_Enabled && isReadOnly)
flags-=Style_Enabled;
}
-
+
// HACK!! (From Plastik)
//
// In this place there is no reliable way to detect if we are in khtml; the
@@ -3145,17 +4231,52 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if (p->device() && dynamic_cast<QPixmap*>(p->device()))
itsFormMode=true;
- drawEntryField(p, r, cg, flags, !isReadOnly && isEnabled && (flags&Style_HasFocus),
- ROUNDED_ALL);
+ if(scrollView && !opts.highlightScrollViews)
+ flags&=~Style_HasFocus;
+
+ QRect r2(r);
+ r2.addCoords(1, 1, -1, -1);
+// p->fillRect(r2, flags&Style_Enabled ? cg.base() : cg.background());
+ drawEntryField(p, r, cg, flags, !isReadOnly && isEnabled
+ ? flags&Style_MouseOver && !scrollView
+ ? ENTRY_MOUSE_OVER
+ : flags&Style_HasFocus
+ ? ENTRY_FOCUS
+ : ENTRY_NONE
+ : ENTRY_NONE,
+ (opts.square&SQUARE_SCROLLVIEW) && scrollView ? ROUNDED_NONE : ROUNDED_ALL,
+ scrollView ? WIDGET_SCROLLVIEW : WIDGET_ENTRY);
itsFormMode=false;
break;
}
case PE_StatusBarSection:
if(opts.drawStatusBarFrames)
- KStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ BASE_STYLE::drawPrimitive(pe, p, r, cg, flags, data);
+ break;
+ case PE_SizeGrip:
+ {
+ QPointArray a;
+
+ if (QApplication::reverseLayout())
+ {
+ a.setPoints(3, 0,0, SIZE_GRIP_SIZE,SIZE_GRIP_SIZE, 0,SIZE_GRIP_SIZE);
+ a.translate(r.x(), r.y()+(r.height()-SIZE_GRIP_SIZE));
+ }
+ else
+ {
+ a.setPoints(3, SIZE_GRIP_SIZE,0, SIZE_GRIP_SIZE,SIZE_GRIP_SIZE, 0,SIZE_GRIP_SIZE);
+ a.translate(r.x()+(r.width()-SIZE_GRIP_SIZE), r.y()+(r.height()-SIZE_GRIP_SIZE));
+ }
+
+ p->save();
+ p->setBrush(itsBackgroundCols[2]);
+ p->setPen(itsBackgroundCols[2]);
+ p->drawPolygon(a);
+ p->restore();
break;
+ }
default:
- KStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ BASE_STYLE::drawPrimitive(pe, p, r, cg, flags, data);
}
}
@@ -3187,42 +4308,66 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
{
case KPE_ToolBarHandle:
{
- QRect r2(r);
- r2.addCoords(-1, -1, 2, 2);
- drawMenuOrToolBarBackground(p, r2, cg, false, flags&Style_Horizontal);
+ if(APPEARANCE_STRIPED!=opts.bgndAppearance)
+ {
+ QRect r2(r);
+ r2.addCoords(-1, -1, 2, 2);
+ drawMenuOrToolBarBackground(p, r2, cg, false, flags&Style_Horizontal);
+ }
drawHandleMarkers(p, r, flags, true, handles);
break;
}
case KPE_DockWindowHandle:
{
int x, y, w, h;
+ bool horizontal(flags & Style_Horizontal);
r.rect(&x, &y, &w, &h);
- if ((w <= 2) || (h <= 2))
- p->fillRect(r, cg.background().dark(105));
+
+ if(!IS_FLAT(opts.dwtAppearance))
+ drawBevelGradient(cg.background(), p, r, horizontal, false, opts.dwtAppearance, WIDGET_DOCK_WIDGET_TITLE);
else
+ p->fillRect(r, cg.background()); // .dark(DW_BGND));
+// p->setPen(itsBackgroundCols[STD_BORDER]);
+// if(horizontal)
+// p->drawLine(r.right(), r.top()-1, r.right(), r.bottom());
+// else
+// p->drawLine(r.left(), r.bottom(), r.right(), r.bottom());
+
+ if (w > 2 && h > 2)
{
QWidget *wid(const_cast<QWidget*>(widget));
- bool horizontal(flags & Style_Horizontal);
+ bool hasClose(dynamic_cast<const QDockWindow *>(wid->parentWidget()) &&
+ ((QDockWindow *)(wid->parentWidget()))->area() &&
+ ((QDockWindow *)(wid->parentWidget()))->isCloseEnabled());
QFont fnt(QApplication::font(wid));
QPixmap pix;
QString title(wid->parentWidget()->caption());
QPainter p2;
fnt.setPointSize(fnt.pointSize()-2);
+ if(hasClose)
+ if (horizontal)
+ h-=15;
+ else
+ w-=15;
// Draw the item on an off-screen pixmap to preserve Xft antialiasing for
// vertically oriented handles.
if (horizontal)
- pix.resize(h-2, w-2);
+ pix.resize(h, w);
else
- pix.resize(w-2, h-2);
+ pix.resize(w, h);
p2.begin(&pix);
- p2.fillRect(pix.rect(), cg.background().dark(105));
+ p2.fillRect(pix.rect(), cg.background()); // .dark(DW_BGND));
+ p2.setPen(itsBackgroundCols[STD_BORDER]);
+ p2.drawLine(pix.rect().left(), pix.rect().bottom(), pix.rect().right(), pix.rect().bottom());
p2.setPen(cg.text());
p2.setFont(fnt);
- p2.drawText(pix.rect(), AlignCenter,
+ QRect textRect(pix.rect());
+ textRect.addCoords(2, -3, -2, 0);
+ p2.drawText(textRect, AlignVCenter|(QApplication::reverseLayout() ? AlignRight : AlignLeft),
elliditide(title, QFontMetrics(fnt), pix.width()));
p2.end();
@@ -3232,10 +4377,10 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
m.rotate(-90.0);
QPixmap vpix(pix.xForm(m));
- bitBlt(wid, r.x()+1, r.y()+1, &vpix);
+ bitBlt(wid, r.x(), r.y()+(hasClose ? 15 : 0), &vpix);
}
else
- bitBlt(wid, r.x()+1, r.y()+1, &pix);
+ bitBlt(wid, r.x(), r.y(), &pix);
}
break;
}
@@ -3246,16 +4391,16 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
drawSliderGroove(p, r, cg, flags, widget);
break;
case KPE_SliderHandle:
- drawSliderHandle(p, r, cg, flags, widget ? ::qt_cast<QSlider *>(widget) : NULL);
+ drawSliderHandle(p, r, cg, flags, widget ? ::qt_cast<QSlider *>(widget) : 0L);
break;
case KPE_ListViewExpander:
{
- QRect ar(r.x()+((r.width()-(QTC_LV_SIZE+4))>>1), r.y()+((r.height()-(QTC_LV_SIZE+4))>>1), QTC_LV_SIZE+4,
- QTC_LV_SIZE+4);
+ QRect ar(r.x()+((r.width()-(LV_SIZE+4))>>1), r.y()+((r.height()-(LV_SIZE+4))>>1), LV_SIZE+4,
+ LV_SIZE+4);
- if(opts.lvLines)
+ if(LV_OLD==opts.lvLines)
{
- int lo(QTC_ROUNDED ? 2 : 0);
+ int lo(ROUNDED ? 2 : 0);
p->setPen(cg.mid());
p->drawLine(ar.x()+lo, ar.y(), (ar.x()+ar.width()-1)-lo, ar.y());
@@ -3265,7 +4410,7 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
p->drawLine(ar.x()+ar.width()-1, ar.y()+lo, ar.x()+ar.width()-1,
(ar.y()+ar.height()-1)-lo);
- if(QTC_ROUNDED)
+ if(ROUNDED)
{
p->drawPoint(ar.x()+1, ar.y()+1);
p->drawPoint(ar.x()+1, ar.y()+ar.height()-2);
@@ -3280,11 +4425,11 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
}
}
- drawArrow(p, ar, cg, flags|Style_Enabled, flags&Style_On // Collapsed = On
+ ::drawArrow(p, ar, flags&Style_Enabled ? cg.mid() : cg.text(), flags&Style_On // Collapsed = On
? QApplication::reverseLayout()
? PE_ArrowLeft
: PE_ArrowRight
- : PE_ArrowDown);
+ : PE_ArrowDown, opts);
break;
}
case KPE_ListViewBranch:
@@ -3302,7 +4447,7 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
}
break;
default:
- KStyle::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt);
+ BASE_STYLE::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt);
}
}
@@ -3319,7 +4464,8 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
{
const QTabBar *tb((const QTabBar *)widget);
int tabIndex(tb->indexOf(data.tab()->identifier())),
- dark(APPEARANCE_FLAT==opts.appearance ? ORIGINAL_SHADE : QT_FRAME_DARK_SHADOW);
+ dark(APPEARANCE_FLAT==opts.appearance ? ORIGINAL_SHADE : FRAME_DARK_SHADOW),
+ moOffset(ROUNDED_NONE==opts.round || TAB_MO_TOP!=opts.tabMouseOver ? 1 : opts.round);
bool cornerWidget(false),
bottomCornerWidget(false),
reverse(QApplication::reverseLayout()),
@@ -3331,8 +4477,17 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
active(flags & Style_Selected),
itsHover(itsHoverTab && itsHoverTab->isEnabled() && data.tab()==itsHoverTab &&
!(flags&Style_Selected) &&
- tb->currentTab()!=tabIndex);
+ tb->currentTab()!=tabIndex),
+ glowMo(!active && itsHover && opts.coloredMouseOver && TAB_MO_GLOW==opts.tabMouseOver);
+ int sizeAdjust(!active && TAB_MO_GLOW==opts.tabMouseOver ? 1 : 0);
const QColor &fill(getTabFill(flags&Style_Selected, itsHover, itsBackgroundCols));
+ EBorder borderProfile(active || opts.borderInactiveTab
+ ? opts.borderTab
+ ? BORDER_LIGHT
+ : opts.colorSelTab && active
+ ? BORDER_FLAT
+ : BORDER_RAISED
+ : BORDER_FLAT);
if(reverse)
{
@@ -3356,6 +4511,17 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
QRect tr(r);
bool top(QTabBar::TriangularAbove==tb->shape() || QTabBar::RoundedAbove==tb->shape());
+ if(active && opts.tabBgnd)
+ {
+ QRect rx(tr);
+
+ if(top)
+ rx.addCoords(1, 6, -1, 0);
+ else
+ rx.addCoords(1, 0, -1, -6);
+ p->fillRect(rx, shade(cg.background(), TO_FACTOR(opts.tabBgnd)));
+ }
+
if(!active)
if(top)
tr.addCoords(0, 2, 0, 0);
@@ -3365,60 +4531,68 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(!firstTab && top && (APP_TORA==itsThemedApp || (APP_OPENOFFICE==itsThemedApp && !active)))
tr.addCoords(-1, 0, 0, 0);
- p->setClipRect(QRect(tr.x(), top ? tr.y() : tr.y()+2, tr.width(), top ? tr.height()-2 : tr.height()),
+ QRect glowTr(tr);
+
+ if(!active && TAB_MO_GLOW==opts.tabMouseOver)
+ glowTr.addCoords(sizeAdjust, 0, -sizeAdjust, 0);
+
+ p->setClipRect(QRect(tr.x(), top ? tr.y()-sizeAdjust : tr.y()+2, tr.width(), top ? tr.height()-2+(2*sizeAdjust) : tr.height()),
QPainter::CoordPainter);
- if(APPEARANCE_INVERTED==opts.appearance && active)
- p->fillRect(tr, cg.background());
+
+ bool invertedSel=APPEARANCE_INVERTED==opts.appearance && active;
+ QColor col(invertedSel ? cg.background() : fill);
+
+ if(opts.tabBgnd)
+ col=shade(col, TO_FACTOR(opts.tabBgnd));
+
+ if(invertedSel)
+ p->fillRect(glowTr, col);
else
- drawBevelGradient(fill, top, p, tr, true,
- top || (active && opts.colorSelTab) ? SHADE_TAB_SEL_LIGHT
- : SHADE_BOTTOM_TAB_SEL_DARK,
- top || (active && opts.colorSelTab) ? SHADE_TAB_SEL_DARK
- : SHADE_BOTTOM_TAB_SEL_LIGHT,
- active, active ? QTC_SEL_TAB_APP : QTC_NORM_TAB_APP, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT);
-
- drawBorder(cg.background(), p, tr, cg, flags|Style_Horizontal|Style_Enabled,
- active
+ drawBevelGradient(col, p, glowTr, true,
+ active, active ? SEL_TAB_APP : NORM_TAB_APP, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT);
+
+ drawBorder(cg.background(), p, glowTr, cg, flags|Style_Horizontal|Style_Enabled,
+ active || TAB_MO_GLOW==opts.tabMouseOver || opts.roundAllTabs
? (top ? ROUNDED_TOP : ROUNDED_BOTTOM)
: firstTab
? (top ? ROUNDED_TOPLEFT : ROUNDED_BOTTOMLEFT)
: lastTab
? (top ? ROUNDED_TOPRIGHT : ROUNDED_BOTTOMRIGHT)
- : ROUNDED_NONE, NULL, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT, true,
- active && !opts.colorSelTab ? BORDER_RAISED : BORDER_FLAT, false);
+ : ROUNDED_NONE, glowMo ? itsMouseOverCols : 0L, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT, true,
+ borderProfile, false);
+ if(glowMo)
+ {
+ glowTr.addCoords(-1, -1, 1, 1);
+ drawGlow(p, glowTr, cg, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT);
+ }
p->setClipping(false);
if(top)
{
if(active)
{
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawPoint(r.x(), r.y()+r.height()-2);
p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-2);
p->setPen(itsBackgroundCols[0]);
p->drawLine(r.x()+1, r.y()+r.height()-3, r.x()+1, r.y()+r.height()-1);
//p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-1);
- p->setPen(itsBackgroundCols[QT_FRAME_DARK_SHADOW]);
+ p->setPen(itsBackgroundCols[opts.borderTab ? 0 : FRAME_DARK_SHADOW]);
p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-2);
}
else
{
p->setPen(itsBackgroundCols[0]);
p->drawLine(r.x(), r.y()+r.height()-1, r.x()+r.width()-1, r.y()+r.height()-1);
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawLine(r.x(), r.y()+r.height()-2, r.x()+r.width()-1, r.y()+r.height()-2);
- if(opts.coloredMouseOver && itsHover)
- {
- p->setPen(itsMouseOverCols[ORIGINAL_SHADE]);
- p->drawLine(tr.x()+(firstTab ? opts.round : 1), tr.y()+1,
- tr.x()+tr.width()-((lastTab ? opts.round : 0)+1), tr.y()+1);
-
- p->setPen(itsMouseOverCols[QT_STD_BORDER]);
- p->drawLine(tr.x()+(firstTab ? opts.round : 1), tr.y(),
- tr.x()+tr.width()-((lastTab ? opts.round : 0)+1), tr.y());
- }
+ if(opts.coloredMouseOver && itsHover && TAB_MO_GLOW!=opts.tabMouseOver)
+ drawHighlight(p, QRect(tr.x()+(firstTab ? moOffset : 1),
+ tr.y()+(TAB_MO_TOP==opts.tabMouseOver ? 0 : tr.height()-3),
+ tr.width()-(firstTab || lastTab ? moOffset : 1), 2),
+ cg, true, !TAB_MO_TOP==opts.tabMouseOver);
}
if(((!reverse && firstTab) || (lastTab && reverse)) && !cornerWidget)
@@ -3426,35 +4600,38 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
int x(reverse ? r.x()+r.width()-1 : r.x()),
x2(reverse ? x-1 : x+1);
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(itsBackgroundCols[!active && TAB_MO_GLOW==opts.tabMouseOver && opts.round>ROUND_SLIGHT && !(opts.square&SQUARE_TAB_FRAME)
+ ? ORIGINAL_SHADE : STD_BORDER]);
p->drawLine(x, r.y()+r.height()-1, x, r.height()-2);
if(active)
{
p->setPen(itsBackgroundCols[reverse ? dark : 0]);
- p->drawLine(x2, r.y()+r.height()-1, x2, r.height()-2);
+ p->drawLine(x2, r.y()+r.height()-1, x2, r.y()+r.height()-2);
}
}
if(active && opts.highlightTab)
{
- p->setPen(itsMenuitemCols[0]);
+ p->setPen(itsHighlightCols[0]);
p->drawLine(tr.left(), tr.top()+1, tr.right(), tr.top()+1);
- p->setPen(midColor(fill, itsMenuitemCols[0], IS_FLAT(opts.tabAppearance) ? 1.0 : 1.2));
+ p->setPen(midColor(fill, itsHighlightCols[0])); // , IS_FLAT(opts.activeTabAppearance) ? 1.0 : 1.2));
p->drawLine(tr.left(), tr.top()+2, tr.right(), tr.top()+2);
p->setClipRect(QRect(tr.x(), tr.y(), tr.width(), 3), QPainter::CoordPainter);
drawBorder(cg.background(), p, tr, cg, flags|Style_Horizontal|Style_Enabled,
- ROUNDED_ALL, itsMenuitemCols, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT,
+ ROUNDED_ALL, itsHighlightCols, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT,
true, BORDER_FLAT, false, 3);
p->setClipping(false);
}
// Round top-left corner...
- if(ROUND_FULL==opts.round && APP_TORA!=itsThemedApp && firstTab && !active && !cornerWidget && !reverse) // && !isFirstKTabCtlTab)
+ if(!(opts.square&SQUARE_TAB_FRAME) && FULLLY_ROUNDED && APP_TORA!=itsThemedApp && firstTab && !active && !cornerWidget && !reverse) // && !isFirstKTabCtlTab)
{
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawPoint(r.x()+1, r.y()+r.height()-1);
- p->setPen(midColor(itsBackgroundCols[QT_STD_BORDER], cg.background()));
+ p->setPen(TAB_MO_GLOW==opts.tabMouseOver
+ ? itsBackgroundCols[STD_BORDER]
+ : midColor(itsBackgroundCols[STD_BORDER], cg.background()));
p->drawPoint(r.x()+1, r.y()+r.height()-2);
}
}
@@ -3462,56 +4639,57 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
{
if(active)
{
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawPoint(r.x(), r.y()+1);
p->drawPoint(r.x()+r.width()-1, r.y()+1);
p->setPen(itsBackgroundCols[0]);
p->drawLine(r.x()+1, r.y()+2, r.x()+1, r.y());
- p->setPen(itsBackgroundCols[QT_FRAME_DARK_SHADOW]);
+ p->setPen(itsBackgroundCols[opts.borderTab ? 0 : FRAME_DARK_SHADOW]);
p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y());
p->drawPoint(r.x()+r.width()-1, r.y());
}
else
{
- p->setPen(itsBackgroundCols[dark]);
+ p->setPen(itsBackgroundCols[opts.borderTab ? 0 : dark]);
p->drawLine(r.x(), r.y(), r.x()+r.width()-1, r.y());
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawLine(r.x(), r.y()+1, r.x()+r.width()-1, r.y()+1);
-
- if(opts.coloredMouseOver && itsHover)
- {
- p->setPen(itsMouseOverCols[ORIGINAL_SHADE]);
- p->drawLine(tr.x()+(firstTab ? opts.round : 1), tr.y()+tr.height()-2,
- tr.x()+tr.width()-((lastTab ? opts.round : 0)+1), tr.y()+tr.height()-2);
-
- p->setPen(itsMouseOverCols[3]);
- p->drawLine(tr.x()+(firstTab ? opts.round : 1), tr.y()+tr.height()-1,
- tr.x()+tr.width()-((lastTab ? opts.round : 0)+1), tr.y()+tr.height()-1);
- }
+
+ if(opts.coloredMouseOver && itsHover && TAB_MO_GLOW!=opts.tabMouseOver)
+ drawHighlight(p, QRect(tr.x()+(firstTab ? moOffset : 1),
+ tr.y()+(TAB_MO_TOP==opts.tabMouseOver ? tr.height()-2 : 1),
+ tr.width()-(firstTab || lastTab ? moOffset : 1), 2),
+ cg, true, TAB_MO_TOP==opts.tabMouseOver);
}
+ if(TAB_MO_GLOW==opts.tabMouseOver && opts.round<=ROUND_SLIGHT && !(opts.square&SQUARE_TAB_FRAME) && !reverse && firstTab && !cornerWidget)
+ {
+ p->setPen(itsBackgroundCols[STD_BORDER]);
+ p->drawPoint(r.x(), r.y());
+ }
+
if(active && opts.highlightTab)
{
- p->setPen(itsMenuitemCols[0]);
+ p->setPen(itsHighlightCols[0]);
p->drawLine(tr.left(), tr.bottom()-1, tr.right(), tr.bottom()-1);
- p->setPen(midColor(fill, itsMenuitemCols[0]));
+ p->setPen(midColor(fill, itsHighlightCols[0]));
p->drawLine(tr.left(), tr.bottom()-2, tr.right(), tr.bottom()-2);
p->setClipRect(QRect(tr.x(), tr.y()+r.height()-3, tr.width(), 3), QPainter::CoordPainter);
drawBorder(cg.background(), p, tr, cg, flags|Style_Horizontal|Style_Enabled,
- ROUNDED_ALL, itsMenuitemCols, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT,
+ ROUNDED_ALL, itsHighlightCols, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT,
true, BORDER_FLAT, false, 3);
p->setClipping(false);
}
- if(ROUND_FULL==opts.round && APP_TORA!=itsThemedApp && firstTab && !bottomCornerWidget)// && !isFirstKTabCtlTab)
+ if(!(opts.square&SQUARE_TAB_FRAME) && FULLLY_ROUNDED && APP_TORA!=itsThemedApp && firstTab && !bottomCornerWidget)// && !isFirstKTabCtlTab)
{
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
+ p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawPoint(r.x(), reverse ? r.y()+r.width()-1 : r.y());
// Round bottom-left corner...
if(!active&& !reverse)
{
p->drawPoint(r.x()+1, r.y()-1);
- p->setPen(midColor(itsBackgroundCols[QT_STD_BORDER], cg.background()));
+ p->setPen(midColor(itsBackgroundCols[STD_BORDER], cg.background()));
p->drawPoint(r.x()+1, r.y());
}
}
@@ -3583,7 +4761,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
#endif
case CE_PushButtonLabel: // Taken from Highcolor and Plastik...
{
- int x, y, w, h;
+ int x, y, w, h, arrowOffset=DO_EFFECT ? 1 : 0;
r.rect(&x, &y, &w, &h);
@@ -3612,10 +4790,9 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
//the widget
else
{
- drawPrimitive(PE_ArrowDown, p,
- visualRect(QRect((x + w) - (dx + margin), y, dx, h), r), cg,
- flags, data);
- w-=dx;
+ ::drawArrow(p, visualRect(QRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r),
+ MO_ARROW(cg.buttonText()), PE_ArrowDown, opts);
+ w-=(dx+arrowOffset);
}
}
@@ -3656,8 +4833,8 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
if (cornArrow) //Draw over the icon
- drawPrimitive(PE_ArrowDown, p, visualRect(QRect(x + w - 6, x + h - 6, 7, 7), r),
- cg, flags, data);
+ ::drawArrow(p, visualRect(QRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r),
+ MO_ARROW(cg.buttonText()), PE_ArrowDown, opts);
if(xo && iw)
{
@@ -3674,9 +4851,11 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
// Make the label indicate if the button is a default button or not
int i,
j(opts.embolden && button->isDefault() ? 2 : 1);
- const QColor &textCol(!opts.stdSidebarButtons && button->isFlat() &&
- button->inherits("KMultiTabBarTab") &&
- (button->isOn() || flags&Style_On)
+ bool sidebar(!opts.stdSidebarButtons &&
+ ((button->isFlat() && button->inherits("KMultiTabBarTab")) ||
+ (button->parentWidget() && button->inherits("Ideal::Button") &&
+ button->parentWidget()->inherits("Ideal::ButtonBar"))));
+ const QColor &textCol(sidebar && (button->isOn() || flags&Style_On)
? QApplication::palette().active().highlightedText()
: button->colorGroup().buttonText());
@@ -3686,7 +4865,8 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
button->pixmap(), button->text(), -1, &textCol);
// Draw a focus rect if the button has focus
- if (flags & Style_HasFocus)
+ if (flags&Style_HasFocus && FOCUS_GLOW!=opts.focus &&
+ !(flags&Style_MouseOver && FOCUS_FULL==opts.focus && MO_NONE!=opts.coloredMouseOver))
drawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_PushButtonFocusRect,
widget), widget), cg, flags);
break;
@@ -3701,34 +4881,46 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
int tab(data.tabWidth()),
maxpmw(data.maxIconWidth()),
x, y, w, h;
+ bool reverse(QApplication::reverseLayout());
+ maxpmw=QMAX(maxpmw, constMenuPixmapWidth);
r.rect(&x, &y, &w, &h);
- if((flags & Style_Active)&&(flags & Style_Enabled))
- drawMenuItem(p, r, cg, false, ROUNDED_ALL,
- opts.lighterPopupMenuBgnd ? itsLighterPopupMenuBgndCol
- : itsBackgroundCols[ORIGINAL_SHADE], itsMenuitemCols);
- else if(widget->erasePixmap() && !widget->erasePixmap()->isNull())
+ if(widget->erasePixmap() && !widget->erasePixmap()->isNull())
p->drawPixmap(x, y, *widget->erasePixmap(), x, y, w, h);
else
- p->fillRect(r, opts.lighterPopupMenuBgnd ? itsLighterPopupMenuBgndCol
- : itsBackgroundCols[ORIGINAL_SHADE]);
+ {
+ if(IS_FLAT_BGND(opts.menuBgndAppearance))
+ p->fillRect(r, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol
+ : itsBackgroundCols[ORIGINAL_SHADE]);
+
+ if(opts.menuStripe)
+ drawBevelGradient(menuStripeCol(), p,
+ QRect(reverse ? r.right()-maxpmw : r.x(),
+ r.y(), maxpmw, r.height()), false,
+ false, opts.menuStripeAppearance, WIDGET_OTHER);
+ }
+
+ if((flags&Style_Active) && (flags&Style_Enabled))
+ drawMenuItem(p, r, flags, cg, false, ROUNDED_ALL,
+ USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol
+ : itsBackgroundCols[ORIGINAL_SHADE],
+ opts.useHighlightForMenu ? itsHighlightCols : itsBackgroundCols);
if(!mi)
break;
if(mi->isSeparator())
{
- y=r.y()+((r.height()/2)-1);
- p->setPen(itsBackgroundCols[QT_STD_BORDER]);
- p->drawLine(r.x()+4, y, r.x()+r.width()-5, y);
+ y=r.y()+(r.height()>>1);
+ p->setPen(itsBackgroundCols[MENU_SEP_SHADE]);
+ p->drawLine(r.x()+3+(!reverse && opts.menuStripe ? maxpmw : 0), y,
+ r.x()+r.width()-4-(reverse && opts.menuStripe ? maxpmw : 0), y);
// p->setPen(itsBackgroundCols[0]);
// p->drawLine(r.x()+4, y+1, r.x()+r.width()-5, y+1);
break;
}
- maxpmw=QMAX(maxpmw, 16);
-
QRect cr, ir, tr, sr;
// check column
cr.setRect(r.left(), r.top(), maxpmw, r.height());
@@ -3739,8 +4931,6 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
// item column
ir.setCoords(cr.right()+4, r.top(), tr.right()-4, r.bottom());
- bool reverse(QApplication::reverseLayout());
-
if(reverse)
{
cr=visualRect(cr, r);
@@ -3749,7 +4939,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
ir=visualRect(ir, r);
}
- if(mi->iconSet())
+ if(mi->iconSet() && opts.menuIcons)
{
// Select the correct icon from the iconset
QIconSet::Mode mode=flags & Style_Active
@@ -3761,7 +4951,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
// Then draw a "pressed" background behind the icon
if(popupmenu->isCheckable() && mi->isChecked())
drawLightBevel((flags & Style_Active)&&(flags & Style_Enabled)
- ? itsMenuitemCols[ORIGINAL_SHADE]
+ ? itsHighlightCols[ORIGINAL_SHADE]
: cg.background(), p, QRect(cr.x()+1, cr.y()+2, cr.width()-2, cr.height()-4),
cg, flags|Style_Sunken|Style_Horizontal, ROUNDED_ALL,
getFill(flags|Style_Sunken|Style_Enabled, itsBackgroundCols),
@@ -3776,47 +4966,19 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
else if(popupmenu->isCheckable() && mi->isChecked())
drawPrimitive(PE_CheckMark, p, cr, cg,
- (flags &(Style_Enabled|Style_Active))| Style_On|QTC_MENU_ITEM);
+ (flags &(Style_Enabled|(opts.useHighlightForMenu ? Style_Active : 0)))| Style_On|MENU_ITEM);
- QColor textcolor,
- embosscolor;
+ QColor textCol(flags&Style_Enabled
+ ? flags&Style_Active && opts.useHighlightForMenu
+ ? cg.highlightedText()
+ : cg.foreground()
+ : cg.mid());
- if(flags&Style_Active)
- {
- if(!(flags & Style_Enabled))
- {
- textcolor=cg.text();
- embosscolor=cg.light();
- }
- else
- {
- textcolor=cg.highlightedText();
- embosscolor=cg.midlight().light();
- }
- }
- else if(!(flags & Style_Enabled))
- {
- textcolor=cg.text();
- embosscolor=cg.light();
- }
- else
- {
- textcolor=cg.foreground();
- embosscolor=cg.light();
- }
- p->setPen(textcolor);
+ p->setPen(textCol);
if(mi->custom())
{
p->save();
- if(!(flags & Style_Enabled))
- {
- p->setPen(cg.light());
- mi->custom()->paint(p, cg,(flags & Style_Enabled)?(flags & Style_Active): 0,
- flags & Style_Enabled, ir.x()+1, ir.y()+1, ir.width()-1,
- ir.height()-1);
- p->setPen(textcolor);
- }
mi->custom()->paint(p, cg,(flags & Style_Enabled)?(flags & Style_Active): 0,
flags & Style_Enabled, ir.x(), ir.y(), ir.width(), ir.height());
p->restore();
@@ -3830,37 +4992,10 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
// draw accelerator/tab-text
if(t>=0)
- {
- int alignFlag(AlignVCenter | ShowPrefix | DontClip | SingleLine);
-
- alignFlag |=(reverse ? AlignLeft : AlignRight);
-
- if(!(flags & Style_Enabled))
- {
- p->setPen(embosscolor);
- tr.moveBy(1, 1);
- p->drawText(tr, alignFlag, text.mid(t +1));
- tr.moveBy(-1,-1);
- p->setPen(textcolor);
- }
+ p->drawText(tr, AlignVCenter|ShowPrefix|DontClip|SingleLine|(reverse ? AlignLeft : AlignRight),
+ text.mid(t+1));
- p->drawText(tr, alignFlag, text.mid(t +1));
- }
-
- int alignFlag(AlignVCenter | ShowPrefix | DontClip | SingleLine);
-
- alignFlag |=(reverse ? AlignRight : AlignLeft);
-
- if(!(flags & Style_Enabled))
- {
- p->setPen(embosscolor);
- ir.moveBy(1, 1);
- p->drawText(ir, alignFlag, text, t);
- ir.moveBy(-1,-1);
- p->setPen(textcolor);
- }
-
- p->drawText(ir, alignFlag, text, t);
+ p->drawText(ir, AlignVCenter|ShowPrefix|DontClip|SingleLine|(reverse ? AlignRight : AlignLeft), text, t);
}
else if(mi->pixmap())
{
@@ -3876,7 +5011,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
if(mi->popup())
- drawArrow(p, sr, cg, flags, reverse ? PE_ArrowLeft : PE_ArrowRight, false, true);
+ ::drawArrow(p, sr, textCol, reverse ? PE_ArrowLeft : PE_ArrowRight, opts);
break;
}
case CE_MenuBarItem:
@@ -3897,9 +5032,10 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
if(active)
- drawMenuItem(p, r, cg, true, down && opts.roundMbTopOnly ? ROUNDED_TOP : ROUNDED_ALL,
+ drawMenuItem(p, r, flags, cg, true, down && opts.roundMbTopOnly ? ROUNDED_TOP : ROUNDED_ALL,
itsMenubarCols[ORIGINAL_SHADE],
- opts.colorMenubarMouseOver || down ? itsMenuitemCols : itsBackgroundCols);
+ opts.useHighlightForMenu && (opts.colorMenubarMouseOver || down)
+ ? itsHighlightCols : itsBackgroundCols);
if(data.isDefault())
break;
@@ -3911,16 +5047,10 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
mi->pixmap(), QString::null);
else
{
- const QColor *col=(opts.colorMenubarMouseOver && active) || (!opts.colorMenubarMouseOver && down)
- ? opts.customMenuTextColor
- ? &opts.customMenuSelTextColor
- : &cg.highlightedText()
- : itsActive
+ const QColor *col=((opts.colorMenubarMouseOver && active) || (!opts.colorMenubarMouseOver && down))
? opts.customMenuTextColor
- ? &opts.customMenuNormTextColor
- : SHADE_BLEND_SELECTED==opts.shadeMenubars ||
- (SHADE_CUSTOM==opts.shadeMenubars &&
- TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))
+ ? &opts.customMenuSelTextColor
+ : opts.useHighlightForMenu
? &cg.highlightedText()
: &cg.foreground()
: &cg.foreground();
@@ -3942,25 +5072,49 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
drawMenuOrToolBarBackground(p, r, cg, false, Qt::Horizontal==wind->orientation());
}
else
- KStyle::drawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
break;
case CE_ProgressBarGroove:
{
- if(opts.gradientPbGroove)
- drawBevelGradient(flags & Style_Enabled ? cg.base() : cg.background(), false, p, r, true,
- getWidgetShade(WIDGET_TROUGH, true, false, opts.progressAppearance),
- getWidgetShade(WIDGET_TROUGH, false, false, opts.progressAppearance),
- false, APPEARANCE_GRADIENT, WIDGET_TROUGH);
- else
+ QRect rx(r);
+ bool doEtch(DO_EFFECT && opts.borderProgress);
+ QColor col;
+
+ if(doEtch)
+ rx.addCoords(1, 1, -1, -1);
+
+ switch(opts.progressGrooveColor)
{
- p->setBrush(flags & Style_Enabled ? cg.base() : cg.background());
- p->drawRect(r);
+ default:
+ case ECOLOR_BASE:
+ col=cg.base();
+ break;
+ case ECOLOR_BACKGROUND:
+ col=cg.background();
+ break;
+ case ECOLOR_DARK:
+ col=itsBackgroundCols[2];
}
+ drawBevelGradient(col, p, rx, true,
+ false, opts.progressGrooveAppearance, WIDGET_PBAR_TROUGH);
+
const QColor *use(backgroundColors(cg));
- drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal),
- ROUNDED_ALL, use, WIDGET_OTHER, true, BORDER_SUNKEN);
+ if(opts.borderProgress)
+ drawBorder(cg.background(), p, rx, cg, (SFlags)(flags|Style_Horizontal),
+ (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true,
+ IS_FLAT(opts.progressGrooveAppearance) && ECOLOR_DARK!=opts.progressGrooveColor ? BORDER_SUNKEN : BORDER_FLAT);
+ else
+ {
+ p->setPen(itsBackgroundCols[STD_BORDER]);
+ p->drawLine(r.topLeft(), r.topRight());
+ p->drawLine(r.bottomLeft(), r.bottomRight());
+ }
+
+ if(doEtch)
+ drawEtch(p, r, cg, false, (opts.square&SQUARE_PROGRESS));
+
break;
}
case CE_ProgressBarContents:
@@ -3970,7 +5124,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(0==steps)//Busy indicator
{
- static const int barWidth(10);
+ static const int barWidth(PROGRESS_CHUNK_WIDTH*3.4);
int progress(pb->progress() % (2*(r.width()-barWidth)));
@@ -3979,10 +5133,8 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
else if(progress > r.width()-barWidth)
progress = (r.width()-barWidth)-(progress-(r.width()-barWidth));
- p->fillRect(r, flags & Style_Enabled ? cg.base() : cg.background());
- drawLightBevel(cg.background(), p, QRect(r.x()+progress, r.y(), barWidth,
- r.height()), cg, flags, ROUNDED_ALL, itsMenuitemCols[ORIGINAL_SHADE],
- itsMenuitemCols, true, true, WIDGET_PROGRESSBAR);
+ drawProgress(p, QRect(r.x()+progress, r.y(), barWidth, r.height()), cg, flags,
+ (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
}
else
{
@@ -3996,24 +5148,71 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(QApplication::reverseLayout())
drawProgress(p, QRect(cr.x()+(cr.width()-width), cr.y(), width,
cr.height()), cg, flags,
- width==cr.width() ? ROUNDED_NONE : ROUNDED_LEFT, widget);
+ width==cr.width() || (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
else
drawProgress(p, QRect(cr.x(), cr.y(), width, cr.height()), cg, flags,
- width==cr.width() ? ROUNDED_NONE : ROUNDED_RIGHT, widget);
+ width==cr.width() || (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
}
}
break;
}
+ case CE_ProgressBarLabel:
+ {
+ const QProgressBar* pb = (const QProgressBar*)widget;
+ QRect cr = subRect(SR_ProgressBarContents, widget);
+ double progress = pb->progress();
+ bool reverse = QApplication::reverseLayout();
+ int steps = pb->totalSteps();
+
+ if (!cr.isValid())
+ return;
+
+ if(opts.boldProgress) // This is the only change fro the KStyle code!
+ {
+ QFont font = p->font();
+ font.setBold(true);
+ p->setFont(font);
+ }
+
+ // Draw label
+ if (progress > 0 || steps == 0)
+ {
+ double pg = (steps == 0) ? 1.0 : progress / steps;
+ int width = QMIN(cr.width(), (int)(pg * cr.width()));
+ QRect crect;
+ if (reverse)
+ crect.setRect(cr.x()+(cr.width()-width), cr.y(), cr.width(), cr.height());
+ else
+ crect.setRect(cr.x()+width, cr.y(), cr.width(), cr.height());
+
+ p->save();
+ p->setPen(pb->isEnabled() ? (reverse ? cg.text() : cg.highlightedText()) : cg.text());
+ p->drawText(r, AlignCenter, pb->progressString());
+ p->setClipRect(crect);
+ p->setPen(reverse ? cg.highlightedText() : cg.text());
+ p->drawText(r, AlignCenter, pb->progressString());
+ p->restore();
+ }
+ else
+ {
+ p->setPen(cg.text());
+ p->drawText(r, AlignCenter, pb->progressString());
+ }
+ break;
+ }
case CE_PushButton:
{
const QPushButton *button(static_cast<const QPushButton *>(widget));
- bool sidebar(button->isFlat() && button->inherits("KMultiTabBarTab"));
+ bool sidebar(!opts.stdSidebarButtons &&
+ ((button->isFlat() && button->inherits("KMultiTabBarTab")) ||
+ (button->parentWidget() && button->inherits("Ideal::Button") &&
+ button->parentWidget()->inherits("Ideal::ButtonBar"))));
- if(!opts.stdSidebarButtons && sidebar)
+ if(sidebar)
{
QRect r2(r);
- flags|=QTC_TOGGLE_BUTTON;
+ flags|=TOGGLE_BUTTON;
if(button->isOn())
flags|=Style_On;
@@ -4066,10 +5265,10 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
flags|=Style_ButtonDefault;
if(button->isToggleButton())
- flags|=QTC_TOGGLE_BUTTON;
+ flags|=TOGGLE_BUTTON;
if(sidebar)
- flags|=QTC_NO_ETCH_BUTTON;
+ flags|=NO_ETCH_BUTTON;
drawPrimitive(PE_ButtonCommand, p, r, cg, flags);
if (button->isDefault() && IND_CORNER==opts.defBtnIndicator)
@@ -4083,13 +5282,91 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
drawPrimitive(PE_Indicator, p, r, cg, flags, data);
itsFormMode = false;
break;
+ case CE_CheckBoxLabel:
+ if(opts.crHighlight || FOCUS_GLOW==opts.focus)
+ {
+ const QCheckBox *checkbox((const QCheckBox *)widget);
+
+ if(flags&Style_MouseOver && opts.crHighlight &&
+#if QT_VERSION >= 0x030200
+ HOVER_CHECK==itsHover && itsHoverWidget && itsHoverWidget==widget &&
+#endif
+ !isFormWidget(widget))
+ {
+#if QT_VERSION >= 0x030200
+ QRect cr(checkbox->rect());
+ QRegion r(QRect(cr.x(), cr.y(), visualRect(subRect(SR_CheckBoxFocusRect, widget),
+ widget).width()+
+ pixelMetric(PM_IndicatorWidth)+4,
+ cr.height()));
+
+#else
+ QRegion r(checkbox->rect());
+#endif
+ r-=visualRect(subRect(SR_CheckBoxIndicator, widget), widget);
+ p->setClipRegion(r);
+ drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, checkbox->rect(), true,
+ false, opts.selectionAppearance, WIDGET_SELECTION);
+ p->setClipping(false);
+ }
+ int alignment(QApplication::reverseLayout() ? AlignRight : AlignLeft);
+
+ drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
+ flags & Style_Enabled, checkbox->pixmap(), checkbox->text());
+
+ if(checkbox->hasFocus() && FOCUS_GLOW!=opts.focus)
+ drawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_CheckBoxFocusRect, widget),
+ widget), cg, flags);
+ }
+ else
+ BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
+ break;
case CE_RadioButton:
itsFormMode=isFormWidget(widget);
drawPrimitive(PE_ExclusiveIndicator, p, r, cg, flags, data);
itsFormMode=false;
break;
+ case CE_RadioButtonLabel:
+ if(opts.crHighlight || FOCUS_GLOW==opts.focus)
+ {
+ const QRadioButton *radiobutton((const QRadioButton *)widget);
+
+ if(flags&Style_MouseOver && opts.crHighlight &&
+#if QT_VERSION >= 0x030200
+ HOVER_RADIO==itsHover && itsHoverWidget && itsHoverWidget==widget &&
+#endif
+ !isFormWidget(widget))
+ {
+#if QT_VERSION >= 0x030200
+ QRect rb(radiobutton->rect());
+ QRegion r(QRect(rb.x(), rb.y(),
+ visualRect(subRect(SR_RadioButtonFocusRect, widget),
+ widget).width()+
+ pixelMetric(PM_ExclusiveIndicatorWidth)+4,
+ rb.height()));
+#else
+ QRegion r(radiobutton->rect());
+#endif
+ r-=visualRect(subRect(SR_RadioButtonIndicator, widget), widget);
+ p->setClipRegion(r);
+ drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, radiobutton->rect(), true,
+ false, opts.selectionAppearance, WIDGET_SELECTION);
+ p->setClipping(false);
+ }
+
+ int alignment(QApplication::reverseLayout() ? AlignRight : AlignLeft);
+
+ drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled,
+ radiobutton->pixmap(), radiobutton->text());
+
+ if(radiobutton->hasFocus() && FOCUS_GLOW!=opts.focus)
+ drawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_RadioButtonFocusRect,
+ widget), widget), cg, flags);
+ break;
+ }
+ // Fall through intentional!
default:
- KStyle::drawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
}
}
@@ -4101,7 +5378,7 @@ void QtCurveStyle::drawControlMask(ControlElement control, QPainter *p, const QW
case CE_PushButton:
case CE_MenuBarItem:
{
- int offset(r.width()<QTC_MIN_BTN_SIZE || r.height()<QTC_MIN_BTN_SIZE ? 1 : 2);
+ int offset(r.width()<MIN_ROUND_FULL_SIZE || r.height()<MIN_ROUND_FULL_SIZE ? 1 : 2);
p->fillRect(r, color0);
p->fillRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2, color1);
@@ -4115,7 +5392,7 @@ void QtCurveStyle::drawControlMask(ControlElement control, QPainter *p, const QW
break;
}
default:
- KStyle::drawControlMask(control, p, widget, r, data);
+ BASE_STYLE::drawControlMask(control, p, widget, r, data);
}
}
@@ -4130,7 +5407,7 @@ void QtCurveStyle::drawComplexControlMask(ComplexControl control, QPainter *p, c
drawControlMask(CE_PushButton, p, widget, r, data);
break;
default:
- KStyle::drawComplexControlMask(control, p, widget, r, data);
+ BASE_STYLE::drawComplexControlMask(control, p, widget, r, data);
}
}
@@ -4143,35 +5420,54 @@ QRect QtCurveStyle::subRect(SubRect subrect, const QWidget *widget)const
{
case SR_PushButtonFocusRect:
{
- int dbw1(pixelMetric(PM_ButtonDefaultIndicator, widget)),
- dbw2(dbw1*2),
- border(3),
- border2=(border*2);
-
- rect.setRect(wrect.x()+border +dbw1, wrect.y()+border +dbw1,
- wrect.width()-border2-dbw2,
- wrect.height()-border2-dbw2);
-
-
- if(!isFormWidget(widget) && QTC_DO_EFFECT)
- rect.addCoords(0, 1, 0, -1);
+ if(FOCUS_FULL==opts.focus)
+ rect=wrect;
+ else
+ {
+ int dbw1(pixelMetric(PM_ButtonDefaultIndicator, widget)),
+ dbw2(dbw1*2),
+ border(3),
+ border2=(border*2);
+
+ rect.setRect(wrect.x()+border +dbw1, wrect.y()+border +dbw1,
+ wrect.width()-border2-dbw2,
+ wrect.height()-border2-dbw2);
+ }
- break;
+ if(!isFormWidget(widget) && DO_EFFECT)
+ rect.addCoords(1, 1, -1, -1);
+ return rect;
}
- case SR_ProgressBarGroove:
- rect=QRect(widget->rect());
- break;
+
case SR_ProgressBarContents:
+ return opts.fillProgress
+ ? DO_EFFECT && opts.borderProgress
+ ? wrect
+ : QRect(wrect.left()-1, wrect.top()-1, wrect.width()+2, wrect.height()+2)
+ : DO_EFFECT && opts.borderProgress
+ ? QRect(wrect.left()+2, wrect.top()+2, wrect.width()-4, wrect.height()-4)
+ : QRect(wrect.left()+1, wrect.top()+1, wrect.width()-2, wrect.height()-2);
case SR_ProgressBarLabel:
- rect=QRect(wrect.left()+2, wrect.top()+2, wrect.width()-4, wrect.height()-4);
- break;
+ case SR_ProgressBarGroove:
+ return wrect;
+ case SR_DockWindowHandleRect:
+ return wrect;
default:
- rect=KStyle::subRect(subrect, widget);
+ return BASE_STYLE::subRect(subrect, widget);
}
return rect;
}
+// This is a hack, as QTitleBar is private!!!
+class QTitleBar : public QWidget
+{
+ public:
+
+ bool isActive() const;
+ QWidget *window() const;
+};
+
void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const QWidget *widget,
const QRect &r, const QColorGroup &cg, SFlags flags,
SCFlags controls, SCFlags active,
@@ -4188,7 +5484,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
QRect button(querySubControlMetrics(control, widget, SC_ToolButton, data)),
menuarea(querySubControlMetrics(control, widget, SC_ToolButtonMenu,
data));
- SFlags bflags(flags|QTC_STD_TOOLBUTTON),
+ SFlags bflags(flags|STD_TOOLBUTTON),
mflags(flags);
if (APP_KORN==itsThemedApp)
@@ -4198,12 +5494,23 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
const QToolBar *tb(widget->parentWidget()
- ? ::qt_cast<const QToolBar *>(widget->parentWidget()) : NULL);
+ ? ::qt_cast<const QToolBar *>(widget->parentWidget()) : 0L);
bool onControlButtons(false),
onExtender(!tb &&
widget->parentWidget() &&
widget->parentWidget()->inherits( "QToolBarExtensionWidget") &&
- ::qt_cast<QToolBar *>(widget->parentWidget()->parentWidget()));
+ ::qt_cast<QToolBar *>(widget->parentWidget()->parentWidget())),
+ isDWClose(!tb && !onExtender &&
+ widget->parentWidget() &&
+ widget->parentWidget()->inherits( "QDockWindowHandle"));
+
+ if(isDWClose)
+ {
+ p->fillRect(r, cg.background());//.dark(DW_BGND));
+ if(!(flags&Style_MouseOver) && !(active & SC_ToolButton))
+ break;
+ bflags|=DW_CLOSE_BUTTON;
+ }
if (!tb && !onExtender && widget->parentWidget() &&
!qstrcmp(widget->parentWidget()->name(), "qt_maxcontrols"))
@@ -4221,10 +5528,10 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(onControlButtons ||
(toolbutton->parentWidget() && toolbutton->parentWidget()->parentWidget() &&
::qt_cast<const QMenuBar *>(toolbutton->parentWidget()->parentWidget())))
- bflags|=QTC_NO_ETCH_BUTTON;
+ bflags|=NO_ETCH_BUTTON;
// If we're pressed, on, or raised...
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
if(bflags &(Style_Down | Style_On | Style_Raised) || onControlButtons)
#else
if(bflags &(Style_Down | Style_On | Style_Raised | Style_MouseOver) ||
@@ -4237,12 +5544,12 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(tb)
if(Qt::Vertical==tb->orientation())
- bflags|=QTC_VERTICAL_TB_BUTTON;
+ bflags|=VERTICAL_TB_BUTTON;
else
bflags|=Style_Horizontal;
if(toolbutton->isToggleButton())
- bflags|=QTC_TOGGLE_BUTTON;
+ bflags|=TOGGLE_BUTTON;
drawPrimitive(PE_ButtonTool, p, button, cg, bflags, data);
}
@@ -4255,7 +5562,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
toolbutton->pos());
else if(widget->parent())
{
- QToolBar *tb(NULL);
+ QToolBar *tb(0L);
if(::qt_cast<const QToolBar *>(widget->parent()))
tb=(QToolBar*)widget->parent();
@@ -4286,13 +5593,16 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
{
if(mflags &(Style_Down | Style_On | Style_Raised))
drawPrimitive(PE_ButtonDropDown, p, menuarea, cg, mflags, data);
- drawPrimitive(PE_ArrowDown, p, menuarea, cg, mflags, data);
+ ::drawArrow(p, menuarea, MO_ARROW(cg.buttonText()), PE_ArrowDown, opts, true);
}
if(toolbutton->hasFocus() && !toolbutton->focusProxy())
{
QRect fr(toolbutton->rect());
- fr.addCoords(3, 3,-3,-3);
+ if(FOCUS_FULL!=opts.focus)
+ fr.addCoords(2, 2,-2,-2);
+ if(DO_EFFECT)
+ fr.addCoords(1, 1,-1,-1);
drawPrimitive(PE_FocusRect, p, fr, cg);
}
@@ -4301,6 +5611,11 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
case CC_ComboBox:
{
+ if(APP_OPENOFFICE==itsThemedApp)
+ flags&=~Style_MouseOver;
+
+ itsFormMode = isFormWidget(widget);
+
const QComboBox *combobox((const QComboBox *)widget);
QRect frame(QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame,
@@ -4315,9 +5630,14 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
bool editable(combobox->editable()),
sunken(combobox->listBox() ? combobox->listBox()->isShown() : false),
reverse(QApplication::reverseLayout());
- SFlags fillFlags(flags);
+ SFlags fillFlags(flags),
+ doEtch(!itsFormMode && DO_EFFECT && (!editable || opts.etchEntry));
- itsFormMode = isFormWidget(widget);
+ if(doEtch)
+ {
+ frame.addCoords(1, 1, -1, -1);
+ field.addCoords(reverse ? -1 : 1, 1, reverse ? -1 : 0, -1);
+ }
if(sunken)
{
@@ -4326,7 +5646,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
fillFlags-=Style_MouseOver;
}
- if(editable ||(!itsFormMode && QTC_DO_EFFECT && qstrcmp(widget->name(), kdeToolbarWidget)))
+ if(editable ||(!itsFormMode && DO_EFFECT && qstrcmp(widget->name(), kdeToolbarWidget)))
{
p->setPen(cg.background());
p->drawRect(r);
@@ -4334,41 +5654,73 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(controls&SC_ComboBoxFrame && frame.isValid())
{
- if(editable && HOVER_CB_ARROW!=itsHover && fillFlags&Style_MouseOver)
- fillFlags-=Style_MouseOver;
+ if(editable && opts.unifyCombo)
+ {
+ if(reverse)
+ frame.addCoords(0, 1, 2, -1);
+ else
+ frame.addCoords(-1, 1, -1, -1);
+ p->fillRect(frame, flags&Style_Enabled ? cg.base() : cg.background());
+ }
+ else
+ {
+ const QColor *cols=itsComboBtnCols && editable && flags&Style_Enabled ? itsComboBtnCols : use;
- if(opts.coloredMouseOver && fillFlags&Style_MouseOver && editable && !sunken)
- frame.addCoords(reverse ? 0 : 1, 0, reverse ? 1 : 0, 0);
+ if(editable && HOVER_CB_ARROW!=itsHover)
+ fillFlags&=~Style_MouseOver;
- drawLightBevel(p, frame, cg, fillFlags|Style_Raised|Style_Horizontal,
- controls&SC_ComboBoxEditField && field.isValid() && editable
- ? (reverse ? ROUNDED_LEFT : ROUNDED_RIGHT) : ROUNDED_ALL,
- getFill(fillFlags, use), use, true, true, WIDGET_STD_BUTTON);
- }
+ // if(opts.coloredMouseOver && fillFlags&Style_MouseOver && editable && !sunken)
+ // frame.addCoords(reverse ? 0 : 1, 0, reverse ? 1 : 0, 0);
- if(controls&SC_ComboBoxArrow && arrow.isValid())
- {
- if(sunken)
- arrow.addCoords(1, 1, 1, 1);
- drawPrimitive(PE_ArrowDown, p, arrow, cg, flags & ~Style_MouseOver);
+ drawLightBevel(p, frame, cg, fillFlags|Style_Raised|Style_Horizontal,
+ controls&SC_ComboBoxEditField && field.isValid() && editable
+ ? (reverse ? ROUNDED_LEFT : ROUNDED_RIGHT) : ROUNDED_ALL,
+ getFill(fillFlags, cols, false, (SHADE_DARKEN==opts.comboBtn ||
+ (SHADE_NONE!=opts.comboBtn && !(flags&Style_Enabled))) &&
+ editable),
+ cols, true, true, editable ? WIDGET_COMBO_BUTTON : WIDGET_COMBO);
+ }
}
if(controls&SC_ComboBoxEditField && field.isValid())
{
if(editable)
{
- field.addCoords(-1,-1, 0, 1);
+ if(opts.unifyCombo)
+ {
+ field=r;
+ if(DO_EFFECT)
+ field.addCoords(1, 1, -1, -1);
+ }
+ else
+ field.addCoords(-1,-1, 0, 1);
p->setPen(flags&Style_Enabled ? cg.base() : cg.background());
p->drawRect(field);
- field.addCoords(-2,-2, 2, 2);
- drawEntryField(p, field, cg, fillFlags, flags&Style_Enabled &&
- (flags&Style_HasFocus), reverse ? ROUNDED_RIGHT : ROUNDED_LEFT,
- WIDGET_STD_BUTTON);
+ if(!opts.unifyCombo)
+ field.addCoords(-2,-2, 2, 2);
+ SFlags fieldFlags(flags);
+ if(!opts.unifyCombo && HOVER_CB_ENTRY!=itsHover)
+ fieldFlags&=~Style_MouseOver;
+ drawEntryField(p, field, cg, fillFlags, fieldFlags&Style_Enabled
+ ? fieldFlags&Style_MouseOver
+ ? ENTRY_MOUSE_OVER
+ : fieldFlags&Style_HasFocus
+ ? ENTRY_FOCUS
+ : ENTRY_NONE
+ : ENTRY_NONE,
+ (opts.square&SQUARE_ENTRY)
+ ? ROUNDED_NONE
+ : opts.unifyCombo
+ ? ROUNDED_ALL
+ : reverse
+ ? ROUNDED_RIGHT
+ : ROUNDED_LEFT,
+ WIDGET_COMBO);
}
- else
+ else if(opts.comboSplitter && !(SHADE_DARKEN==opts.comboBtn || itsComboBtnCols))
{
field.addCoords(1, sunken ? 2 : 1, sunken ? 2 : 1, -1);
- p->setPen(use[QT_BORDER(flags&Style_Enabled)]);
+ p->setPen(use[BORDER_VAL(flags&Style_Enabled)]);
p->drawLine(reverse ? field.left()-3 : field.right(), field.top(),
reverse ? field.left()-3 : field.right(), field.bottom());
if(!sunken)
@@ -4379,49 +5731,155 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
}
- if((flags & Style_HasFocus) && !editable)
+ if(flags&Style_HasFocus && !editable && FOCUS_GLOW!=opts.focus)
{
- QRect fr(QStyle::visualRect(subRect(SR_ComboBoxFocusRect, widget), widget));
+ QRect fr;
- if(reverse)
- fr.addCoords(3, 0, 0, 0);
+ if(FOCUS_FULL==opts.focus)
+ fr=frame;
+ else if(opts.comboSplitter)
+ {
+ fr=QStyle::visualRect(subRect(SR_ComboBoxFocusRect, widget), widget);
+ if(reverse)
+ fr.addCoords(3, 0, 0, 0);
+ else
+ fr.addCoords(0, 0, -2, 0);
+ if(!itsFormMode && DO_EFFECT)
+ fr.addCoords(1, 1, -1, -1);
+ }
else
- fr.addCoords(0, 0, -2, 0);
+ {
+ fr=frame;
+ fr.addCoords(3, 3, -3, -3);
+ }
+
+ if(!(flags&Style_MouseOver && FOCUS_FULL==opts.focus && MO_NONE!=opts.coloredMouseOver))
+ drawPrimitive(PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder,
+ QStyleOption(cg.highlight()));
+ }
+ }
- if(!itsFormMode && QTC_DO_EFFECT)
- fr.addCoords(0, 1, 0, -1);
- drawPrimitive(PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder,
- QStyleOption(cg.highlight()));
+ if(controls&SC_ComboBoxArrow && arrow.isValid())
+ {
+ if(!editable && (SHADE_DARKEN==opts.comboBtn || itsComboBtnCols))
+ {
+ SFlags btnFlags(flags);
+ QRect btn(arrow.x(), frame.y(), arrow.width()+1, frame.height());
+ const QColor *cols=SHADE_DARKEN==opts.comboBtn || !(flags&Style_Enabled) ? use : itsComboBtnCols;
+ if(!sunken)
+ btnFlags|=Style_Raised;
+ p->save();
+ p->setClipRect(btn);
+ if(!opts.comboSplitter)
+ btn.addCoords(reverse ? 0 : -2, 0, reverse ? 2 : 0, 0);
+ if(!DO_EFFECT)
+ btn.addCoords(0, 0, 1, 0);
+ drawLightBevel(p, btn, cg, btnFlags|Style_Horizontal, reverse ? ROUNDED_LEFT : ROUNDED_RIGHT,
+ getFill(btnFlags, cols, false, SHADE_DARKEN==opts.comboBtn ||
+ (SHADE_NONE!=opts.comboBtn && !(flags&Style_Enabled))),
+ cols, true, true, WIDGET_COMBO);
+ p->restore();
}
+
+ SFlags arrowFlags(flags);
+ if(sunken && !opts.unifyCombo)
+ arrow.addCoords(1, 1, 1, 1);
+ if(editable && HOVER_CB_ARROW!=itsHover)
+ arrowFlags&=~Style_MouseOver;
+ ::drawArrow(p, arrow, MO_ARROW_X(arrowFlags, cg.buttonText()), PE_ArrowDown, opts);
+ }
+
+ if(doEtch)
+ {
+ bool glowFocus(USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled);
+
+ if(!sunken && !editable &&
+ ((MO_GLOW==opts.coloredMouseOver && flags&Style_MouseOver)/* ||
+ (FOCUS_FULL==opts.focus && flags&Style_HasFocus)*/ || glowFocus))
+ drawGlow(p, widget ? widget->rect() : r, cg, WIDGET_COMBO, glowFocus ? itsFocusCols : NULL);
+ else
+ drawEtch(p, widget ? widget->rect() : r, cg,
+ !editable && EFFECT_SHADOW==opts.buttonEffect && !sunken, editable && (opts.square&SQUARE_ENTRY));
}
- p->setPen(flags & Style_Enabled ? cg.buttonText() : cg.mid());
+ p->setPen(cg.buttonText());
itsFormMode = false;
break;
}
case CC_SpinWidget:
{
+ itsFormMode = isFormWidget(widget);
+
const QSpinWidget *spinwidget((const QSpinWidget *)widget);
QRect frame(querySubControlMetrics(CC_SpinWidget, widget, SC_SpinWidgetFrame,
data)),
up(spinwidget->upRect()),
- down(spinwidget->downRect());
+ down(spinwidget->downRect()),
+ all(frame.unite(up).unite(down));
bool hw(itsHoverWidget && itsHoverWidget==spinwidget),
reverse(QApplication::reverseLayout()),
- doFrame((controls&SC_SpinWidgetFrame) && frame.isValid());
+ doFrame((controls&SC_SpinWidgetFrame) && frame.isValid()),
+ doEtch(!itsFormMode && DO_EFFECT && opts.etchEntry);
+
+ if(doEtch)
+ {
+ down.addCoords(reverse ? 1 : 0, 0, reverse ? 0 : -1, -1);
+ up.addCoords(reverse ? 1 : 0, 1, reverse ? 0 : -1, 0);
+ frame.addCoords(reverse ? 0 : 1, 1, reverse ? -1 : 0, -1);
+ }
if(flags&Style_MouseOver)
flags-=Style_MouseOver;
- if(!reverse && doFrame)
+ if(opts.unifySpin)
+ drawEntryField(p, all, cg, flags, spinwidget && flags&Style_Enabled
+ ? flags&Style_MouseOver || hw
+ ? ENTRY_MOUSE_OVER
+ : flags&Style_HasFocus || spinwidget->hasFocus()
+ ? ENTRY_FOCUS
+ : ENTRY_NONE
+ : ENTRY_NONE,
+ ROUNDED_ALL, WIDGET_SPIN);
+ else
{
- itsFormMode = isFormWidget(widget);
- frame.setWidth(frame.width()+1);
+ if(!reverse && doFrame)
+ {
+ frame.setWidth(frame.width()+1);
+
+ drawEntryField(p, frame, cg, flags,
+ spinwidget && flags&Style_Enabled
+ ? flags&Style_MouseOver || hw
+ ? ENTRY_MOUSE_OVER
+ : flags&Style_HasFocus || spinwidget->hasFocus()
+ ? ENTRY_FOCUS
+ : ENTRY_NONE
+ : ENTRY_NONE,
+ ROUNDED_LEFT, WIDGET_SPIN);
+ }
- drawEntryField(p, frame, cg, flags,
- spinwidget ? spinwidget->hasFocus() && (flags&Style_Enabled) : false,
- ROUNDED_LEFT, WIDGET_SPIN);
- itsFormMode=false;
+ if(opts.unifySpinBtns)
+ {
+ QRect btns=up.unite(down);
+ const QColor *use(buttonColors(cg));
+ int btnFlags=flags;
+
+ btnFlags&=~(Style_Sunken|Style_MouseOver);
+ btnFlags|=Style_Horizontal;
+
+ drawLightBevel(p, btns, cg, btnFlags, reverse ? ROUNDED_LEFT : ROUNDED_RIGHT, getFill(btnFlags, use),
+ use, true, true, WIDGET_SPIN);
+ if(hw && (HOVER_SW_DOWN==itsHover || HOVER_SW_UP==itsHover) && flags&Style_Enabled && !(flags&Style_Sunken))
+ {
+ btnFlags|=Style_MouseOver;
+ p->save();
+ p->setClipRect(HOVER_SW_UP==itsHover ? up : down);
+ drawLightBevel(p, btns, cg, btnFlags, reverse ? ROUNDED_LEFT : ROUNDED_RIGHT, getFill(btnFlags, use),
+ use, true, true, WIDGET_SPIN);
+ p->restore();
+ }
+ p->setPen(use[BORDER_VAL(style&Style_Enabled)]);
+ p->drawLine(down.x()+2, down.y(), down.x()+down.width()-3, down.y());
+ }
}
if((controls&SC_SpinWidgetUp) && up.isValid())
@@ -4435,8 +5893,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(spinwidget->buttonSymbols()==QSpinWidget::PlusMinus)
pe=PE_SpinWidgetPlus;
if(!spinwidget->isUpEnabled())
- upflags^=Style_Enabled;
- drawPrimitive(pe, p, up, cg,
+ upflags&=~Style_Enabled;
+ drawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
upflags |((active==SC_SpinWidgetUp)
? Style_On | Style_Sunken : Style_Raised));
}
@@ -4451,21 +5909,32 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(spinwidget->buttonSymbols()==QSpinWidget::PlusMinus)
pe=PE_SpinWidgetMinus;
if(!spinwidget->isDownEnabled())
- downflags^=Style_Enabled;
- drawPrimitive(pe, p, down, cg,
+ downflags&=~Style_Enabled;
+ drawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
downflags |((active==SC_SpinWidgetDown)
? Style_On | Style_Sunken : Style_Raised));
}
- if(reverse && doFrame)
+ if(!opts.unifySpin)
{
- itsFormMode = isFormWidget(widget);
- frame.setWidth(frame.width()+1);
- drawEntryField(p, frame, cg, flags,
- spinwidget ? spinwidget->hasFocus() && (flags&Style_Enabled) : false,
- ROUNDED_RIGHT, WIDGET_SPIN);
- itsFormMode=false;
+ if(reverse && doFrame)
+ {
+ frame.setWidth(frame.width()+1);
+ drawEntryField(p, frame, cg, flags,
+ spinwidget && flags&Style_Enabled
+ ? flags&Style_MouseOver || hw
+ ? ENTRY_MOUSE_OVER
+ : flags&Style_HasFocus || spinwidget->hasFocus()
+ ? ENTRY_FOCUS
+ : ENTRY_NONE
+ : ENTRY_NONE,
+ ROUNDED_RIGHT, WIDGET_SPIN);
+ }
+
+ if(doEtch)
+ drawEtch(p, spinwidget ? spinwidget->rect() : r, cg, false, (opts.square&SQUARE_ENTRY));
}
+ itsFormMode=false;
break;
}
case CC_ScrollBar:
@@ -4478,7 +5947,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
atMin(maxed || sb->value()==sb->minValue()),
atMax(maxed || sb->value()==sb->maxValue());
SFlags sflags((horiz ? Style_Horizontal : Style_Default) |
- (maxed ? Style_Default : Style_Enabled));
+ (maxed || !widget->isEnabled() ? Style_Default : Style_Enabled));
QRect subline(querySubControlMetrics(control, widget, SC_ScrollBarSubLine,
data)),
addline(querySubControlMetrics(control, widget, SC_ScrollBarAddLine,
@@ -4526,8 +5995,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
sbRect.addCoords(0, 0, -1, 0);
}
-#ifndef QTC_SIMPLE_SCROLLBARS
- if(sbRect.isValid() && SCROLLBAR_NONE==opts.scrollbarType)
+#ifndef SIMPLE_SCROLLBARS
+ if(sbRect.isValid() && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons))
if(horiz)
sbRect.addCoords(0, 0, -1, 0);
else
@@ -4535,40 +6004,98 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
#endif
}
- if (useThreeButtonScrollBar)
+ else if (useThreeButtonScrollBar)
if (horiz)
subline2.moveBy(-addline.width(), 0);
else
subline2.moveBy(0, -addline.height());
+ if(opts.flatSbarButtons)
+ switch(opts.scrollbarType)
+ {
+ case SCROLLBAR_KDE:
+ if(horiz)
+ sbRect.addCoords(subline.width(), 0, -(addline.width()+subline2.width()), 0);
+ else
+ sbRect.addCoords(0, subline.height(), 0, -(addline.height()+subline2.height()));
+ break;
+ case SCROLLBAR_WINDOWS:
+ if(horiz)
+ sbRect.addCoords(subline.width(), 0, -(addline.width()), 0);
+ else
+ sbRect.addCoords(0, subline.height(), 0, -(addline.height()));
+ break;
+ case SCROLLBAR_NEXT:
+ if(horiz)
+ sbRect.addCoords(subline.width()+subline2.width(), 0, 0, 0);
+ else
+ sbRect.addCoords(0, subline.height()+subline2.height(), 0, 0);
+ break;
+ case SCROLLBAR_PLATINUM:
+ if(horiz)
+ sbRect.addCoords(0, 0, -(addline.width()+subline2.width()), 0);
+ else
+ sbRect.addCoords(0, 0, 0, -(addline.height()+subline2.height()));
+ default:
+ break;
+ }
+
// Draw trough...
const QColor *trough(itsBackgroundCols); // backgroundColors(cg));
- bool noButtons(SCROLLBAR_NONE==opts.scrollbarType);
+ bool noButtons((SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons) && ROUNDED);
QRect s2(subpage), a2(addpage);
-#ifndef QTC_SIMPLE_SCROLLBARS
+#ifndef SIMPLE_SCROLLBARS
if(noButtons)
{
// Increase clipping to allow trough to "bleed" into slider corners...
- a2.addCoords(-3, -3, 3, 3);
- s2.addCoords(-3, -3, 3, 3);
+ a2.addCoords(-2, -2, 2, 2);
+ s2.addCoords(-2, -2, 2, 2);
}
#endif
+ p->save();
+ if(opts.flatSbarButtons)
+ p->setClipRegion(QRegion(s2)+QRegion(addpage)+QRegion(addline)+QRegion(subline)+QRegion(subline2));
+ else
+ p->setClipRegion(QRegion(s2)+QRegion(addpage));
+
+ if(opts.flatSbarButtons && SCROLLBAR_NONE!=opts.scrollbarType && ROUNDED && !IS_FLAT(opts.sbarBgndAppearance))
+ drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], p, r, flags&Style_Horizontal, false,
+ opts.sbarBgndAppearance, WIDGET_SB_BGND);
+ else if(opts.thinSbarGroove && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons) && IS_FLAT(opts.sbarBgndAppearance))
+ {
+ QColor color(cg.background());
- p->setClipRegion(QRegion(s2)+QRegion(addpage));
- drawLightBevel(p, sbRect, cg, sflags|Style_Down,
-#ifndef QTC_SIMPLE_SCROLLBARS
- SCROLLBAR_NONE==opts.scrollbarType ? ROUNDED_ALL :
+ if(0!=opts.tabBgnd && inStackWidget(widget))
+ color=shade(color, TO_FACTOR(opts.tabBgnd));
+ p->fillRect(sbRect, cg.background());
+ }
+
+ sflags&=~(Style_Down|Style_On|Style_Sunken);
+
+ if(opts.thinSbarGroove && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons))
+ if(horiz)
+ sbRect.addCoords(0, THIN_SBAR_MOD, 0, -THIN_SBAR_MOD);
+ else
+ sbRect.addCoords(THIN_SBAR_MOD, 0, -THIN_SBAR_MOD, 0);
+
+ drawLightBevel(p, sbRect, cg, sflags/*|Style_Down*/,
+#ifndef SIMPLE_SCROLLBARS
+ !(opts.square&SQUARE_SB_SLIDER) && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons)
+ ? ROUNDED_ALL :
#endif
ROUNDED_NONE,
- trough[2], trough, true, true, WIDGET_TROUGH);
- p->setClipping(false);
+ trough[2], trough, true, true,
+ opts.thinSbarGroove && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons)
+ ? WIDGET_SLIDER_TROUGH : WIDGET_TROUGH);
+ p->restore();
if(/*(controls&SC_ScrollBarSubLine) && */subline.isValid())
{
- bool enable=(!maxed && sb->value()!=sb->minValue());
+ bool enable=!atMin;
- drawPrimitive(PE_ScrollBarSubLine, p, subline, cg, sflags |
+ drawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->palette().disabled() : cg,
+ sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB==itsHover
? Style_MouseOver : Style_Default) |
@@ -4576,16 +6103,21 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
&& SC_ScrollBarSubLine==active ? Style_Down : Style_Default));
if (useThreeButtonScrollBar && subline2.isValid())
- drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg, sflags |
+ {
+ if(IS_FLAT(opts.sbarBgndAppearance))
+ p->fillRect(subline2, cg.background());
+ drawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->palette().disabled() : cg,
+ sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB2==itsHover
? Style_MouseOver : Style_Default) |
(enable && (!hw || HOVER_SB_SUB2==itsHover || HOVER_NONE==itsHover)
&& SC_ScrollBarSubLine==active ? Style_Down : Style_Default));
+ }
}
if(/*(controls&SC_ScrollBarAddLine) && */addline.isValid())
{
- bool enable=(!maxed && sb->value()!=sb->maxValue());
+ bool enable=!atMax;
// See KHTML note at top of file
if(itsFormMode && SCROLLBAR_NEXT!=opts.scrollbarType)
@@ -4594,7 +6126,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
else
addline.addCoords(0, 0, 0, -1);
- drawPrimitive(PE_ScrollBarAddLine, p, addline, cg, sflags |
+ drawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->palette().disabled() : cg,
+ sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_ADD==itsHover
? Style_MouseOver : Style_Default) |
@@ -4619,8 +6152,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
// region...
if(!(controls&SC_ScrollBarSlider))
p->setClipRegion(QRegion(s2)+QRegion(addpage));
-#ifdef QTC_INCREASE_SB_SLIDER
- else
+#ifdef INCREASE_SB_SLIDER
+ else if(!opts.flatSbarButtons)
{
if(atMax)
switch(opts.scrollbarType)
@@ -4651,6 +6184,14 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
#endif
+ if(opts.thinSbarGroove)
+ if(opts.flatSbarButtons && SCROLLBAR_NONE!=opts.scrollbarType && ROUNDED)
+ drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], p, slider, flags&Style_Horizontal, false,
+ opts.sbarBgndAppearance, WIDGET_SB_BGND);
+ else if(opts.thinSbarGroove && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons) &&
+ IS_FLAT(opts.sbarBgndAppearance))
+ p->fillRect(slider, cg.background());
+
drawPrimitive(PE_ScrollBarSlider, p, slider, cg, sflags |
//(maxed ? Style_Default : Style_Enabled) |
(!maxed && hw && HOVER_SB_SLIDER==itsHover
@@ -4663,10 +6204,10 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
drawPrimitive(PE_FocusRect, p, QRect(slider.x()+2, slider.y()+2,
slider.width()-5, slider.height()-5), cg, Style_Default);
-#ifndef QTC_SIMPLE_SCROLLBARS
- if(noButtons && (!atMin || !atMax))
+#ifndef SIMPLE_SCROLLBARS
+ if(noButtons && (!atMin || !atMax) && !opts.thinSbarGroove)
{
- p->setPen(backgroundColors(cg)[QT_STD_BORDER]);
+ p->setPen(backgroundColors(cg)[STD_BORDER]);
if(horiz)
{
@@ -4708,8 +6249,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
}
#endif
- if(!(controls&SC_ScrollBarSlider))
- p->setClipping(false);
+// if(!(controls&SC_ScrollBarSlider))
+// p->setClipping(false);
}
break;
}
@@ -4741,12 +6282,12 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if((controls & SC_SliderGroove)&& groove.isValid())
drawSliderGroove(paint, groove, cg, flags, widget);
if((controls & SC_SliderHandle)&& handle.isValid())
- drawSliderHandle(paint, handle, cg, flags, widget ? ::qt_cast<QSlider *>(widget) : NULL, tb);
+ drawSliderHandle(paint, handle, cg, flags, widget ? ::qt_cast<QSlider *>(widget) : 0L, tb);
if(controls & SC_SliderTickmarks)
QCommonStyle::drawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks,
active, data);
- if(flags & Style_HasFocus)
+ if(flags&Style_HasFocus && FOCUS_GLOW!=opts.focus)
drawPrimitive(PE_FocusRect, paint, groove, cg);
if(!tb)
@@ -4756,8 +6297,139 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
break;
}
+ case CC_TitleBar:
+ {
+ const int buttonMargin(3);
+ const QTitleBar *tb((const QTitleBar *)widget);
+ bool isActive((tb->isActive() && widget->isActiveWindow()) ||
+ (!tb->window() && widget->topLevelWidget()->isActiveWindow()));
+ QColorGroup cgroup(isActive
+ ? widget->palette().active()
+ : widget->palette().inactive());
+ const QColor *cols(getMdiColors(cg, isActive));
+ QColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor),
+ shdCol(shadowColor(textCol)),
+ shadowCol(midColor(cols[ORIGINAL_SHADE], shdCol));
+
+ if (controls&SC_TitleBarLabel)
+ {
+ int alignment=AlignVCenter|SingleLine;
+ bool full=false;
+
+ switch(opts.titlebarAlignment)
+ {
+ default:
+ case ALIGN_LEFT:
+ alignment|=Qt::AlignLeft;
+ break;
+ case ALIGN_CENTER:
+ alignment|=Qt::AlignHCenter;
+ break;
+ case ALIGN_FULL_CENTER:
+ alignment|=Qt::AlignHCenter;
+ full=true;
+ break;
+ case ALIGN_RIGHT:
+ alignment|=Qt::AlignRight;
+ }
+
+ QRect ir(visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)),
+ textRect(full ? tb->rect().x() : ir.x(), ir.y(), full ? tb->rect().width() : ir.width(), ir.height());
+ EAppearance app=isActive ? opts.titlebarAppearance : opts.inactiveTitlebarAppearance;
+
+ drawBevelGradient(cols[ORIGINAL_SHADE], p, r, true, false, app, WIDGET_MDI_WINDOW);
+ ir.addCoords(2, 0, -4, 0);
+
+ QFontMetrics fm(QFontMetrics(widget->font()));
+ QString titleString(elliditide(widget->caption(), fm, textRect.width()));
+
+ if(full)
+ {
+ int textWidth=fm.boundingRect(titleString).width();
+ if(ir.left()>((textRect.width()-textWidth)>>1))
+ {
+ alignment=Qt::AlignVCenter|Qt::AlignLeft;
+ textRect=ir;
+ full=false;
+ }
+ else if(ir.right()<((textRect.width()+textWidth)>>1))
+ {
+ alignment=Qt::AlignVCenter|Qt::AlignRight;
+ textRect=ir;
+ full=false;
+ }
+ else
+ p->setClipRect(ir);
+ }
+
+ p->setPen(shadowCol);
+ p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), alignment, titleString);
+ p->setPen(textCol);
+ p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), alignment, titleString);
+ if(full)
+ p->setClipping(false);
+
+ //controls-=SC_TitleBarLabel;
+ }
+ QRect ir;
+ bool down(false);
+ QPixmap pm;
+
+ if (controls&SC_TitleBarCloseButton)
+ {
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget);
+ down = active & SC_TitleBarCloseButton;
+ drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarCloseButton);
+ }
+
+ if (tb->window())
+ {
+ if (controls &SC_TitleBarMaxButton)
+ {
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget);
+ down = active & SC_TitleBarMaxButton;
+ drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarMaxButton);
+ }
+
+ if (controls&SC_TitleBarNormalButton || controls&SC_TitleBarMinButton)
+ {
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget);
+ QStyle::SubControl ctrl = (controls & SC_TitleBarNormalButton ?
+ SC_TitleBarNormalButton :
+ SC_TitleBarMinButton);
+ down = active & ctrl;
+ drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, ctrl);
+ }
+
+ if (controls&SC_TitleBarShadeButton)
+ {
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget);
+ down = active & SC_TitleBarShadeButton;
+ drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarShadeButton);
+ }
+ if (controls&SC_TitleBarUnshadeButton)
+ {
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget);
+ down = active & SC_TitleBarUnshadeButton;
+ drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarUnshadeButton);
+ }
+ }
+ if (controls&SC_TitleBarSysMenu && tb->icon())
+ {
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget);
+ down = active & SC_TitleBarSysMenu;
+ drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ drawItem(p, ir, AlignCenter, tb->colorGroup(), true, tb->icon(), QString::null);
+ }
+ break;
+ }
default:
- KStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data);
+ BASE_STYLE::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data);
}
}
@@ -4779,7 +6451,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
bs.setHeight(widget->height()>>1);
if(bs.height()< 8)
bs.setHeight(8);
- bs.setWidth(15);
+ bs.setWidth(DO_EFFECT ? 16 : 15);
bs=bs.expandedTo(QApplication::globalStrut());
int extra(bs.height()*2==widget->height()? 0 : 1),
@@ -4808,17 +6480,17 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
}
case CC_ComboBox:
{
- QRect r(KStyle::querySubControlMetrics(control, widget, sc, data));
+ QRect r(BASE_STYLE::querySubControlMetrics(control, widget, sc, data));
if(SC_ComboBoxFrame==sc)
{
const QComboBox *cb(::qt_cast<const QComboBox *>(widget));
if(cb && cb->editable())
- r=QRect((r.x()+r.width()-1)-18, r.y(), 19, r.height());
+ r=QRect(r.x()+r.width()-19, r.y(), 19, r.height());
}
- else if (reverse && SC_ComboBoxEditField==sc)
- r.addCoords(-1, 0, -2, 0);
+ else if (SC_ComboBoxEditField==sc && !DO_EFFECT)
+ r.addCoords(0, 0, -1, 0);
return r;
}
case CC_ScrollBar:
@@ -4965,17 +6637,103 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
}
return ret;
}
+#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS // TODO
+ case CC_TitleBar:
+ if (widget)
+ {
+ bool isMinimized(tb->titleBarState&Qt::WindowMinimized),
+ isMaximized(tb->titleBarState&Qt::WindowMaximized);
+
+ if( (isMaximized && SC_TitleBarMaxButton==subControl) ||
+ (isMinimized && SC_TitleBarMinButton==subControl) ||
+ (isMinimized && SC_TitleBarShadeButton==subControl) ||
+ (!isMinimized && SC_TitleBarUnshadeButton==subControl))
+ return QRect();
+
+ readMdiPositions();
+
+ const int windowMargin(2);
+ const int controlSize(tb->rect.height() - windowMargin *2);
+
+ QList<int>::ConstIterator it(itsMdiButtons[0].begin()),
+ end(itsMdiButtons[0].end());
+ int sc(SC_TitleBarUnshadeButton==subControl
+ ? SC_TitleBarShadeButton
+ : SC_TitleBarNormalButton==subControl
+ ? isMaximized
+ ? SC_TitleBarMaxButton
+ : SC_TitleBarMinButton
+ : subControl),
+ pos(0),
+ totalLeft(0),
+ totalRight(0);
+ bool rhs(false),
+ found(false);
+
+ for(; it!=end; ++it)
+ if(SC_TitleBarCloseButton==(*it) || WINDOWTITLE_SPACER==(*it) || tb->titleBarFlags&(toHint(*it)))
+ {
+ totalLeft+=WINDOWTITLE_SPACER==(*it) ? controlSize/2 : controlSize;
+ if(*it==sc)
+ found=true;
+ else if(!found)
+ pos+=WINDOWTITLE_SPACER==(*it) ? controlSize/2 : controlSize;
+ }
+
+ if(!found)
+ {
+ pos=0;
+ rhs=true;
+ }
+
+ it=itsMdiButtons[1].begin();
+ end=itsMdiButtons[1].end();
+ for(; it!=end; ++it)
+ if(SC_TitleBarCloseButton==(*it) || WINDOWTITLE_SPACER==(*it) || tb->titleBarFlags&(toHint(*it)))
+ {
+ if(WINDOWTITLE_SPACER!=(*it) || totalRight)
+ totalRight+=WINDOWTITLE_SPACER==(*it) ? controlSize/2 : controlSize;
+ if(rhs)
+ if(*it==sc)
+ {
+ pos+=controlSize;
+ found=true;
+ }
+ else if(found)
+ pos+=WINDOWTITLE_SPACER==(*it) ? controlSize/2 : controlSize;
+ }
+
+ totalLeft+=(windowMargin*(totalLeft ? 2 : 1));
+ totalRight+=(windowMargin*(totalRight ? 2 : 1));
+
+ if(SC_TitleBarLabel==subControl)
+ r.adjust(totalLeft, 0, -totalRight, 0);
+ else if(!found)
+ return QRect();
+ else if(rhs)
+ r.setRect(r.right()-(pos+windowMargin),
+ r.top()+windowMargin,
+ controlSize, controlSize);
+ else
+ r.setRect(r.left()+windowMargin+pos, r.top()+windowMargin,
+ controlSize, controlSize);
+ return visualRect(tb->direction, tb->rect, r);
+ }
+ }
+#endif
default:
break; // Remove compiler warnings...
}
- return KStyle::querySubControlMetrics(control, widget, sc, data);
+ return BASE_STYLE::querySubControlMetrics(control, widget, sc, data);
}
int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
{
switch(metric)
{
+ case PM_MenuBarFrameWidth:
+ return TB_NONE==opts.toolbarBorders ? 0 : 1;
case PM_MenuButtonIndicator:
return 7;
case PM_ButtonMargin:
@@ -4989,7 +6747,7 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
? QTabBar::RoundedAbove==tb->shape() || QTabBar::TriangularAbove==tb->shape()
? 1
: -1
- : KStyle::pixelMetric(metric, widget);
+ : BASE_STYLE::pixelMetric(metric, widget);
}
case PM_TabBarTabShiftHorizontal:
return 0;
@@ -5000,49 +6758,63 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
case PM_ButtonDefaultIndicator:
return 0;
case PM_DefaultFrameWidth:
- if(QTC_DO_EFFECT && widget && !isFormWidget(widget) &&
- (::qt_cast<const QLineEdit *>(widget) || ::qt_cast<QDateTimeEditBase*>(widget) ||
- ::qt_cast<QTextEdit*>(widget)))
+ if(APP_KATE==itsThemedApp && widget && widget->parentWidget() && widget->parentWidget()->parentWidget() &&
+ ::qt_cast<const QWidgetStack *>(widget) &&
+ ::qt_cast<const QTabWidget *>(widget->parentWidget()) &&
+ ::qt_cast<const QVBox *>(widget->parentWidget()->parentWidget()))
+ return 0;
+
+ if ((opts.square&SQUARE_SCROLLVIEW) && widget && ::qt_cast<const QScrollView *>(widget))
+ return (opts.gtkScrollViews || opts.thinSbarGroove) && !opts.highlightScrollViews ? 1 : 2;
+
+ if(DO_EFFECT && opts.etchEntry && widget && !isFormWidget(widget) &&
+ (::qt_cast<const QLineEdit *>(widget) || ::qt_cast<const QDateTimeEditBase*>(widget) ||
+ ::qt_cast<const QTextEdit*>(widget) || ::qt_cast<const QScrollView*>(widget)))
return 3;
else
return 2;
case PM_SpinBoxFrameWidth:
- return QTC_DO_EFFECT && !isFormWidget(widget) ? 3 : 2;
+ return DO_EFFECT && !isFormWidget(widget) ? 3 : 2;
case PM_IndicatorWidth:
case PM_IndicatorHeight:
- return QTC_CHECK_SIZE;
+ return DO_EFFECT && widget && !isFormWidget(widget) ? opts.crSize+2 : opts.crSize;
case PM_ExclusiveIndicatorWidth:
case PM_ExclusiveIndicatorHeight:
- return QTC_RADIO_SIZE;
+ return DO_EFFECT && widget && !isFormWidget(widget) ? opts.crSize+2 : opts.crSize;
case PM_TabBarTabOverlap:
- return 1;
+ return TAB_MO_GLOW==opts.tabMouseOver ? 0 : 1;
case PM_ProgressBarChunkWidth:
- return 4;
+ return PROGRESS_CHUNK_WIDTH*3.4;
case PM_DockWindowSeparatorExtent:
return 4;
case PM_DockWindowHandleExtent:
return 10;
case PM_SplitterWidth:
- return 6;
+ return widget && widget->inherits("QDockWindowResizeHandle")
+ ? 9
+ : LINE_1DOT==opts.splitters
+ ? 7
+ : 6;
case PM_ScrollBarSliderMin:
- return 16;
+ return opts.sliderWidth+1;
case PM_SliderThickness:
- return SLIDER_TRIANGULAR==opts.sliderStyle ? 22 : 18;
+ return SLIDER_TRIANGULAR==opts.sliderStyle ? 22 : (SLIDER_SIZE+(ROTATED_SLIDER ? 8 : 3));
case PM_SliderControlThickness:
- return SLIDER_TRIANGULAR==opts.sliderStyle ? 19 : 15; // This equates to 13, as we draw the handle 2 pix smaller for focus rect...
+ return SLIDER_TRIANGULAR==opts.sliderStyle ? 19 : (SLIDER_SIZE+(ROTATED_SLIDER ? 8 : 0)); // This equates to 13, as we draw the handle 2 pix smaller for focus rect...
case PM_SliderLength:
- return SLIDER_TRIANGULAR==opts.sliderStyle ? 11 : 21;
+ return SLIDER_TRIANGULAR==opts.sliderStyle ? 11 : (SLIDER_SIZE+(ROTATED_SLIDER ? -2 : 6));
case PM_ScrollBarExtent:
// See KHTML note at top of file
- return APP_KPRESENTER==itsThemedApp ||
+ return opts.sliderWidth+
+ (APP_KPRESENTER==itsThemedApp ||
((APP_KONQUEROR==itsThemedApp || APP_KONTACT==itsThemedApp) && (!widget || isFormWidget(widget)))
- ? 16 : 15;
+ ? 1 : 0);
case PM_MaximumDragDistance:
return -1;
case PM_TabBarTabVSpace:
return opts.highlightTab ? 11 : 9;
default:
- return KStyle::pixelMetric(metric, widget);
+ return BASE_STYLE::pixelMetric(metric, widget);
}
}
@@ -5053,7 +6825,7 @@ int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) con
case KPM_MenuItemSeparatorHeight:
return 2;
default:
- return KStyle::kPixelMetric(kpm, widget);
+ return BASE_STYLE::kPixelMetric(kpm, widget);
}
}
@@ -5068,14 +6840,9 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
if (button && !button->text().isEmpty())
{
- bool allowEtch(QTC_DO_EFFECT && !isFormWidget(widget));
-
- const int constMinH(allowEtch ? 29 : 27);
-
int margin(2*pixelMetric(PM_ButtonMargin, widget)),
mbi(button->isMenuButton() ? pixelMetric(PM_MenuButtonIndicator, widget) : 0),
- w(contentsSize.width() + margin + mbi + 16),
- h(contentsSize.height() + margin);
+ w(contentsSize.width() + margin + mbi + 16);
// if(button->text()=="...")
// w+=24;
@@ -5090,26 +6857,15 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
w=constMinW;
}
- if(allowEtch)
- h+=2;
-
- return QSize(w, h < constMinH ? constMinH : h);
+ return QSize(w, contentsSize.height() + margin+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns
+ ? 6 : 4));
}
break;
}
case CT_ComboBox:
{
- bool allowEtch(QTC_DO_EFFECT && !isFormWidget(widget));
-
- const int constMinH(allowEtch ? 26 : 24);
-
- QSize sz(KStyle::sizeFromContents(contents, widget, contentsSize, data));
- int h(sz.height());
-
- if(allowEtch)
- h+=2;
-
- return QSize(sz.width(), h<constMinH ? constMinH : h);
+ QSize sz(BASE_STYLE::sizeFromContents(contents, widget, contentsSize, data));
+ return QSize(sz.width(), sz.height()+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns ? 4 : 2));
}
case CT_PopupMenuItem:
{
@@ -5136,7 +6892,7 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
else if (mi->isSeparator())
{
w = 10;
- h = opts.thinnerMenuItems ? 6 : 8;
+ h = 7;
}
else
{
@@ -5155,7 +6911,7 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
// check | 4 pixels | item | 8 pixels | accel | 4 pixels | check
// check is at least 16x16
- maxpmw=QMAX(maxpmw, 16);
+ maxpmw=QMAX(maxpmw, constMenuPixmapWidth);
w += (maxpmw * 2) + 8;
if (! mi->text().isNull() && mi->text().find('\t') >= 0)
@@ -5165,7 +6921,7 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
}
case CT_SpinBox:
{
- QSize size(KStyle::sizeFromContents(contents, widget, contentsSize, data));
+ QSize size(BASE_STYLE::sizeFromContents(contents, widget, contentsSize, data));
if(!(size.height()%2))
size.setHeight(size.height()+1);
@@ -5182,7 +6938,7 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
break; // Remove compiler warnings...
}
- return KStyle::sizeFromContents(contents, widget, contentsSize, data);
+ return BASE_STYLE::sizeFromContents(contents, widget, contentsSize, data);
}
int QtCurveStyle::styleHint(StyleHint stylehint, const QWidget *widget, const QStyleOption &option,
@@ -5190,18 +6946,22 @@ int QtCurveStyle::styleHint(StyleHint stylehint, const QWidget *widget, const QS
{
switch(stylehint)
{
+ case SH_PopupMenu_SubMenuPopupDelay:
+ return opts.menuDelay;
case SH_ScrollView_FrameOnlyAroundContents:
return opts.gtkScrollViews;
case SH_EtchDisabledText:
+ return 0;
case SH_Slider_SnapToValue:
case SH_PrintDialog_RightAlignButtons:
case SH_FontDialog_SelectAssociatedText:
- case SH_MenuBar_AltKeyNavigation:
case SH_PopupMenu_MouseTracking:
case SH_PopupMenu_SpaceActivatesItem:
case SH_ComboBox_ListMouseTracking:
case SH_ScrollBar_MiddleClickAbsolutePosition:
return 1;
+ case SH_MenuBar_AltKeyNavigation:
+ return 0;
case SH_LineEdit_PasswordCharacter:
if(opts.passwordChar)
{
@@ -5221,23 +6981,167 @@ int QtCurveStyle::styleHint(StyleHint stylehint, const QWidget *widget, const QS
return 0;
case SH_MenuBar_MouseTracking:
return opts.menubarMouseOver ? 1 : 0;
+ case SH_TabBar_Alignment:
+ return AlignLeft;
default:
- return KStyle::styleHint(stylehint, widget, option, returnData);
+ return BASE_STYLE::styleHint(stylehint, widget, option, returnData);
+ }
+}
+
+void QtCurveStyle::drawItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg, bool enabled,
+ const QPixmap *pixmap, const QString &text, int len, const QColor *penColor) const
+{
+ QRect r2(r);
+
+ if((opts.gbLabel&GB_LBL_BOLD) && text.length() && p->device() && dynamic_cast<QGroupBox *>(p->device()))
+ {
+ QGroupBox *box=static_cast<QGroupBox*>(p->device());
+
+ if (!box->isCheckable())
+ {
+ int left,
+ top,
+ width,
+ height;
+ QFontMetrics fm(p->fontMetrics());
+ QRect rb(box->rect());
+ int th(fm.height()+2);
+ QFont f(p->font());
+
+ rb.rect(&left, &top, &width, &height);
+ //rb.coords(&left, &top, &right, &bottom);
+ f.setBold(true);
+ p->setPen(box->colorGroup().foreground());
+ p->setFont(f);
+ p->drawText(QRect(left, top, width, th), (QApplication::reverseLayout()
+ ? AlignRight
+ : AlignLeft)|AlignVCenter|ShowPrefix|SingleLine,
+ text);
+ return;
+ }
+ }
+
+ int x = r.x(),
+ y = r.y(),
+ w = r.width(),
+ h = r.height();
+
+ p->setPen(penColor ? *penColor : cg.foreground());
+ if (pixmap)
+ {
+ QPixmap pm(*pixmap);
+ bool clip = (flags&Qt::DontClip) == 0;
+ if (clip)
+ {
+ if (pm.width() < w && pm.height() < h)
+ clip = false;
+ else
+ {
+ p->save();
+ QRegion cr = QRect(x, y, w, h);
+ if (p->hasClipping())
+ cr &= p->clipRegion(QPainter::CoordPainter);
+ p->setClipRegion(cr);
+ }
+ }
+ if ((flags&Qt::AlignVCenter) == Qt::AlignVCenter)
+ y += h/2 - pm.height()/2;
+ else if ((flags&Qt::AlignBottom) == Qt::AlignBottom)
+ y += h - pm.height();
+ if ((flags&Qt::AlignRight) == Qt::AlignRight)
+ x += w - pm.width();
+ else if ((flags&Qt::AlignHCenter) == Qt::AlignHCenter)
+ x += w/2 - pm.width()/2;
+ else if (((flags&Qt::AlignLeft) != Qt::AlignLeft) && QApplication::reverseLayout()) // AlignAuto && rightToLeft
+ x += w - pm.width();
+
+ if (!enabled)
+ {
+ if (pm.mask()) // pixmap with a mask
+ {
+ if (!pm.selfMask()) // mask is not pixmap itself
+ {
+ QPixmap pmm(*pm.mask());
+ pmm.setMask(*((QBitmap *)&pmm));
+ pm = pmm;
+ }
+ }
+ else if (pm.depth() == 1) // monochrome pixmap, no mask
+ {
+ pm.setMask(*((QBitmap *)&pm));
+#ifndef QT_NO_IMAGE_HEURISTIC_MASK
+ }
+ else // color pixmap, no mask
+ {
+ QString k;
+ k.sprintf("$qt-drawitem-%x", pm.serialNumber());
+ QPixmap *mask = QPixmapCache::find(k);
+ bool del=false;
+ if (!mask)
+ {
+ mask = new QPixmap(pm.createHeuristicMask());
+ mask->setMask(*((QBitmap*)mask));
+ del = !QPixmapCache::insert(k, mask);
+ }
+ pm = *mask;
+ if (del)
+ delete mask;
+#endif
+ }
+ p->setPen(cg.text());
+ }
+ p->drawPixmap(x, y, pm);
+ if (clip)
+ p->restore();
+ }
+ else if (!text.isNull())
+ {
+ if (!enabled)
+ p->setPen(cg.text());
+ p->drawText(x, y, w, h, flags, text, len);
}
}
-void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, const QColorGroup &cg,
+void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg,
bool mbi, int round, const QColor &bgnd, const QColor *cols) const
{
- if(opts.borderMenuitems)
+ int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4,
+ border=opts.borderMenuitems ? 0 : fill;
+
+ if(itsHighlightCols!=cols && mbi && !((flags&Style_Enabled) && (flags&Style_Active) && (flags&Style_Down)) &&
+ !opts.colorMenubarMouseOver && (opts.borderMenuitems || !IS_FLAT(opts.menuitemAppearance)))
+ fill=ORIGINAL_SHADE;
+
+ if(!mbi && APPEARANCE_FADE==opts.menuitemAppearance)
+ {
+ bool reverse=QApplication::reverseLayout();
+ int roundOffet=ROUNDED ? 1 : 0;
+ QRect main(r.x()+(reverse ? 1+MENUITEM_FADE_SIZE : roundOffet+1), r.y()+roundOffet+1,
+ r.width()-(1+MENUITEM_FADE_SIZE), r.height()-(2+(roundOffet*2))),
+ fade(reverse ? r.x()+1 : r.width()-MENUITEM_FADE_SIZE, r.y()+1, MENUITEM_FADE_SIZE, r.height()-2);
+
+ p->fillRect(main, cols[fill]);
+ if(ROUNDED)
+ {
+ main.addCoords(-1, -1, 1, 1);
+ drawBorder(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE], p, main,
+ cg, Style_Horizontal|Style_Raised, reverse ? ROUNDED_RIGHT : ROUNDED_LEFT,
+ cols, WIDGET_MENU_ITEM, false, BORDER_FLAT, false, fill);
+ }
+
+ QColor bgnd(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
+ drawGradient(reverse ? bgnd : cols[fill], reverse ? cols[fill] : bgnd, p, fade, false);
+ }
+ else if(mbi || opts.borderMenuitems)
{
int flags(Style_Raised);
- bool stdColor(!mbi || SHADE_BLEND_SELECTED!=opts.shadeMenubars);
+ bool stdColor(!mbi || (SHADE_BLEND_SELECTED!=opts.shadeMenubars && SHADE_SELECTED!=opts.shadeMenubars));
+ itsFormMode=true;
flags|=Style_Horizontal;
- if(stdColor)
- drawLightBevel(bgnd, p, r, cg, flags, round, cols[ORIGINAL_SHADE],
+ if(stdColor && opts.borderMenuitems)
+ drawLightBevel(bgnd, p, r, cg, flags, round, cols[fill],
cols, stdColor, !(mbi && IS_GLASS(opts.menubarAppearance)), WIDGET_MENU_ITEM);
else
{
@@ -5246,31 +7150,32 @@ void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, const QColorGroup &
fr.addCoords(1, 1, -1, -1);
if(fr.width()>0 && fr.height()>0)
- drawBevelGradient(cols[ORIGINAL_SHADE], true, p, fr, true,
- getWidgetShade(WIDGET_MENU_ITEM, true, false, opts.menuitemAppearance),
- getWidgetShade(WIDGET_MENU_ITEM, false, false, opts.menuitemAppearance),
- false, opts.menuitemAppearance, WIDGET_MENU_ITEM);
- drawBorder(bgnd, p, r, cg, flags, round, cols, WIDGET_OTHER, false, BORDER_FLAT, false, 0);
+ drawBevelGradient(cols[fill], p, fr, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM);
+ drawBorder(bgnd, p, r, cg, flags, round, cols, WIDGET_OTHER, false, BORDER_FLAT, false, border);
}
+ itsFormMode=false;
}
else
- drawBevelGradient(cols[ORIGINAL_SHADE], true, p, r, true,
- getWidgetShade(WIDGET_MENU_ITEM, true, false, opts.menuitemAppearance),
- getWidgetShade(WIDGET_MENU_ITEM, false, false, opts.menuitemAppearance),
- false, opts.menuitemAppearance, WIDGET_MENU_ITEM);
+ drawBevelGradient(cols[fill], p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM);
}
-void QtCurveStyle::drawProgress(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
+void QtCurveStyle::drawProgress(QPainter *p, const QRect &rx, const QColorGroup &cg, SFlags flags,
int round, const QWidget *widget) const
{
- if(r.width()<1)
+ if(rx.width()<1)
return;
+ QRect r=opts.borderProgress
+ ? QRect(rx.x()+1, rx.y()+1, rx.width()-2, rx.height()-2)
+ : rx;
int minWidth(3);
bool drawFull(r.width()>minWidth),
drawStripe(r.width()>(minWidth*1.5));
QRegion outer(r);
+ if(r.width()<3)
+ r.setWidth(3);
+
if(drawStripe)
{
int animShift=-PROGRESS_CHUNK_WIDTH;
@@ -5317,200 +7222,155 @@ void QtCurveStyle::drawProgress(QPainter *p, const QRect &r, const QColorGroup &
}
}
- if(drawFull)
- {
- flags|=Style_Raised|Style_Horizontal;
+ const QColor *use=flags&Style_Enabled || ECOLOR_BACKGROUND==opts.progressGrooveColor
+ ? itsProgressCols
+ ? itsProgressCols
+ : itsHighlightCols
+ : itsBackgroundCols;
- drawLightBevel(cg.background(), p, r, cg, flags, round, itsMenuitemCols[ORIGINAL_SHADE],
- itsMenuitemCols, true, true, WIDGET_PROGRESSBAR);
+ flags|=Style_Raised|Style_Horizontal;
- if(drawStripe && opts.stripedProgress)
- {
- p->setClipRegion(outer);
- drawLightBevel(cg.background(), p, r, cg, flags, round, itsMenuitemCols[1],
- itsMenuitemCols, true, true, WIDGET_PROGRESSBAR);
- p->setClipping(false);
- }
- }
- else
+ drawLightBevel(cg.background(), p, r, cg, flags, round, use[ORIGINAL_SHADE],
+ use, false, true, WIDGET_PROGRESSBAR);
+
+ if(drawStripe && opts.stripedProgress)
{
- p->setPen(itsMenuitemCols[QT_STD_BORDER]);
- p->setBrush(itsMenuitemCols[ORIGINAL_SHADE]);
- p->drawRect(r);
+ p->setClipRegion(outer);
+ drawLightBevel(cg.background(), p, r, cg, flags, round, use[1],
+ use, false, true, WIDGET_PROGRESSBAR);
+ p->setClipping(false);
}
- if(QTC_ROUNDED && r.width()>2 && ROUNDED_ALL!=round)
+
+ if(opts.borderProgress)
+ drawBorder(cg.background(), p, r, cg, flags, !(opts.square&SQUARE_PROGRESS) && opts.fillProgress ? ROUNDED_ALL : round,
+ use, WIDGET_PROGRESSBAR, false, BORDER_FLAT, false, PBAR_BORDER);
+ else
{
- p->setPen(midColor(cg.background(), itsMenuitemCols[QT_STD_BORDER]));
- if(!(round&CORNER_TL) || !drawFull)
- p->drawPoint(r.x(), r.y());
- if(!(round&CORNER_BL) || !drawFull)
- p->drawPoint(r.x(), r.y()+r.height()-1);
- if(!(round&CORNER_TR) || !drawFull)
- p->drawPoint(r.x()+r.width()-1, r.y());
- if(!(round&CORNER_BR) || !drawFull)
- p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-1);
+ r.addCoords(1, 1, -1, -1);
+ p->setPen(use[PBAR_BORDER]);
+ p->drawLine(r.topLeft(), r.topRight());
+ p->drawLine(r.bottomLeft(), r.bottomRight());
}
}
-void QtCurveStyle::drawBevelGradient(const QColor &base, bool increase, QPainter *p,
- const QRect &origRect, bool horiz, double shadeTop,
- double shadeBot, bool sel, EAppearance bevApp, EWidget w) const
+void QtCurveStyle::drawBevelGradient(const QColor &base, QPainter *p, const QRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const
{
+ if(IS_FLAT(bevApp) && opts.colorSelTab && sel)
+ bevApp=APPEARANCE_GRADIENT;
+
if(IS_FLAT(bevApp))
p->fillRect(origRect, base);
else
{
- EAppearance app(APPEARANCE_BEVELLED!=bevApp || WIDGET_BUTTON(w) || WIDGET_LISTVIEW_HEADER==w
- ? bevApp
- : APPEARANCE_GRADIENT);
-
- bool selected(opts.colorSelTab && (WIDGET_TAB_TOP==w || WIDGET_TAB_BOT==w) ? false : sel);
- QRect r(0, 0, horiz ? QTC_PIXMAP_DIMENSION : origRect.width(),
- horiz ? origRect.height() : QTC_PIXMAP_DIMENSION);
- QString key(createKey(horiz ? r.height() : r.width(), base.rgb(), horiz, increase,
- app2App(app, sel), w, shadeTop, shadeBot));
- QPixmap *pix(itsPixmapCache.find(key));
+ bool tab(WIDGET_TAB_TOP==w || WIDGET_TAB_BOT==w),
+ selected(tab ? false : sel);
+ EAppearance app(selected
+ ? opts.sunkenAppearance
+ : WIDGET_LISTVIEW_HEADER==w && APPEARANCE_BEVELLED==bevApp
+ ? APPEARANCE_LV_BEVELLED
+ : APPEARANCE_BEVELLED!=bevApp || WIDGET_BUTTON(w) || WIDGET_LISTVIEW_HEADER==w ||
+ WIDGET_NO_ETCH_BTN==w || WIDGET_MENU_BUTTON==w
+ ? bevApp
+ : APPEARANCE_GRADIENT);
+ QRect r(0, 0, horiz ? PIXMAP_DIMENSION : origRect.width(),
+ horiz ? origRect.height() : PIXMAP_DIMENSION);
+ QString key(createKey(horiz ? r.height() : r.width(), base.rgb(), horiz, app,
+ tab && sel && opts.colorSelTab ? CACHE_COL_SEL_TAB : CACHE_STD));
+ QPixmap *pix(itsPixmapCache.find(key));
+ bool inCache(true);
if(!pix)
{
pix=new QPixmap(r.width(), r.height());
- QPainter pixPainter(pix);
+ QPainter pixPainter(pix);
- if(!selected && (IS_GLASS(app) || APPEARANCE_SPLIT_GRADIENT==app))
- {
- if(WIDGET_TAB_BOT==w)
- {
- double t(shadeTop);
- shadeTop=shadeBot;
- shadeBot=t;
- }
+ drawBevelGradientReal(base, &pixPainter, r, horiz, sel, app, w);
+ pixPainter.end();
+ int cost(pix->width()*pix->height()*(pix->depth()/8));
- double shadeTopA(WIDGET_TAB_BOT==w
- ? 1.0
- : APPEARANCE_SPLIT_GRADIENT==app
- ? shadeTop
- : shadeTop*SHADE_GLASS_TOP_A(app, w)),
- shadeTopB(WIDGET_TAB_BOT==w
- ? 1.0
- : APPEARANCE_SPLIT_GRADIENT==app
- ? shadeTop-((shadeTop-shadeBot)*SPLIT_GRADIENT_FACTOR)
- : shadeTop*SHADE_GLASS_TOP_B(app, w)),
- shadeBotA(WIDGET_TAB_TOP==w
- ? 1.0
- : APPEARANCE_SPLIT_GRADIENT==app
- ? shadeBot+((shadeTop-shadeBot)*SPLIT_GRADIENT_FACTOR)
- : shadeBot*SHADE_GLASS_BOT_A(app)),
- shadeBotB(WIDGET_TAB_TOP==w
- ? 1.0
- : APPEARANCE_SPLIT_GRADIENT==app
- ? shadeBot
- : shadeBot*SHADE_GLASS_BOT_B(app));
-
- QColor topA, topB, botA, botB;
- QRect r1(r), r2(r), r3(r);
-
- shade(base, &topA, shadeTopA);
- shade(base, &topB, shadeTopB);
- shade(base, &botA, shadeBotA);
- shade(base, &botB, shadeBotB);
+ if(cost<itsPixmapCache.maxCost())
+ itsPixmapCache.insert(key, pix, cost);
+ else
+ inCache=false;
+ }
- if(horiz)
- {
- r1.setHeight(r1.height()/2);
- r2.setY(r2.y()+r1.height());
- }
- else
- {
- r1.setWidth(r1.width()/2);
- r2.setX(r2.x()+r1.width());
- }
- drawGradient(topA, topB, increase, &pixPainter, r1, horiz);
- drawGradient(botA, botB, increase, &pixPainter, r2, horiz);
- }
- else if(!selected && APPEARANCE_BEVELLED==app &&
- ((horiz ? r.height()
- : r.width()) > (((WIDGET_BUTTON(w) ? 2 : 1)*BEVEL_BORDER(w))+4)))
- {
- if(WIDGET_LISTVIEW_HEADER==w)
- {
- QColor bot;
- QRect r1(r), r2(r);
+ p->drawTiledPixmap(origRect, *pix);
+ if(!inCache)
+ delete pix;
+ }
+}
- if(horiz)
- {
- r2.setHeight(BEVEL_BORDER(w));
- r1.setHeight(r.height()-r2.height());
- r2.moveTop(r.y()+r1.height());
- }
- else
- {
- r2.setWidth(BEVEL_BORDER(w));
- r1.setWidth(r.width()-r2.width());
- r2.moveLeft(r.x()+r1.width());
- }
- shade(base, &bot, SHADE_BEVEL_BOT(w));
- pixPainter.fillRect(r1, base);
- drawGradient(base, bot, true, &pixPainter, r2, horiz);
- }
- else
- {
- QColor bot, midTop, midBot, top;
- QRect r1(r), r2(r), r3(r);
+void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const QRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const
+{
- if(horiz)
- {
- r1.setHeight(BEVEL_BORDER(w));
- r3.setHeight(BEVEL_BORDER(w));
- r2.setHeight(r.height()-(r1.height()+r3.height()));
- r2.moveTop(r.y()+r1.height());
- r3.moveTop(r.y()+r1.height()+r2.height());
- }
- else
- {
- r1.setWidth(BEVEL_BORDER(w));
- r3.setWidth(BEVEL_BORDER(w));
- r2.setWidth(r.width()-(r1.width()+r3.width()));
- r2.moveLeft(r.x()+r1.width());
- r3.moveLeft(r.x()+r1.width()+r2.width());
- }
+ const Gradient *grad=getGradient(app, &opts);
+ int numStops(grad->stops.size()),
+ lastPos(0),
+ size(horiz ? r.height() : r.width());
+ bool topTab(WIDGET_TAB_TOP==w),
+ botTab(WIDGET_TAB_BOT==w);
+ QColor prev;
- shade(base, &top, SHADE_BEVEL_TOP);
- shade(base, &midTop, SHADE_BEVEL_MID_TOP);
- shade(base, &midBot, SHADE_BEVEL_MID_BOT);
- shade(base, &bot, SHADE_BEVEL_BOT(w));
- drawGradient(top, midTop, true, &pixPainter, r1, horiz);
- drawGradient(midTop, midBot, true, &pixPainter, r2, horiz);
- drawGradient(midBot, bot, true, &pixPainter, r3, horiz);
- }
- }
+ if(botTab)
+ {
+ GradientStopCont::reverse_iterator it(grad->stops.rbegin()),
+ end(grad->stops.rend());
+
+ for(int i=0; it!=end; ++it, ++i)
+ {
+ QColor col;
+ int pos((int)(((1.0-(*it).pos)*size)+0.5));
+
+ if(sel && 0==i)
+ col=base;
else
- {
- QColor top,
- bot,
- baseTopCol(opts.colorSelTab && sel && (WIDGET_TAB_TOP==w || WIDGET_TAB_BOT==w)
- ? midColor(base, itsMenuitemCols[0], QTC_COLOR_SEL_TAB_FACTOR) : base);
+ shade(base, &col, opts.invertBotTab ? QMAX(INVERT_SHADE((*it).val), 0.9) : (*it).val);
+
+ if(/*sel && */opts.colorSelTab && i>0)
+ col=tint(col, itsHighlightCols[0], (1.0-(*it).pos)*(0.2+TO_ALPHA(opts.colorSelTab)));
+
+ if(i)
+ drawGradient(prev, col, p,
+ horiz
+ ? QRect(r.x(), lastPos, r.width(), pos-lastPos)
+ : QRect(lastPos, r.y(), pos-lastPos, r.height()),
+ horiz);
+ prev=col;
+ lastPos=pos;
+ }
+ }
+ else
+ {
+ GradientStopCont::const_iterator it(grad->stops.begin()),
+ end(grad->stops.end());
- if(equal(1.0, shadeTop))
- top=baseTopCol;
- else
- shade(baseTopCol, &top, shadeTop);
- if(equal(1.0, shadeBot))
- bot=base;
- else
- shade(base, &bot, shadeBot);
+ for(int i=0; it!=end; ++it, ++i)
+ {
+ QColor col;
+ int pos((int)(((*it).pos*size)+0.5));
- drawGradient(top, bot, sel || APPEARANCE_INVERTED!=app ? increase : !increase,
- &pixPainter, r, horiz);
- }
- pixPainter.end();
- itsPixmapCache.insert(key, pix, pix->width()*pix->height()*(pix->depth()/8));
+ if(/*sel && */topTab && i==numStops-1)
+ col=base;
+ else
+ shade(base, &col, WIDGET_TAB_BOT==w ? QMAX((*it).val, 0.9) : (*it).val);
+
+ if(sel && opts.colorSelTab && topTab && i<numStops-1)
+ col=tint(col, itsHighlightCols[0], (1.0-(*it).pos)*(0.2+TO_ALPHA(opts.colorSelTab)));
+
+ if(i)
+ drawGradient(prev, col, p,
+ horiz
+ ? QRect(r.x(), lastPos, r.width(), pos-lastPos)
+ : QRect(lastPos, r.y(), pos-lastPos, r.height()),
+ horiz);
+ prev=col;
+ lastPos=pos;
}
- p->drawTiledPixmap(origRect, *pix);
}
}
-void QtCurveStyle::drawGradient(const QColor &top, const QColor &bot, bool increase,
+void QtCurveStyle::drawGradient(const QColor &top, const QColor &bot,
QPainter *p, QRect const &r, bool horiz) const
{
if(r.width()>0 && r.height()>0)
@@ -5535,48 +7395,26 @@ void QtCurveStyle::drawGradient(const QColor &top, const QColor &bot, bool incre
dg(((1<<16) * (bot.green() - gTop)) / size),
db(((1<<16) * (bot.blue() - bTop)) / size);
- if(increase)
- if(horiz)
+ if(horiz)
+ {
+ for (i=0; i < size; i++)
{
- for (i=0; i < size; i++)
- {
- p->setPen(QColor(rl>>16, gl>>16, bl>>16));
- p->drawLine(rx, ry+i, rx2, ry+i);
- rl += dr;
- gl += dg;
- bl += db;
- }
+ p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->drawLine(rx, ry+i, rx2, ry+i);
+ rl += dr;
+ gl += dg;
+ bl += db;
}
- else
- for(i=0; i < size; i++)
- {
- p->setPen(QColor(rl>>16, gl>>16, bl>>16));
- p->drawLine(rx+i, ry, rx+i, ry2);
- rl += dr;
- gl += dg;
- bl += db;
- }
+ }
else
- if(horiz)
+ for(i=0; i < size; i++)
{
- for(i=size-1; i>=0; i--)
- {
- p->setPen(QColor(rl>>16, gl>>16, bl>>16));
- p->drawLine(rx, ry+i, rx2, ry+i);
- rl += dr;
- gl += dg;
- bl += db;
- }
+ p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->drawLine(rx+i, ry, rx+i, ry2);
+ rl += dr;
+ gl += dg;
+ bl += db;
}
- else
- for(i=size-1; i>=0; i--)
- {
- p->setPen(QColor(rl>>16, gl>>16, bl>>16));
- p->drawLine(rx+i, ry, rx+i, ry2);
- rl += dr;
- gl += dg;
- bl += db;
- }
}
}
}
@@ -5596,34 +7434,44 @@ void QtCurveStyle::drawSbSliderHandle(QPainter *p, const QRect &orig, const QCol
flags|=Style_Horizontal;
flags|=Style_Raised;
- drawLightBevel(p, r, cg, flags, slider
-#ifndef QTC_SIMPLE_SCROLLBARS
- || SCROLLBAR_NONE==opts.scrollbarType
+ drawLightBevel(p, r, cg, flags, (slider && !(opts.square&SQUARE_SLIDER))
+#ifndef SIMPLE_SCROLLBARS
+ || (!slider && !(opts.square&SQUARE_SB_SLIDER) && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons))
#endif
? ROUNDED_ALL : ROUNDED_NONE,
- getFill(flags, use), use, true, false, WIDGET_SB_SLIDER);
-
- const QColor *markers(/*opts.coloredMouseOver && flags&Style_MouseOver
- ? SHADE_NONE==shade ? itsMouseOverCols : itsBackgroundCols
- : */use);
- if(flags & Style_Horizontal)
- r.setX(r.x()+1);
- else
- r.setY(r.y()+1);
+ getFill(flags, use, false, SHADE_DARKEN==opts.shadeSliders), use, true, false, WIDGET_SB_SLIDER);
if(LINE_NONE!=opts.sliderThumbs && (slider || ((flags & Style_Horizontal && r.width()>=min)|| r.height()>=min)))
+ {
+ const QColor *markers(/*opts.coloredMouseOver && flags&Style_MouseOver
+ ? itsMouseOverCols
+ : */use);
+ bool horiz(flags&Style_Horizontal);
+
+ if(LINE_SUNKEN==opts.sliderThumbs)
+ if(horiz)
+ r.addCoords(0, -1, 0, 0);
+ else
+ r.addCoords(-1, 0, 0, 0);
+ else
+ r.addCoords(horiz ? 1 : 0, horiz ? 0 : 1, 0, 0);
+
switch(opts.sliderThumbs)
{
case LINE_FLAT:
- drawLines(p, r, !(flags & Style_Horizontal), 3, 5, markers, 0, 5, 0, false);
+ drawLines(p, r, !horiz, 3, 5, markers, 0, 5, opts.sliderThumbs);
break;
case LINE_SUNKEN:
- drawLines(p, r, !(flags & Style_Horizontal), 4, 3, markers, 0, 3);
+ drawLines(p, r, !horiz, 4, 3, markers, 0, 3, opts.sliderThumbs);
+ break;
+ case LINE_1DOT:
+ drawDot(p, r, markers);
break;
case LINE_DOTS:
default:
- drawDots(p, r, !(flags & Style_Horizontal), slider ? 3 : 5, slider ? 5 : 2, markers, 0, 5);
+ drawDots(p, r, !horiz, slider ? 3 : 5, slider ? 5 : 2, markers, 0, 5);
}
+ }
}
void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg,
@@ -5631,24 +7479,29 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
{
bool horiz(SLIDER_TRIANGULAR==opts.sliderStyle ? r.height()>r.width() : r.width()>r.height());
- if(SLIDER_TRIANGULAR==opts.sliderStyle || (SLIDER_ROUND==opts.sliderStyle && ROUND_FULL==opts.round))
+ if(SLIDER_TRIANGULAR==opts.sliderStyle || ((SLIDER_ROUND==opts.sliderStyle || SLIDER_ROUND_ROTATED==opts.sliderStyle) && FULLLY_ROUNDED))
{
- const QColor *use(sliderColors(/*cg, */flags));
- const QColor &fill(getFill(flags, use));
+ const QColor *use(sliderColors(/*cg, */flags)),
+ *border(flags&Style_MouseOver && (MO_GLOW==opts.coloredMouseOver ||
+ MO_COLORED==opts.coloredMouseOver)
+ ? itsMouseOverCols : use);
+ const QColor &fill(getFill(flags, use, false, SHADE_DARKEN==opts.shadeSliders));
int x(r.x()),
y(r.y()),
xo(horiz ? 8 : 0),
yo(horiz ? 0 : 8);
PrimitiveElement direction(horiz ? PE_ArrowDown : PE_ArrowRight);
bool drawLight(MO_PLASTIK!=opts.coloredMouseOver || !(flags&Style_MouseOver) ||
- (SLIDER_ROUND==opts.sliderStyle &&
+ ((SLIDER_ROUND==opts.sliderStyle || SLIDER_ROUND_ROTATED)==opts.sliderStyle &&
(SHADE_BLEND_SELECTED==opts.shadeSliders || SHADE_SELECTED==opts.shadeSliders)));
- int size(SLIDER_TRIANGULAR==opts.sliderStyle ? 15 : 13);
+ int size(SLIDER_TRIANGULAR==opts.sliderStyle ? 15 : 13),
+ borderVal(itsMouseOverCols==border ? SLIDER_MO_BORDER_VAL : BORDER_VAL(flags&Style_Enabled));
- if(horiz)
- y++;
- else
- x++;
+ if(SLIDER_ROUND_ROTATED!=opts.sliderStyle)
+ if(horiz)
+ y++;
+ else
+ x++;
QPointArray clipRegion;
@@ -5694,13 +7547,13 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
if(!tb)
p->fillRect(QRect(x, y, r.width()-(horiz ? 0 : 2), r.height()-(horiz ? 2 : 0)), cg.background());
p->setClipRegion(QRegion(clipRegion)); // , QPainter::CoordPainter);
- if(IS_FLAT(opts.appearance))
+ if(IS_FLAT(opts.sliderAppearance))
{
p->fillRect(r, fill);
- if(MO_PLASTIK==opts.coloredMouseOver && flags&Style_MouseOver)
+ if(MO_PLASTIK==opts.coloredMouseOver && flags&Style_MouseOver && !opts.colorSliderMouseOver)
{
- int col(QTC_SLIDER_MO_SHADE),
- len(QTC_SLIDER_MO_LEN);
+ int col(SLIDER_MO_SHADE),
+ len(SLIDER_MO_LEN);
if(horiz)
{
@@ -5716,28 +7569,31 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
}
else
{
- drawBevelGradient(fill, true, p, QRect(x, y, horiz ? r.width()-1 : size, horiz ? size : r.height()-1),
- horiz, SHADE_BEVEL_GRAD_LIGHT, SHADE_BEVEL_GRAD_DARK,
- false, opts.sliderAppearance);
+ drawBevelGradient(fill, p, QRect(x, y, horiz ? r.width()-1 : size, horiz ? size : r.height()-1),
+ horiz, false, opts.sliderAppearance);
- if(MO_PLASTIK==opts.coloredMouseOver && flags&Style_MouseOver)
+ if(MO_PLASTIK==opts.coloredMouseOver && flags&Style_MouseOver && !opts.colorSliderMouseOver)
{
- int col(QTC_SLIDER_MO_SHADE),
- len(QTC_SLIDER_MO_LEN);
+ int col(SLIDER_MO_SHADE),
+ len(SLIDER_MO_LEN);
if(horiz)
{
- drawBevelGradient(itsMouseOverCols[col], true, p, QRect(x+1, y+1, len, size-2),
- horiz, SHADE_BEVEL_GRAD_LIGHT, SHADE_BEVEL_GRAD_DARK, false, opts.sliderAppearance);
- drawBevelGradient(itsMouseOverCols[col], true, p, QRect(x+r.width()-(1+len), y+1, len, size-2),
- horiz,SHADE_BEVEL_GRAD_LIGHT, SHADE_BEVEL_GRAD_DARK, false, opts.sliderAppearance);
+ drawBevelGradient(itsMouseOverCols[col], p, QRect(x+1, y+1, len, size-2),
+ horiz, false, opts.sliderAppearance);
+ drawBevelGradient(itsMouseOverCols[col], p,
+ QRect(x+r.width()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len),
+ y+1, len, size-2),
+ horiz, false, opts.sliderAppearance);
}
else
{
- drawBevelGradient(itsMouseOverCols[col], true, p, QRect(x+1, y+1, size-2, len),
- horiz, SHADE_BEVEL_GRAD_LIGHT, SHADE_BEVEL_GRAD_DARK, false, opts.sliderAppearance);
- drawBevelGradient(itsMouseOverCols[col], true, p, QRect(x+1, y+r.height()-(1+len), size-2, len),
- horiz, SHADE_BEVEL_GRAD_LIGHT, SHADE_BEVEL_GRAD_DARK, false, opts.sliderAppearance);
+ drawBevelGradient(itsMouseOverCols[col], p, QRect(x+1, y+1, size-2, len),
+ horiz, false, opts.sliderAppearance);
+ drawBevelGradient(itsMouseOverCols[col], p,
+ QRect(x+1, y+r.height()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len),
+ size-2, len),
+ horiz, false, opts.sliderAppearance);
}
}
}
@@ -5769,20 +7625,20 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
light.setPoints(3, x+1, y+8, x+1, y+1, x+9, y+1);
}
- p->setPen(midColor(use[QT_STD_BORDER], cg.background()));
+ p->setPen(midColor(border[borderVal], cg.background()));
p->drawPolygon(aa);
if(drawLight)
{
p->setPen(use[APPEARANCE_DULL_GLASS==opts.sliderAppearance ? 1 : 0]);
p->drawPolyline(light);
}
- p->setPen(use[QT_STD_BORDER]);
+ p->setPen(border[borderVal]);
p->drawPolygon(clipRegion);
}
else
{
p->drawPixmap(x, y,
- *getPixmap(use[opts.coloredMouseOver && flags&Style_MouseOver ? 4 : QT_BORDER(flags&Style_Enabled)],
+ *getPixmap(border[borderVal],
horiz ? PIX_SLIDER : PIX_SLIDER_V, 0.8));
if(drawLight)
p->drawPixmap(x, y, *getPixmap(use[0], horiz ? PIX_SLIDER_LIGHT : PIX_SLIDER_LIGHT_V));
@@ -5793,10 +7649,11 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
{
QRect sr(r);
- if(horiz)
- sr.addCoords(0, 1, 0, 0);
- else
- sr.addCoords(1, 0, 0, 0);
+ if(!ROTATED_SLIDER)
+ if(horiz)
+ sr.addCoords(0, 1, 0, 0);
+ else
+ sr.addCoords(1, 0, 0, 0);
drawSbSliderHandle(p, sr, cg, flags|(horiz ? Style_Horizontal : 0), true);
}
@@ -5809,77 +7666,75 @@ void QtCurveStyle::drawSliderGroove(QPainter *p, const QRect &r, const QColorGro
QRect groove(r);
bool horiz(Qt::Horizontal==sliderWidget->orientation()),
reverse(QApplication::reverseLayout());
- const QColor &usedCol=itsSliderCols
- ? itsSliderCols[ORIGINAL_SHADE]
- : itsMouseOverCols
- ? itsMouseOverCols[ORIGINAL_SHADE]
- : itsMenuitemCols[1];
+ flags&=~Style_MouseOver;
if(horiz)
{
int dh=(groove.height()-5)>>1;
groove.addCoords(0, dh, 0, -dh);
flags|=Style_Horizontal;
+
+ if(!itsFormMode && DO_EFFECT)
+ groove.addCoords(0, -1, 0, 1);
}
else
{
int dw=(groove.width()-5)>>1;
groove.addCoords(dw, 0, -dw, 0);
+
+ if(!itsFormMode && DO_EFFECT)
+ groove.addCoords(-1, 0, 1, 0);
}
- drawLightBevel(p, groove, cg, flags|Style_Down, ROUNDED_ALL, itsBackgroundCols[flags&Style_Enabled ? 2 : ORIGINAL_SHADE],
+ drawLightBevel(p, groove, cg, flags, opts.square&SQUARE_SLIDER ? ROUNDED_NONE : ROUNDED_ALL,
+ itsBackgroundCols[flags&Style_Enabled ? 2 : ORIGINAL_SHADE],
itsBackgroundCols, true, true, WIDGET_SLIDER_TROUGH);
- if(opts.fillSlider && sliderWidget->maxValue()!=sliderWidget->minValue() && flags&Style_Enabled)
+ if(opts.fillSlider && (horiz ? sliderWidget->value()>0 : sliderWidget->value()<sliderWidget->maxValue()) &&
+ sliderWidget->maxValue()!=sliderWidget->minValue() && flags&Style_Enabled)
{
- QRect used(groove);
- int pos((int)(((double)(horiz ? groove.width() : groove.height()) /
+ QRect used(groove);
+ int pos((int)(((double)(horiz ? groove.width() : groove.height()) /
(sliderWidget->maxValue()-sliderWidget->minValue())) *
- (sliderWidget->value() - sliderWidget->minValue())));
-
- if(horiz)
+ (sliderWidget->value() - sliderWidget->minValue())));
+ if(pos>0)
{
- pos+=(groove.width()>10 && pos<(groove.width()/2)) ? 3 : 0;
- if(reverse)
- used.addCoords(groove.width()-pos, 0, 0, 0);
+ const QColor *usedCols=itsSliderCols ? itsSliderCols : itsHighlightCols;
+
+ if(horiz)
+ {
+ pos+=(groove.width()>10 && pos<(groove.width()/2)) ? 3 : 0;
+ if(reverse)
+ used.addCoords(groove.width()-pos, 0, 0, 0);
+ else
+ used.addCoords(0, 0, -(groove.width()-pos), 0);
+ }
else
- used.addCoords(0, 0, -(groove.width()-pos), 0);
- }
- else
- {
- pos+=(groove.height()>10 && pos<(groove.height()/2)) ? 3 : 0;
- used.addCoords(0, pos, 0, 0);
+ {
+ pos+=(groove.height()>10 && pos<(groove.height()/2)) ? 3 : 0;
+ used.addCoords(0, pos, 0, 0);
+ }
+ if(used.height()>0 && used.width()>0)
+ drawLightBevel(p, used, cg, flags, opts.square&SQUARE_SLIDER ? ROUNDED_NONE : ROUNDED_ALL,
+ usedCols[ORIGINAL_SHADE], usedCols, true, true, WIDGET_FILLED_SLIDER_TROUGH);
}
- if(used.height()>0 && used.width()>0)
- drawLightBevel(p, used, cg, flags|Style_Down, ROUNDED_ALL, usedCol, NULL,
- true, true, WIDGET_SLIDER_TROUGH);
}
}
void QtCurveStyle::drawMenuOrToolBarBackground(QPainter *p, const QRect &r, const QColorGroup &cg,
bool menu, bool horiz) const
{
+ if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars)
+ return;
+
+ QRect rx(r);
EAppearance app(menu ? opts.menubarAppearance : opts.toolbarAppearance);
- QColor color(menu && itsActive ? itsMenubarCols[ORIGINAL_SHADE] : cg.background());
- double from(0.0), to(0.0);
+ QColor color(menu ? menuColors(cg, itsActive)[ORIGINAL_SHADE] : cg.background());
- switch(app)
- {
- default:
- case APPEARANCE_GRADIENT:
- from=SHADE_MENU_LIGHT;
- to=SHADE_MENU_DARK;
- break;
- case APPEARANCE_FLAT:
- case APPEARANCE_RAISED:
- break;
- case APPEARANCE_SHINY_GLASS:
- case APPEARANCE_DULL_GLASS:
- from=SHADE_BEVEL_GRAD_LIGHT;
- to=SHADE_BEVEL_GRAD_DARK;
- }
+ if(menu && BLEND_TITLEBAR)
+ rx.addCoords(0, -qtcGetWindowBorderSize().titleHeight, 0, 0);
- drawBevelGradient(color, true, p, r, horiz, from, to, false, app);
+ drawBevelGradient(color, p, rx, horiz, false, app);
}
void QtCurveStyle::drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags, bool tb,
@@ -5896,6 +7751,11 @@ void QtCurveStyle::drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags,
switch(handles)
{
+ case LINE_NONE:
+ break;
+ case LINE_1DOT:
+ drawDot(p, r, border);
+ break;
case LINE_DOTS:
drawDots(p, r, !(flags & Style_Horizontal), 2,
APP_KICKER==itsThemedApp ? 1 : tb ? 5 : 3, border,
@@ -5907,37 +7767,53 @@ void QtCurveStyle::drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags,
QRect r1(r.x()+(tb ? 2 : (r.width()-6)/2), r.y(), 3, r.height());
drawLines(p, r1, true, (r.height()-8)/2,
- tb ? 0 : (r.width()-5)/2, border, 0, 5, 0);
+ tb ? 0 : (r.width()-5)/2, border, 0, 5, handles);
}
else
{
QRect r1(r.x(), r.y()+(tb ? 2 : (r.height()-6)/2), r.width(), 3);
drawLines(p, r1, false, (r.width()-8)/2,
- tb ? 0 : (r.height()-5)/2, border, 0, 5, 0);
+ tb ? 0 : (r.height()-5)/2, border, 0, 5, handles);
}
break;
case LINE_FLAT:
drawLines(p, r, !(flags & Style_Horizontal), 2,
APP_KICKER==itsThemedApp ? 1 : tb ? 4 : 2, border,
- APP_KICKER==itsThemedApp ? 1 : tb ? -2 : 0, 4, 0, false);
+ APP_KICKER==itsThemedApp ? 1 : tb ? -2 : 0, 4, handles);
break;
default:
drawLines(p, r, !(flags & Style_Horizontal), 2,
APP_KICKER==itsThemedApp ? 1 : tb ? 4 : 2, border,
- APP_KICKER==itsThemedApp ? 1 : tb ? -2 : 0, 3);
+ APP_KICKER==itsThemedApp ? 1 : tb ? -2 : 0, 3, handles);
}
}
+void QtCurveStyle::drawHighlight(QPainter *p, const QRect &r, const QColorGroup &cg, bool horiz, bool inc) const
+{
+ QColor col1(midColor(cg.background(), itsMouseOverCols[ORIGINAL_SHADE]));
+ QRect r2(r);
+
+ p->setPen(inc ? col1 : itsMouseOverCols[ORIGINAL_SHADE]);
+ p->drawLine(r2.x(), r2.y(), r2.x()+(horiz ? r2.width()-1 : 0), r2.y()+(horiz ? 0 : r2.height()-1));
+ p->setPen(inc ? itsMouseOverCols[ORIGINAL_SHADE] : col1);
+ r2.addCoords(horiz ? 0 : 1, horiz ? 1 : 0, horiz ? 0 : 1, horiz ? 1 : 0);
+ p->drawLine(r2.x(), r2.y(), r2.x()+(horiz ? r2.width()-1 : 0), r2.y()+(horiz ? 0 : r2.height()-1));
+}
+
void QtCurveStyle::shadeColors(const QColor &base, QColor *vals) const
{
- QTC_SHADES
+ SHADES
+
+ bool useCustom(USE_CUSTOM_SHADES(opts));
+ double hl=TO_FACTOR(opts.highlightFactor);
for(int i=0; i<NUM_STD_SHADES; ++i)
- shade(base, &vals[i], QTC_SHADE(opts.contrast, i));
- shade(base, &vals[SHADE_ORIG_HIGHLIGHT], opts.highlightFactor);
- shade(vals[4], &vals[SHADE_4_HIGHLIGHT], opts.highlightFactor);
- shade(vals[2], &vals[SHADE_2_HIGHLIGHT], opts.highlightFactor);
+ shade(base, &vals[i], useCustom ? opts.customShades[i] : SHADE(opts.contrast, i));
+
+ shade(base, &vals[SHADE_ORIG_HIGHLIGHT], hl);
+ shade(vals[4], &vals[SHADE_4_HIGHLIGHT], hl);
+ shade(vals[2], &vals[SHADE_2_HIGHLIGHT], hl);
vals[ORIGINAL_SHADE]=base;
}
@@ -5952,10 +7828,17 @@ const QColor * QtCurveStyle::buttonColors(const QColorGroup &cg) const
return itsButtonCols;
}
+const QColor * QtCurveStyle::checkRadioColors(const QColorGroup &cg, SFlags flags) const
+{
+ return opts.crColor && flags&Style_Enabled && (flags&Style_On || !(flags&Style_Off))
+ ? itsCheckRadioSelCols
+ : buttonColors(cg);
+}
+
const QColor * QtCurveStyle::sliderColors(/*const QColorGroup &cg, */ SFlags flags) const
{
return (flags&Style_Enabled)
- ? SHADE_NONE!=opts.shadeSliders //&& cg.button()==itsButtonCols[ORIGINAL_SHADE]
+ ? SHADE_NONE!=opts.shadeSliders &&itsSliderCols && (!opts.colorSliderMouseOver || flags&Style_MouseOver)
? itsSliderCols
: itsButtonCols // buttonColors(cg)
: itsBackgroundCols;
@@ -5989,7 +7872,7 @@ const QColor * QtCurveStyle::getSidebarButtons() const
else
{
itsSidebarButtonsCols=new QColor [TOTAL_SHADES+1];
- shadeColors(midColor(itsMenuitemCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]),
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]),
itsSidebarButtonsCols);
}
}
@@ -6004,10 +7887,13 @@ void QtCurveStyle::setMenuColors(const QColorGroup &cg)
case SHADE_NONE:
memcpy(itsMenubarCols, itsBackgroundCols, sizeof(QColor)*(TOTAL_SHADES+1));
break;
- case SHADE_BLEND_SELECTED: // For menubars we dont actually blend...
+ case SHADE_BLEND_SELECTED:
+ shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsBackgroundCols[ORIGINAL_SHADE]), itsMenubarCols);
+ break;
+ case SHADE_SELECTED:
shadeColors(IS_GLASS(opts.appearance)
- ? shade(itsMenuitemCols[ORIGINAL_SHADE], MENUBAR_GLASS_SELECTED_DARK_FACTOR)
- : itsMenuitemCols[ORIGINAL_SHADE],
+ ? shade(itsHighlightCols[ORIGINAL_SHADE], MENUBAR_GLASS_SELECTED_DARK_FACTOR)
+ : itsHighlightCols[ORIGINAL_SHADE],
itsMenubarCols);
break;
case SHADE_CUSTOM:
@@ -6015,9 +7901,233 @@ void QtCurveStyle::setMenuColors(const QColorGroup &cg)
break;
case SHADE_DARKEN:
shadeColors(shade(cg.background(), MENUBAR_DARK_FACTOR), itsMenubarCols);
+ break;
+ case SHADE_WINDOW_BORDER:
+ break;
+ }
+}
+
+const QColor * QtCurveStyle::menuColors(const QColorGroup &cg, bool active) const
+{
+ return SHADE_WINDOW_BORDER==opts.shadeMenubars
+ ? getMdiColors(cg, active)
+ : SHADE_NONE==opts.shadeMenubars || (opts.shadeMenubarOnlyWhenActive && !active)
+ ? backgroundColors(cg)
+ : itsMenubarCols;
+}
+
+void QtCurveStyle::setDecorationColors(bool init)
+{
+ if(!readKdeGlobals() && !init)
+ return;
+
+ if(opts.coloredMouseOver)
+ {
+ if(!itsMouseOverCols)
+ itsMouseOverCols=new QColor [TOTAL_SHADES+1];
+ shadeColors(kdeSettings.hover, itsMouseOverCols);
+ }
+ shadeColors(kdeSettings.focus, itsFocusCols);
+}
+
+const QColor * QtCurveStyle::getMdiColors(const QColorGroup &cg, bool active) const
+{
+ if(!itsActiveMdiColors)
+ {
+ itsActiveMdiTextColor=cg.text();
+ itsMdiTextColor=cg.text();
+
+ // Try to read kwin's settings...
+ if(useQt3Settings())
+ {
+ QFile f(QDir::homeDirPath()+"/.qt/qtrc");
+
+ if(f.open(IO_ReadOnly))
+ {
+ QTextStream in(&f);
+ bool inPal(false);
+
+ while (!in.atEnd())
+ {
+ QString line(in.readLine());
+
+ if(inPal)
+ {
+ if(!itsActiveMdiColors && 0==line.find("activeBackground=#", false))
+ {
+ QColor col;
+
+ setRgb(&col, line.mid(17).latin1());
+
+ if(col!=itsBackgroundCols[ORIGINAL_SHADE])
+ {
+ itsActiveMdiColors=new QColor [TOTAL_SHADES+1];
+ shadeColors(col, itsActiveMdiColors);
+ }
+ }
+ else if(!itsMdiColors && 0==line.find("inactiveBackground=#", false))
+ {
+ QColor col;
+
+ setRgb(&col, line.mid(19).latin1());
+ if(col!=itsBackgroundCols[ORIGINAL_SHADE])
+ {
+ itsMdiColors=new QColor [TOTAL_SHADES+1];
+ shadeColors(col, itsMdiColors);
+ }
+ }
+ else if(0==line.find("activeForeground=#", false))
+ setRgb(&itsActiveMdiTextColor, line.mid(17).latin1());
+ else if(0==line.find("inactiveForeground=#", false))
+ setRgb(&itsMdiTextColor, line.mid(19).latin1());
+ else if (-1!=line.find('['))
+ break;
+ }
+ else if(0==line.find("[KWinPalette]", false))
+ inPal=true;
+ }
+ f.close();
+ }
+ }
+ else // KDE4
+ {
+ QFile f(kdeHome(false)+"/share/config/kdeglobals");
+
+ if(f.open(IO_ReadOnly))
+ {
+ QTextStream in(&f);
+ bool inPal(false);
+
+ while (!in.atEnd())
+ {
+ QString line(in.readLine());
+
+ if(inPal)
+ {
+ if(!itsActiveMdiColors && 0==line.find("activeBackground=", false))
+ {
+ QColor col;
+
+ setRgb(&col, QStringList::split(",", line.mid(17)));
+
+ if(col!=itsBackgroundCols[ORIGINAL_SHADE])
+ {
+ itsActiveMdiColors=new QColor [TOTAL_SHADES+1];
+ shadeColors(col, itsActiveMdiColors);
+ }
+ }
+ else if(!itsMdiColors && 0==line.find("inactiveBackground=", false))
+ {
+ QColor col;
+
+ setRgb(&col, QStringList::split(",", line.mid(19)));
+ if(col!=itsBackgroundCols[ORIGINAL_SHADE])
+ {
+ itsMdiColors=new QColor [TOTAL_SHADES+1];
+ shadeColors(col, itsMdiColors);
+ }
+ }
+ else if(0==line.find("activeForeground=", false))
+ setRgb(&itsActiveMdiTextColor, QStringList::split(",", line.mid(17)));
+ else if(0==line.find("inactiveForeground=", false))
+ setRgb(&itsMdiTextColor, QStringList::split(",", line.mid(19)));
+ else if (-1!=line.find('['))
+ break;
+ }
+ else if(0==line.find("[WM]", false))
+ inPal=true;
+ }
+ f.close();
+ }
+ }
+
+ if(opts.shadeMenubarOnlyWhenActive && SHADE_WINDOW_BORDER==opts.shadeMenubars &&
+ itsActiveMdiColors[ORIGINAL_SHADE]==itsMdiColors[ORIGINAL_SHADE])
+ opts.shadeMenubarOnlyWhenActive=false;
+
+ if(!itsActiveMdiColors)
+ itsActiveMdiColors=(QColor *)itsBackgroundCols;
+ if(!itsMdiColors)
+ itsMdiColors=(QColor *)itsBackgroundCols;
}
+
+ return active ? itsActiveMdiColors : itsMdiColors;
}
+#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
+void QtCurveStyle::readMdiPositions() const
+{
+ if(0==itsMdiButtons[0].size() && 0==itsMdiButtons[1].size())
+ {
+ // Set defaults...
+ itsMdiButtons[0].append(SC_TitleBarSysMenu);
+ itsMdiButtons[0].append(SC_TitleBarShadeButton);
+
+ //itsMdiButtons[1].append(SC_TitleBarContextHelpButton);
+ itsMdiButtons[1].append(SC_TitleBarMinButton);
+ itsMdiButtons[1].append(SC_TitleBarMaxButton);
+ itsMdiButtons[1].append(WINDOWTITLE_SPACER);
+ itsMdiButtons[1].append(SC_TitleBarCloseButton);
+
+ // Read in KWin settings...
+ QFile f(kdeHome(useQt3Settings())+"/share/config/kwinrc");
+
+ if(f.open(IO_ReadOnly))
+ {
+ QTextStream in(&f);
+ bool inStyle(false);
+
+ while (!in.atEnd())
+ {
+ QString line(in.readLine());
+
+ if(inStyle)
+ {
+ if(0==line.find("ButtonsOnLeft=", false))
+ {
+ itsMdiButtons[0].clear();
+ parseWindowLine(line.mid(14), itsMdiButtons[0]);
+ }
+ else if(0==line.find("ButtonsOnRight=", false))
+ {
+ itsMdiButtons[1].clear();
+ parseWindowLine(line.mid(15), itsMdiButtons[1]);
+ }
+ else if (-1!=line.find('['))
+ break;
+ }
+ else if(0==line.find("[Style]", false))
+ inStyle=true;
+ }
+ f.close();
+ }
+
+ // Designer uses shade buttons, not min/max - so if we dont have shade in our kwin config. then add this
+ // button near the max button...
+ if(-1==itsMdiButtons[0].findIndex(SC_TitleBarShadeButton) && -1==itsMdiButtons[1].findIndex(SC_TitleBarShadeButton))
+ {
+ int maxPos=itsMdiButtons[0].findIndex(SC_TitleBarMaxButton);
+
+ if(-1==maxPos) // Left doesnt have max button, assume right does and add shade there
+ {
+ int minPos=itsMdiButtons[1].findIndex(SC_TitleBarMinButton);
+ maxPos=itsMdiButtons[1].findIndex(SC_TitleBarMaxButton);
+
+ itsMdiButtons[1].insert(itsMdiButtons[1].find(minPos<maxPos ? (minPos==-1 ? 0 : minPos)
+ : (maxPos==-1 ? 0 : maxPos)), SC_TitleBarShadeButton);
+ }
+ else // Add to left button
+ {
+ int minPos=itsMdiButtons[0].findIndex(SC_TitleBarMinButton);
+
+ itsMdiButtons[1].insert(itsMdiButtons[1].find(minPos>maxPos ? (minPos==-1 ? 0 : minPos)
+ : (maxPos==-1 ? 0 : maxPos)), SC_TitleBarShadeButton);
+ }
+ }
+ }
+}
+#endif
+
bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
{
if(!itsHoverWidget || !itsHoverWidget->isShown() || !itsHoverWidget->isVisible())
@@ -6101,7 +8211,7 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
}
else
{
-#if KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
+#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
QToolButton *tb(::qt_cast<QToolButton *>(itsHoverWidget));
if(tb)
@@ -6110,8 +8220,8 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
return HOVER_KICKER==itsHover;
}
else
- {
#endif
+ {
QHeader *hd(::qt_cast<QHeader *>(itsHoverWidget));
if(hd)
@@ -6125,9 +8235,9 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
bool redraw(false);
itsHover=rect.contains(pos) ? HOVER_HEADER : HOVER_NONE;
- itsHoverSect=QTC_NO_SECT;
+ itsHoverSect=NO_SECT;
- for(s=0; s<hd->count() && (QTC_NO_SECT==itsHoverSect || !redraw); ++s)
+ for(s=0; s<hd->count() && (NO_SECT==itsHoverSect || !redraw); ++s)
{
QRect r(hd->sectionRect(s));
bool hasNew(r.contains(pos));
@@ -6161,12 +8271,13 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
else if(down.contains(pos))
itsHover=HOVER_SW_DOWN;
else
- itsHover=HOVER_NONE;
+ itsHover=HOVER_SW_ENTRY;
return (HOVER_SW_UP==itsHover && !up.contains(itsOldPos)) ||
(HOVER_SW_UP!=itsHover && up.contains(itsOldPos)) ||
(HOVER_SW_DOWN==itsHover && !down.contains(itsOldPos)) ||
- (HOVER_SW_DOWN!=itsHover && down.contains(itsOldPos));
+ (HOVER_SW_DOWN!=itsHover && down.contains(itsOldPos)) ||
+ (HOVER_SW_ENTRY==itsHover);
}
else
{
@@ -6202,23 +8313,32 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
if(arrow.contains(pos))
itsHover=HOVER_CB_ARROW;
else
- itsHover=HOVER_NONE;
+ {
+ QRect r(cb->rect());
+ if(QApplication::reverseLayout())
+ r.addCoords(6, 0, 0, 0);
+ else
+ r.addCoords(0, 0, -6, 0);
+ if(DO_EFFECT && opts.etchEntry)
+ r.addCoords(1, 0, -1, 0);
+ if(r.contains(pos))
+ itsHover=HOVER_CB_ENTRY;
+ else
+ itsHover=HOVER_NONE;
+ }
}
return (HOVER_CB_ARROW==itsHover && !arrow.contains(itsOldPos)) ||
- (HOVER_CB_ARROW!=itsHover && arrow.contains(itsOldPos));
+ (HOVER_CB_ARROW!=itsHover && arrow.contains(itsOldPos)) ||
+ (HOVER_CB_ENTRY==itsHover);
}
else
return itsOldPos==QPoint(-1, -1);
}
}
-#if KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
}
-#endif
-#if KDE_VERSION >= 0x30400
}
-#endif
}
#if QT_VERSION >= 0x030200
}
@@ -6228,19 +8348,19 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
return false;
}
-const QColor & QtCurveStyle::getFill(SFlags flags, const QColor *use) const
+const QColor & QtCurveStyle::getFill(SFlags flags, const QColor *use, bool cr, bool darker) const
{
return !(flags&Style_Enabled)
- ? use[ORIGINAL_SHADE]
+ ? use[darker ? 2 : ORIGINAL_SHADE]
: flags&Style_Down
- ? use[4]
+ ? use[darker ? 5 : 4]
: flags&Style_MouseOver
- ? flags&(Style_On | Style_Sunken)
- ? use[SHADE_4_HIGHLIGHT]
- : use[SHADE_ORIG_HIGHLIGHT]
- : flags&(Style_On | Style_Sunken)
- ? use[4]
- : use[ORIGINAL_SHADE];
+ ? !cr && (flags&(Style_On | Style_Sunken))
+ ? use[darker ? 3 : SHADE_4_HIGHLIGHT]
+ : use[darker ? SHADE_2_HIGHLIGHT : SHADE_ORIG_HIGHLIGHT]
+ : !cr && (flags&(Style_On | Style_Sunken))
+ ? use[darker ? 5 : 4]
+ : use[darker ? 2 : ORIGINAL_SHADE];
}
const QColor & QtCurveStyle::getTabFill(bool current, bool highlight, const QColor *use) const
@@ -6252,6 +8372,59 @@ const QColor & QtCurveStyle::getTabFill(bool current, bool highlight, const QCol
: use[2];
}
+const QColor & QtCurveStyle::menuStripeCol() const
+{
+ switch(opts.menuStripe)
+ {
+ default:
+ case SHADE_NONE:
+ return itsBackgroundCols[ORIGINAL_SHADE];
+ case SHADE_CUSTOM:
+ return opts.customMenuStripeColor;
+ case SHADE_BLEND_SELECTED:
+ // Hack! Use opts.customMenuStripeColor to store this setting!
+ if(IS_BLACK(opts.customMenuStripeColor))
+ opts.customMenuStripeColor=midColor(itsHighlightCols[ORIGINAL_SHADE],
+ opts.lighterPopupMenuBgnd<0
+ ? itsLighterPopupMenuBgndCol
+ : itsBackgroundCols[ORIGINAL_SHADE]);
+ return opts.customMenuStripeColor;
+ case SHADE_SELECTED:
+ return itsHighlightCols[MENU_STRIPE_SHADE];
+ case SHADE_DARKEN:
+ return USE_LIGHTER_POPUP_MENU
+ ? itsLighterPopupMenuBgndCol
+ : itsBackgroundCols[MENU_STRIPE_SHADE];
+ }
+}
+
+const QColor & QtCurveStyle::checkRadioCol(SFlags flags, const QColorGroup &cg) const
+{
+ if(flags&MENU_ITEM)
+ return flags&Style_Enabled && flags&Style_Active && opts.useHighlightForMenu
+ ? cg.highlightedText()
+ : cg.foreground();
+
+ return flags&Style_Enabled
+ ? itsCheckRadioCol
+ : opts.crButton
+ ? cg.buttonText()
+ : cg.text();
+}
+
+QColor QtCurveStyle::shade(const QColor &a, float k) const
+{
+ QColor mod;
+
+ ::shade(&opts, a, &mod, k);
+ return mod;
+}
+
+void QtCurveStyle::shade(const color &ca, color *cb, double k) const
+{
+ ::shade(&opts, ca, cb, k);
+}
+
QPixmap * QtCurveStyle::getPixelPixmap(const QColor col) const
{
QRgb rgb(col.rgb());
@@ -6274,6 +8447,68 @@ QPixmap * QtCurveStyle::getPixelPixmap(const QColor col) const
return pix;
}
+QPixmap * QtCurveStyle::createStripePixmap(const QColor &col, bool forWindow) const
+{
+ QRgb rgb(col.rgb());
+ QString key(createKey(rgb, forWindow ? 'S' : 's'));
+
+ QPixmap *pix=itsPixmapCache.find(key);
+
+ if(!pix)
+ {
+ QColor col2(shade(col, BGND_STRIPE_SHADE));
+ int i,
+ adjust=forWindow ? qtcGetWindowBorderSize().titleHeight%4 : 0;
+
+ pix=new QPixmap(64, 64);
+ pix->fill(col.rgb());
+
+ QPainter p;
+ p.begin(pix);
+ p.setPen(QColor((3*col.red()+col2.red())/4,
+ (3*col.green()+col2.green())/4,
+ (3*col.blue()+col2.blue())/4));
+
+ for (i=1; i<68; i+=4)
+ {
+ p.drawLine(0, i-adjust, 63, i-adjust);
+ p.drawLine(0, i+2-adjust, 63, i+2-adjust);
+ }
+ p.setPen(col2);
+ for (i=2; i<67; i+=4)
+ p.drawLine(0, i-adjust, 63, i-adjust);
+ p.end();
+ }
+
+ return pix;
+}
+
+static QImage rotateImage(const QImage &img, double angle=90.0)
+{
+ QWMatrix matrix;
+ matrix.translate(img.width()/2, img.height()/2);
+ matrix.rotate(angle);
+
+ QRect newRect(matrix.mapRect(QRect(0, 0, img.width(), img.height())));
+
+ return img.xForm(QWMatrix(matrix.m11(), matrix.m12(), matrix.m21(), matrix.m22(),
+ matrix.dx() - newRect.left(), matrix.dy() - newRect.top()));
+}
+
+static void recolour(QImage &img, const QColor &col, double shade)
+{
+ if (img.depth()<32)
+ img=img.convertDepth(32);
+
+ adjustPix(img.bits(), 4, img.width(), img.height(), img.bytesPerLine(), col.red(), col.green(), col.blue(), shade);
+}
+
+void QtCurveStyle::drawDot(QPainter *p, const QRect &r, const QColor *cols) const
+{
+ QPixmap *pix=getPixmap(cols[STD_BORDER], PIX_DOT, 0.9);
+ p->drawPixmap(r.x()+((r.width()-pix->width())>>1), r.y()+((r.height()-pix->height())>>1), *pix);
+}
+
QPixmap * QtCurveStyle::getPixmap(const QColor col, EPixmap p, double shade) const
{
QRgb rgb(col.rgb());
@@ -6291,11 +8526,14 @@ QPixmap * QtCurveStyle::getPixmap(const QColor col, EPixmap p, double shade) con
case PIX_RADIO_BORDER:
img.loadFromData(qembed_findData("radio_frame.png"));
break;
+ case PIX_RADIO_INNER:
+ img.loadFromData(qembed_findData("radio_inner.png"));
+ break;
case PIX_RADIO_LIGHT:
img.loadFromData(qembed_findData("radio_light.png"));
break;
case PIX_RADIO_ON:
- img.loadFromData(qembed_findData("radio_on.png"));
+ img.loadFromData(qembed_findData(opts.smallRadio ? "radio_on_small.png" : "radio_on.png"));
break;
case PIX_CHECK:
img.loadFromData(qembed_findData(opts.xCheck ? "check_x_on.png" : "check_on.png"));
@@ -6307,18 +8545,24 @@ QPixmap * QtCurveStyle::getPixmap(const QColor col, EPixmap p, double shade) con
img.loadFromData(qembed_findData("slider_light.png"));
break;
case PIX_SLIDER_V:
- img.loadFromData(qembed_findData("slider_v.png"));
+ img.loadFromData(qembed_findData("slider.png"));
+ img=rotateImage(img);
break;
case PIX_SLIDER_LIGHT_V:
- img.loadFromData(qembed_findData("slider_light_v.png"));
+ img.loadFromData(qembed_findData("slider_light.png"));
+ img=rotateImage(img).mirror(true, false);
+ break;
+ case PIX_DOT:
+ img.loadFromData(qembed_findData("dot.png"));
+ break;
+ default:
break;
}
if (img.depth()<32)
img=img.convertDepth(32);
- adjustPix(img.bits(), 4, img.width(), img.height(), img.bytesPerLine(), col.red(),
- col.green(), col.blue(), shade);
+ adjustPix(img.bits(), 4, img.width(), img.height(), img.bytesPerLine(), col.red(), col.green(), col.blue(), shade);
pix->convertFromImage(img);
itsPixmapCache.insert(key, pix, pix->depth()/8);
}
@@ -6331,21 +8575,58 @@ void QtCurveStyle::setSbType()
switch(opts.scrollbarType)
{
case SCROLLBAR_KDE:
- this->setScrollBarType(KStyle::ThreeButtonScrollBar);
+ this->setScrollBarType(BASE_STYLE::ThreeButtonScrollBar);
break;
default:
case SCROLLBAR_WINDOWS:
- this->setScrollBarType(KStyle::WindowsStyleScrollBar);
+ this->setScrollBarType(BASE_STYLE::WindowsStyleScrollBar);
break;
case SCROLLBAR_PLATINUM:
- this->setScrollBarType(KStyle::PlatinumStyleScrollBar);
+ this->setScrollBarType(BASE_STYLE::PlatinumStyleScrollBar);
break;
case SCROLLBAR_NEXT:
- this->setScrollBarType(KStyle::NextStyleScrollBar);
+ this->setScrollBarType(BASE_STYLE::NextStyleScrollBar);
break;
}
}
+void QtCurveStyle::resetHover()
+{
+ itsIsSpecialHover=false;
+ itsOldPos.setX(-1);
+ itsOldPos.setY(-1);
+ itsHoverWidget=0L;
+ itsHoverSect=NO_SECT;
+ itsHover=HOVER_NONE;
+ itsHoverTab=0L;
+}
+
+struct QtcMenuBar : public QMenuBar
+{
+ bool itemUnderPos(const QPoint &pos)
+ {
+ return -1!=itemAtPos(pos);
+ }
+};
+
+bool QtCurveStyle::isWindowDragWidget(QObject *o, const QPoint &pos)
+{
+ return opts.windowDrag &&
+ (//qobject_cast<QDialog*>(o) ||
+ (::qt_cast<QMenuBar*>(o) && (pos.isNull() || !((QtcMenuBar *)o)->itemUnderPos(pos)))
+ //|| qobject_cast<QGroupBox*>(o)
+ //|| (o->inherits("QToolButton") && !static_cast<QWidget*>(o)->isEnabled())
+// || qobject_cast<QToolBar*>(o)
+ //|| qobject_cast<QDockWidget*>(o)
+
+// || ((*appType == Hacks::SMPlayer) && o->inherits(SMPlayerVideoWidget))
+// || ((*appType == Hacks::Dragon) && o->inherits(DragonVideoWidget))
+
+// || o->inherits("QStatusBar")
+// || (o->inherits("QLabel") && o->parent() && o->parent()->inherits("QStatusBar"))
+ );
+}
+
void QtCurveStyle::updateProgressPos()
{
// Taken from lipstik!
@@ -6354,19 +8635,19 @@ void QtCurveStyle::updateProgressPos()
bool visible(false);
for (; it!=end; ++it)
{
- if (!::qt_cast<QProgressBar*>(it.key()))
- continue;
-
QProgressBar *pb(::qt_cast<QProgressBar*>(it.key()));
- if (it.key() -> isEnabled() && pb -> progress()!=pb->totalSteps())
+ if (!pb)
+ continue;
+
+ if(pb->isEnabled() && pb->progress()!=pb->totalSteps())
{
// update animation Offset of the current Widget
it.data() = (it.data() + (QApplication::reverseLayout() ? -1 : 1))
% (PROGRESS_CHUNK_WIDTH*2);
- it.key()->update();
+ pb->update();
}
- if (it.key()->isVisible())
+ if(pb->isVisible())
visible = true;
}
if (!visible)
@@ -6391,4 +8672,10 @@ void QtCurveStyle::khtmlWidgetDestroyed(QObject *o)
itsKhtmlWidgets.remove(static_cast<const QWidget *>(o));
}
+void QtCurveStyle::hoverWidgetDestroyed(QObject *o)
+{
+ if(o==itsHoverWidget)
+ resetHover();
+}
+
#include "qtcurve.moc"
diff --git a/style/qtcurve.h b/style/qtcurve.h
index f021dd3..cccfb8f 100644
--- a/style/qtcurve.h
+++ b/style/qtcurve.h
@@ -2,7 +2,7 @@
#define __QTCURVE_H__
/*
- QtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
+ QtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -51,31 +51,30 @@
*/
#include "config.h"
+#ifdef QTC_QT_ONLY
+#include "qtc_kstyle.h"
+#else
#include <kdeversion.h>
#include <kstyle.h>
+#endif
#include <qcolor.h>
#include <qpoint.h>
#include <qpalette.h>
#include <qpixmap.h>
#include <qcache.h>
+#include <qvaluelist.h>
#include "common.h"
class QTimer;
class QSlider;
-class HighContrastStyle : public KStyle
-{
- Q_OBJECT
-
- public:
-
- HighContrastStyle();
- virtual ~HighContrastStyle() { }
-
- const char * className();
-};
+#ifdef QTC_QT_ONLY
+#define BASE_STYLE QtCKStyle
+#else
+#define BASE_STYLE KStyle
+#endif
-class QtCurveStyle : public HighContrastStyle
+class QtCurveStyle : public BASE_STYLE
{
Q_OBJECT
@@ -96,6 +95,8 @@ class QtCurveStyle : public HighContrastStyle
APP_TORA,
APP_KONTACT,
APP_OPERA,
+ APP_SYSTEMSETTINGS,
+ APP_KATE,
APP_OTHER
};
@@ -112,14 +113,29 @@ class QtCurveStyle : public HighContrastStyle
HOVER_KICKER,
HOVER_SW_UP,
HOVER_SW_DOWN,
- HOVER_CB_ARROW
+ HOVER_SW_ENTRY,
+ HOVER_CB_ARROW,
+ HOVER_CB_ENTRY
};
+ enum EntryColor
+ {
+ ENTRY_FOCUS,
+ ENTRY_MOUSE_OVER,
+ ENTRY_NONE
+ };
+
+#ifdef QTC_STYLE_SUPPORT
QtCurveStyle(const QString &name=QString());
+#else
+ QtCurveStyle();
+#endif
+
virtual ~QtCurveStyle();
void polish(QApplication *app);
void polish(QPalette &pal);
+ QColorGroup setColorGroup(const QColorGroup &old, const QColorGroup &act, bool dis=false);
void polish(QWidget *widget);
void unPolish(QWidget *widget);
void drawLightBevel(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
@@ -129,12 +145,16 @@ class QtCurveStyle : public HighContrastStyle
void drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &r, const QColorGroup &cg,
SFlags flags, int round, const QColor &fill, const QColor *custom=NULL,
bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const;
- void drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool top, bool bot, bool raised=false) const;
+ void drawGlow(QPainter *p, const QRect &r, const QColorGroup &cg, EWidget w, const QColor *cols=0) const;
+ void drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool raised=false, bool square=false) const;
void drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, const QColorGroup &cg,
SFlags flags, int round, const QColor *custom=NULL, EWidget w=WIDGET_OTHER,
- bool doCorners=true, EBorder borderProfile=BORDER_FLAT, bool blendBorderColors=true, int borderVal=QT_STD_BORDER) const;
+ bool doCorners=true, EBorder borderProfile=BORDER_FLAT, bool blendBorderColors=true, int borderVal=STD_BORDER) const;
+ void drawMdiIcon(QPainter *painter, const QColor &color, const QColor &shadow, const QRect &r, bool sunken, int margin,
+ SubControl button) const;
+ void drawWindowIcon(QPainter *painter, const QColor &color, const QRect &r, bool sunken, int margin, SubControl button) const;
void drawEntryField(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
- bool highlight, int round, EWidget=WIDGET_OTHER) const;
+ EntryColor coloration, int round, EWidget=WIDGET_ENTRY) const;
void drawArrow(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
QStyle::PrimitiveElement pe, bool small=false, bool checkActive=false) const;
void drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &,
@@ -159,32 +179,40 @@ class QtCurveStyle : public HighContrastStyle
const QStyleOption & = QStyleOption::Default) const;
int styleHint(StyleHint, const QWidget *widget= 0, const QStyleOption & = QStyleOption::Default,
QStyleHintReturn *returnData= 0) const;
+ void drawItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg, bool enabled,
+ const QPixmap *pixmap, const QString &text, int len=-1, const QColor *penColor=0) const;
protected:
bool appIsNotEmbedded(QDialog *dlg);
bool eventFilter(QObject *object, QEvent *event);
- void drawMenuItem(QPainter *p, const QRect &r, const QColorGroup &cg,
+ void drawMenuItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg,
bool mbi, int round, const QColor &bgnd, const QColor *cols) const;
void drawProgress(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, int round,
const QWidget *widget) const;
- void drawBevelGradient(const QColor &base, bool increase, QPainter *p, QRect const &r,
- bool horiz, double shadeTop, double shadeBot, bool sel, EAppearance bevApp,
- EWidget w=WIDGET_OTHER) const;
- void drawGradient(const QColor &top, const QColor &bot, bool increase, QPainter *p,
- const QRect &r, bool horiz=true) const;
+ void drawBevelGradient(const QColor &base, QPainter *p, QRect const &r,
+ bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const;
+ void drawBevelGradientReal(const QColor &base, QPainter *p, QRect const &r,
+ bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const;
+ void drawGradient(const QColor &top, const QColor &bot, QPainter *p, const QRect &r, bool horiz=true) const;
void drawSbSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, bool slider=false) const;
void drawSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, QSlider *slider, bool tb=false) const;
void drawSliderGroove(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
const QWidget *widget) const;
- void drawMenuOrToolBarBackground(QPainter *p, const QRect &r, const QColorGroup &cg, bool menu=true,
- bool horiz=true) const;
+ void drawMenuOrToolBarBackground(QPainter *p, const QRect &r, const QColorGroup &cg, bool menu=true, bool horiz=true) const;
void drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags, bool tb, ELine handles) const;
+ void drawHighlight(QPainter *p, const QRect &r, const QColorGroup &cg, bool horiz, bool inc) const;
private:
+ static QColor shadowColor(const QColor col)
+ {
+ return qGray(col.rgb()) < 100 ? QColor(255, 255, 255) : QColor(0, 0, 0);
+ }
+
void shadeColors(const QColor &base, QColor *vals) const;
const QColor * buttonColors(const QColorGroup &cg) const;
+ const QColor * checkRadioColors(const QColorGroup &cg, SFlags flags) const;
const QColor * sliderColors(/*const QColorGroup &cg, */SFlags flags) const;
const QColor * backgroundColors(const QColor &c) const;
const QColor * backgroundColors(const QColorGroup &cg) const
@@ -192,15 +220,28 @@ class QtCurveStyle : public HighContrastStyle
const QColor * borderColors(SFlags flags, const QColor *use) const;
const QColor * getSidebarButtons() const;
void setMenuColors(const QColorGroup &cg);
+ const QColor * menuColors(const QColorGroup &cg, bool active) const;
+ void setDecorationColors(bool init=false);
+ const QColor * getMdiColors(const QColorGroup &cg, bool active) const;
+#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
+ void readMdiPositions() const;
+#endif
bool redrawHoverWidget(const QPoint &pos);
- const QColor & getFill(SFlags flags, const QColor *use) const;
+ const QColor & getFill(SFlags flags, const QColor *use, bool cr=false, bool darker=false) const;
const QColor & getListViewFill(SFlags flags, const QColor *use) const;
const QColor & getTabFill(bool current, bool highlight, const QColor *use) const;
-
+ const QColor & menuStripeCol() const;
+ const QColor & checkRadioCol(SFlags flags, const QColorGroup &cg) const;
+ QColor shade(const QColor &a, float k) const;
+ void shade(const color &ca, color *cb, double k) const;
+ void drawDot(QPainter *p, const QRect &r, const QColor *cols) const;
QPixmap * getPixelPixmap(const QColor col) const;
QPixmap * getPixmap(const QColor col, EPixmap pix, double shade=1.0) const;
+ QPixmap * createStripePixmap(const QColor &col, bool forWindow) const;
void setSbType();
bool isFormWidget(const QWidget *w) const { return itsKhtmlWidgets.contains(w); }
+ void resetHover();
+ bool isWindowDragWidget(QObject *o, const QPoint &pos=QPoint());
private slots:
@@ -208,25 +249,35 @@ class QtCurveStyle : public HighContrastStyle
void progressBarDestroyed(QObject *bar);
void sliderThumbMoved(int val);
void khtmlWidgetDestroyed(QObject *o);
+ void hoverWidgetDestroyed(QObject *o);
private:
- Options opts;
- QColor itsMenuitemCols[TOTAL_SHADES+1],
+ mutable Options opts;
+ QColor itsHighlightCols[TOTAL_SHADES+1],
itsBackgroundCols[TOTAL_SHADES+1],
itsMenubarCols[TOTAL_SHADES+1],
+ itsFocusCols[TOTAL_SHADES+1],
*itsSliderCols,
*itsDefBtnCols,
*itsMouseOverCols,
+ *itsComboBtnCols,
+ *itsCheckRadioSelCols,
+ *itsSortedLvColors,
+ *itsProgressCols,
itsButtonCols[TOTAL_SHADES+1],
itsLighterPopupMenuBgndCol,
itsCheckRadioCol;
mutable QColor *itsSidebarButtonsCols;
+ mutable QColor *itsActiveMdiColors;
+ mutable QColor *itsMdiColors;
+ mutable QColor itsActiveMdiTextColor;
+ mutable QColor itsMdiTextColor;
mutable QColor itsColoredButtonCols[TOTAL_SHADES+1];
mutable QColor itsColoredBackgroundCols[TOTAL_SHADES+1];
EApp itsThemedApp;
mutable QCache<QPixmap> itsPixmapCache;
-#if KDE_VERSION >= 0x30200
+#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
bool itsIsTransKicker;
#endif
EHover itsHover;
@@ -241,6 +292,9 @@ class QtCurveStyle : public HighContrastStyle
QTimer *itsAnimationTimer;
mutable bool itsActive,
itsIsSpecialHover;
+ mutable QValueList<int> itsMdiButtons[2]; // 0=left, 1=right
+ QWidget *itsDragWidget;
+ bool itsDragWidgetHadMouseTracking;
};
#endif
diff --git a/style/qtcurve.themerc b/style/qtcurve.themerc
index 3473ed0..9e4febe 100644
--- a/style/qtcurve.themerc
+++ b/style/qtcurve.themerc
@@ -1,6 +1,6 @@
[Misc]
Name=QtCurve
-Comment=Clean and elegant style
+Comment=Highly configurable style
ConfigPage=kstyle_qtcurve_config
[KDE]
WidgetStyle=QtCurve
diff --git a/themes/Agua.qtcurve b/themes/Agua.qtcurve
new file mode 100644
index 0000000..774485d
--- /dev/null
+++ b/themes/Agua.qtcurve
@@ -0,0 +1,34 @@
+[Misc]
+Name=Agua
+[KDE]
+WidgetStyle=qtc_agua
+[Settings]
+appearance=agua
+bgndImage=true
+comboBtn=selected
+crColor=true
+customShades=0
+defBtnIndicator=tint
+fixParentlessDialogs=false
+glowProgress=true
+gtkComboMenus=true
+highlightFactor=7
+lvAppearance=agua
+menuDelay=225
+menuitemAppearance=harsh
+progressAppearance=agua
+round=max
+roundAllTabs=false
+shadeSliders=selected
+sliderAppearance=agua
+sliderStyle=triangular
+sliderThumbs=none
+stdBtnSizes=true
+stripedProgress=diagonal
+sunkenAppearance=inverted
+titlebarBorder=false
+titlebarButtonAppearance=agua
+titlebarButtonColors=#C40000,#DCC864,#5ACC80,#4190C5,#8888CC,#D6D5D1,#D6D5D1,#D6D5D1,#D6D5D1
+titlebarButtons=85
+useHighlightForMenu=true
+version=1.0.0
diff --git a/themes/Agua_II.qtcurve b/themes/Agua_II.qtcurve
new file mode 100644
index 0000000..da4aff5
--- /dev/null
+++ b/themes/Agua_II.qtcurve
@@ -0,0 +1,165 @@
+[InactiveShadows]
+Size=35
+
+[KWin]
+BorderSize=0
+CustomShadows=true
+Grouping=false
+OpaqueBorder=false
+RoundBottom=false
+TitleBarPad=1
+
+[Settings]
+activeTabAppearance=soft
+animatedProgress=false
+appearance=agua
+bgndAppearance=flat
+bgndGrad=horiz
+bgndImage=none
+bgndOpacity=100
+boldProgress=false
+borderInactiveTab=false
+borderMenuitems=false
+borderProgress=false
+borderSbarGroove=false
+borderSelection=false
+borderTab=true
+buttonEffect=shadow
+centerTabText=false
+colorMenubarMouseOver=true
+colorSelTab=0
+colorSliderMouseOver=false
+coloredMouseOver=glow
+coloredTbarMo=false
+comboBtn=selected
+comboSplitter=false
+crButton=true
+crColor=selected
+crHighlight=3
+crSize=15
+customMenuNormTextColor=#000000
+customMenuSelTextColor=#000000
+customMenuTextColor=false
+customShades=0
+customgradient1=light,0,1.2,0.45,1,1,1
+customgradient2=3d,0,0.75,0.3,0.9,1,1.1
+customgradient3=none,0,1.1,0.99,0.94,1,0.75
+darkerBorders=false
+defBtnIndicator=tint
+dlgOpacity=100
+doubleGtkComboArrow=true
+drawStatusBarFrames=false
+dwtAppearance=customgradient1
+dwtSettings=33
+embolden=false
+etchEntry=false
+expanderHighlight=3
+fadeLines=true
+fillProgress=true
+fillSlider=true
+fixParentlessDialogs=false
+flatSbarButtons=true
+focus=glow
+forceAlternateLvCols=true
+gbFactor=-3
+gbLabel=9
+glowProgress=none
+grooveAppearance=customgradient2
+groupBox=faded
+gtkButtonOrder=false
+gtkComboMenus=true
+gtkScrollViews=false
+handles=1dot
+highlightFactor=7
+highlightScrollViews=false
+highlightTab=false
+inactiveTitlebarAppearance=customgradient3
+invertBotTab=true
+lighterPopupMenuBgnd=2
+lvAppearance=agua
+lvButton=false
+lvLines=none
+mapKdeIcons=true
+menuBgndAppearance=flat
+menuBgndGrad=horiz
+menuBgndImage=none
+menuBgndOpacity=100
+menuDelay=225
+menuIcons=true
+menuStripe=none
+menuStripeAppearance=darkinverted
+menubarAppearance=customgradient3
+menubarApps=VirtualBox,smplayer,amarok,arora,kcalc,kaffeine
+menubarHiding=1
+menubarMouseOver=true
+menuitemAppearance=harsh
+noBgndGradientApps=
+noBgndImageApps=
+noBgndOpacityApps=dragon,smplayer,inkscape,kaffeine,kscreenlocker
+noDlgFixApps=plasma-netbook,plasma,plasma-desktop,kate
+noMenuBgndOpacityApps=inkscape
+noMenuStripeApps=soffice.bin,gtk
+passwordChar=9679
+popupBorder=true
+progressAppearance=agua
+progressColor=origselected
+progressGrooveAppearance=agua
+progressGrooveColor=background
+reorderGtkButtons=true
+round=max
+roundAllTabs=true
+roundMbTopOnly=true
+sbarBgndAppearance=gradient
+scrollbarType=kde
+selectionAppearance=harsh
+shadeCheckRadio=none
+shadeMenubarOnlyWhenActive=false
+shadeMenubars=wborder
+shadePopupMenu=false
+shadeSliders=selected
+shading=hsl
+sliderAppearance=agua
+sliderFill=true
+sliderStyle=circular
+sliderThumbs=none
+sliderWidth=15
+smallRadio=true
+sortedLv=none
+splitterHighlight=3
+splitters=1dot
+square=31
+statusbarApps=kde
+statusbarHiding=1
+stdBtnSizes=true
+stdSidebarButtons=false
+stripedProgress=fade
+stripedSbar=true
+sunkenAppearance=inverted
+tabAppearance=soft
+tabBgnd=0
+tabMouseOver=glow
+thinSbarGroove=false
+thinnerBtns=true
+thinnerMenuItems=false
+titlebarAlignment=center-full
+titlebarAppearance=customgradient3
+titlebarButtonAppearance=agua
+titlebarButtonColors=#ED3D11,#EDE651,#4AD543,#5982F2,#9595E0,#D6D5D1,#D6D5D1,#D6D5D1,#D6D5D1
+titlebarButtons=3093
+titlebarEffect=etch
+titlebarIcon=title
+toolbarAppearance=flat
+toolbarBorders=none
+toolbarSeparators=sunken
+toolbarTabs=false
+unifyCombo=true
+unifySpin=true
+unifySpinBtns=false
+useHighlightForMenu=true
+useQtFileDialogApps=googleearth-bin
+vArrows=true
+version=1.6.0
+windowBorder=1
+windowDrag=1
+xCheck=false
+xbar=false
diff --git a/themes/CMakeLists.txt b/themes/CMakeLists.txt
index ec017d4..0d9ce9b 100644
--- a/themes/CMakeLists.txt
+++ b/themes/CMakeLists.txt
@@ -1,4 +1,4 @@
-install(FILES Clear.qtcurve Dull_Glass.qtcurve Shiny_Glass.qtcurve Inverted.qtcurve Plain.qtcurve Glass.qtcurve
- Human.qtcurve Plastic.qtcurve Murrine.qtcurve Curve.qtcurve Clean.qtcurve DESTINATION ${DATA_INSTALL_DIR}/QtCurve)
+install(FILES Agua.qtcurve Agua_II.qtcurve Curve.qtcurve Flat.qtcurve Human.qtcurve Inverted.qtcurve
+ Klearlooks.qtcurve Milk.qtcurve Murrine.qtcurve Ozone.qtcurve Plastic.qtcurve Silk.qtcurve
+ DESTINATION ${DATA_INSTALL_DIR}/QtCurve)
-install(FILES qtc_klearlooks.themerc DESTINATION ${DATA_INSTALL_DIR}/kstyle/themes)
diff --git a/themes/Curve.qtcurve b/themes/Curve.qtcurve
index d46ee06..f6eccb7 100644
--- a/themes/Curve.qtcurve
+++ b/themes/Curve.qtcurve
@@ -1,9 +1,12 @@
[Settings]
+activeTabAppearance=raised
animatedProgress=false
appearance=raised
borderMenuitems=true
buttonEffect=none
coloredMouseOver=none
+comboSplitter=true
+crHighlight=true
customCheckRadioColor=#000000
customMenuNormTextColor=#000000
customMenuSelTextColor=#000000
@@ -14,23 +17,31 @@ darkerBorders=true
defBtnIndicator=fontcolor
drawStatusBarFrames=false
embolden=false
+fadeLines=false
+fillProgress=true
fillSlider=false
+fixParentlessDialogs=false
+focus=standard
framelessGroupBoxes=true
-gradientPbGroove=false
+groupBoxLine=false
gtkScrollViews=false
gtkComboMenus=false
gtkButtonOrder=false
handles=sunken
highlightFactor=8
+highlightScrollViews=false
highlightTab=false
lighterPopupMenuBgnd=false
lvAppearance=raised
lvLines=false
mapKdeIcons=true
+menuDelay=225
menubarAppearance=flat
menubarMouseOver=false
menuitemAppearance=inverted
progressAppearance=inverted
+progressGrooveAppearance=flat
+progressGrooveColor=background
round=none
roundMbTopOnly=true
scrollbarType=windows
@@ -42,7 +53,6 @@ sliderAppearance=raised
sliderStyle=plain
sliderThumbs=sunken
splitters=sunken
-stdFocus=true
stdSidebarButtons=false
stripedProgress=false
tabAppearance=raised
@@ -51,3 +61,9 @@ toolbarAppearance=flat
toolbarBorders=dark-all
toolbarSeparators=sunken
vArrows=true
+menuStripe=false
+menuStripeAppearance=flat
+titlebarAppearance=flat
+selectionAppearance=flat
+squareScrollViews=true
+sunkenScrollViews=false
diff --git a/themes/Flat.qtcurve b/themes/Flat.qtcurve
new file mode 100644
index 0000000..6df8a4a
--- /dev/null
+++ b/themes/Flat.qtcurve
@@ -0,0 +1,69 @@
+[Settings]
+activeTabAppearance=flat
+animatedProgress=false
+appearance=flat
+borderMenuitems=true
+buttonEffect=shadow
+coloredMouseOver=none
+comboSplitter=true
+crHighlight=true
+customCheckRadioColor=#000000
+customMenuNormTextColor=#000000
+customMenuSelTextColor=#000000
+customMenuTextColor=false
+customMenubarsColor=#000000
+customSlidersColor=#000000
+darkerBorders=false
+defBtnIndicator=fontcolor
+drawStatusBarFrames=false
+embolden=true
+fadeLines=false
+fillProgress=true
+fillSlider=true
+fixParentlessDialogs=false
+focus=standard
+framelessGroupBoxes=false
+groupBoxLine=false
+gtkScrollViews=false
+gtkComboMenus=false
+gtkButtonOrder=false
+handles=sunken
+highlightFactor=5
+highlightScrollViews=false
+highlightTab=false
+lighterPopupMenuBgnd=false
+lvAppearance=flat
+lvLines=false
+mapKdeIcons=true
+menuDelay=225
+menubarAppearance=flat
+menubarMouseOver=true
+menuitemAppearance=flat
+progressAppearance=flat
+progressGrooveAppearance=flat
+progressGrooveColor=base
+round=full
+roundMbTopOnly=true
+scrollbarType=kde
+shadeCheckRadio=none
+shadeMenubarOnlyWhenActive=false
+shadeMenubars=darken
+shadeSliders=none
+sliderAppearance=flat
+sliderStyle=plain
+sliderThumbs=sunken
+splitters=dashes
+stdSidebarButtons=false
+stripedProgress=false
+tabAppearance=flat
+thinnerMenuItems=false
+toolbarAppearance=flat
+toolbarBorders=light
+toolbarSeparators=sunken
+vArrows=false
+menuStripe=false
+menuStripeAppearance=flat
+titlebarAppearance=flat
+selectionAppearance=flat
+squareScrollViews=false
+sunkenScrollViews=false
diff --git a/themes/Human.qtcurve b/themes/Human.qtcurve
index ff01374..39ed2e1 100644
--- a/themes/Human.qtcurve
+++ b/themes/Human.qtcurve
@@ -1,9 +1,11 @@
[Settings]
-animatedProgress=true
+animatedProgress=false
appearance=dullglass
-borderMenuitems=true
+borderMenuitems=false
buttonEffect=shadow
-coloredMouseOver=plastik
+coloredMouseOver=glow
+comboSplitter=true
+crHighlight=false
customCheckRadioColor=#000000
customMenuNormTextColor=#000000
customMenuSelTextColor=#000000
@@ -14,23 +16,31 @@ darkerBorders=true
defBtnIndicator=colored
drawStatusBarFrames=false
embolden=false
+fadeLines=false
+fillProgress=true
fillSlider=true
+fixParentlessDialogs=false
+focus=standard
framelessGroupBoxes=true
-gradientPbGroove=true
+groupBoxLine=false
gtkScrollViews=false
gtkComboMenus=false
gtkButtonOrder=false
handles=dots
highlightFactor=7
+highlightScrollViews=false
highlightTab=true
lighterPopupMenuBgnd=true
lvAppearance=bevelled
lvLines=false
mapKdeIcons=true
+menuDelay=225
menubarAppearance=gradient
menubarMouseOver=true
menuitemAppearance=gradient
progressAppearance=shinyglass
+progressGrooveAppearance=shinyglass
+progressGrooveColor=base
round=full
roundMbTopOnly=true
scrollbarType=windows
@@ -39,10 +49,9 @@ shadeMenubarOnlyWhenActive=false
shadeMenubars=darken
shadeSliders=none
sliderAppearance=gradient
-sliderStyle=round
+sliderStyle=plain
sliderThumbs=dots
splitters=dots
-stdFocus=true
stdSidebarButtons=false
stripedProgress=true
tabAppearance=gradient
@@ -51,4 +60,9 @@ toolbarAppearance=flat
toolbarBorders=light
toolbarSeparators=sunken
vArrows=false
-
+menuStripe=false
+menuStripeAppearance=flat
+titlebarAppearance=gradient
+selectionAppearance=gradient
+squareScrollViews=true
+sunkenScrollViews=false
diff --git a/themes/Inverted.qtcurve b/themes/Inverted.qtcurve
index 3d0a25c..1c812e2 100644
--- a/themes/Inverted.qtcurve
+++ b/themes/Inverted.qtcurve
@@ -1,9 +1,11 @@
[Settings]
-animatedProgress=true
+animatedProgress=false
appearance=inverted
borderMenuitems=true
buttonEffect=shadow
coloredMouseOver=plastik
+comboSplitter=false
+crHighlight=false
customCheckRadioColor=#000000
customMenuNormTextColor=#000000
customMenuSelTextColor=#000000
@@ -14,23 +16,31 @@ darkerBorders=false
defBtnIndicator=colored
drawStatusBarFrames=false
embolden=false
+fadeLines=false
+fillProgress=true
fillSlider=true
+fixParentlessDialogs=false
+focus=background
framelessGroupBoxes=true
-gradientPbGroove=true
+groupBoxLine=false
gtkScrollViews=false
gtkComboMenus=false
gtkButtonOrder=false
handles=dots
highlightFactor=5
+highlightScrollViews=true
highlightTab=true
lighterPopupMenuBgnd=true
lvAppearance=inverted
lvLines=false
mapKdeIcons=true
+menuDelay=225
menubarAppearance=inverted
menubarMouseOver=true
menuitemAppearance=inverted
progressAppearance=inverted
+progressGrooveAppearance=inverted
+progressGrooveColor=base
round=full
roundMbTopOnly=true
scrollbarType=kde
@@ -42,7 +52,6 @@ sliderAppearance=inverted
sliderStyle=round
sliderThumbs=dots
splitters=dots
-stdFocus=false
stdSidebarButtons=false
stripedProgress=true
tabAppearance=gradient
@@ -51,4 +60,9 @@ toolbarAppearance=inverted
toolbarBorders=none
toolbarSeparators=dots
vArrows=false
-
+menuStripe=true
+menuStripeAppearance=inverted
+titlebarAppearance=inverted
+selectionAppearance=inverted
+squareScrollViews=false
+sunkenScrollViews=true
diff --git a/themes/Klearlooks.qtcurve b/themes/Klearlooks.qtcurve
new file mode 100644
index 0000000..34db872
--- /dev/null
+++ b/themes/Klearlooks.qtcurve
@@ -0,0 +1,74 @@
+animatedProgress=false
+appearance=splitgradient
+borderMenuitems=true
+buttonEffect=shadow
+coloredMouseOver=none
+colorSelTab=true
+colorTitlebarOnly=true
+comboSplitter=true
+crHighlight=false
+customCheckRadioColor=#000000
+customMenuNormTextColor=#000000
+customMenuSelTextColor=#000000
+customMenuTextColor=false
+customMenubarsColor=#000000
+customSlidersColor=#000000
+darkerBorders=false
+defBtnIndicator=glow
+drawStatusBarFrames=false
+embolden=false
+fadeLines=true
+fillProgress=true
+fillSlider=true
+fixParentlessDialogs=false
+focus=filled
+framelessGroupBoxes=true
+groupBoxLine=false
+gtkScrollViews=true
+gtkComboMenus=true
+gtkButtonOrder=false
+handles=dots
+highlightFactor=7
+highlightScrollViews=false
+highlightTab=false
+lighterPopupMenuBgnd=15
+lvAppearance=splitgradient
+lvLines=false
+mapKdeIcons=true
+menuDelay=225
+menubarAppearance=flat
+menubarMouseOver=true
+menuitemAppearance=splitgradient
+progressAppearance=splitgradient
+progressGrooveAppearance=flat
+progressGrooveColor=dark
+round=full
+roundMbTopOnly=true
+scrollbarType=windows
+shadeCheckRadio=none
+shadeMenubarOnlyWhenActive=false
+shadeMenubars=darken
+shadeSliders=selected
+sliderStyle=plain
+sliderAppearance=splitgradient
+sliderThumbs=flat
+splitters=dashes
+stdFocus=true
+stdSidebarButtons=false
+stripedProgress=diagonal
+tabAppearance=gradient
+thinnerMenuItems=false
+toolbarAppearance=splitgradient
+toolbarBorders=light
+toolbarSeparators=sunken
+vArrows=true
+windowApperance=gradient
+menuStripe=false
+menuStripeAppearance=flat
+titlebarAppearance=gradient
+selectionAppearance=gradient
+squareScrollViews=true
+sunkenAppearance=splitgradient
+sunkenScrollViews=false
+unifySpinBtns=true
+thinnerBtns=true
diff --git a/themes/Milk.qtcurve b/themes/Milk.qtcurve
new file mode 100755
index 0000000..b043dc4
--- /dev/null
+++ b/themes/Milk.qtcurve
@@ -0,0 +1,69 @@
+[Settings]
+appearance=customgradient4
+boldProgress=false
+borderProgress=false
+borderSbarGroove=false
+comboSplitter=true
+crColor=selected
+customShades=0
+customgradient1=light,0,1.2,1,1
+customgradient2=3d,0,0.75,0.3,0.9,1,1.1
+customgradient3=none,0,1.1,0.99,0.94,1,0.75
+customgradient4=none,0,1.1,1,0.9
+customgradient5=none,0,1.25,1,0.75
+defBtnIndicator=tint
+dwtSettings=40
+fixParentlessDialogs=false
+forceAlternateLvCols=true
+grooveAppearance=customgradient2
+gtkComboMenus=true
+gtkScrollViews=false
+highlightFactor=7
+inactiveTitlebarAppearance=customgradient3
+lvAppearance=bevelled
+menuDelay=225
+menubarAppearance=customgradient3
+menubarHiding=3
+menuitemAppearance=customgradient5
+progressAppearance=customgradient5
+progressColor=selected
+progressGrooveAppearance=customgradient4
+progressGrooveColor=background
+reorderGtkButtons=true
+round=max
+sbarBgndAppearance=gradient
+shadeMenubars=wborder
+shadeSliders=selected
+sliderAppearance=customgradient4
+sliderStyle=circular
+sliderThumbs=none
+square=31
+statusbarHiding=3
+stdBtnSizes=true
+sunkenAppearance=inverted
+thinSbarGroove=false
+titlebarAppearance=customgradient3
+titlebarButtonAppearance=customgradient4
+titlebarButtonColors=#BA0D0D,#D6BA48,#40BA3A,#444FC4,#8282C3,#D6D5D1,#D6D5D1,#D6D5D1,#D6D5D1
+titlebarButtons=3605
+titlebarEffect=etch
+useHighlightForMenu=true
+version=1.5.0
+windowBorder=1
+windowDrag=3
+
+[KWin]
+BorderSize=0
+CloseOnMenuDoubleClick=true
+ColorTitleOnly=true
+ColoredShadow=false
+CustomShadows=true
+DrawBottom=true
+Grouping=false
+OpaqueBorder=false
+RoundBottom=false
+ShowResizeGrip=true
+TitleBarPad=1
+
+[InactiveShadows]
+Size=35
diff --git a/themes/Murrine.qtcurve b/themes/Murrine.qtcurve
index ede8110..f3a24de 100644
--- a/themes/Murrine.qtcurve
+++ b/themes/Murrine.qtcurve
@@ -1,9 +1,11 @@
[Settings]
-animatedProgress=true
+animatedProgress=false
appearance=dullglass
borderMenuitems=true
buttonEffect=etch
coloredMouseOver=colored
+comboSplitter=true
+crHighlight=false
customCheckRadioColor=#000000
customMenuNormTextColor=#000000
customMenuSelTextColor=#000000
@@ -14,23 +16,31 @@ darkerBorders=false
defBtnIndicator=fontcolor
drawStatusBarFrames=false
embolden=false
+fadeLines=false
+fillProgress=true
fillSlider=true
+fixParentlessDialogs=false
+focus=standard
framelessGroupBoxes=true
-gradientPbGroove=false
+groupBoxLine=false
gtkScrollViews=false
gtkComboMenus=false
gtkButtonOrder=false
handles=sunken
highlightFactor=5
+highlightScrollViews=false
highlightTab=true
lighterPopupMenuBgnd=true
lvAppearance=dullglass
lvLines=false
mapKdeIcons=true
+menuDelay=225
menubarAppearance=dullglass
menubarMouseOver=true
menuitemAppearance=dullglass
progressAppearance=dullglass
+progressGrooveAppearance=dullglass
+progressGrooveColor=base
round=slight
roundMbTopOnly=false
scrollbarType=windows
@@ -42,7 +52,6 @@ sliderAppearance=dullglass
sliderStyle=plain
sliderThumbs=sunken
splitters=dashes
-stdFocus=true
stdSidebarButtons=false
stripedProgress=true
tabAppearance=gradient
@@ -51,4 +60,9 @@ toolbarAppearance=flat
toolbarBorders=light
toolbarSeparators=sunken
vArrows=false
-
+menuStripe=false
+menuStripeAppearance=flat
+titlebarAppearance=dullglass
+selectionAppearance=dullglass
+squareScrollViews=true
+sunkenScrollViews=false
diff --git a/themes/Ozone.qtcurve b/themes/Ozone.qtcurve
new file mode 100644
index 0000000..57f38b9
--- /dev/null
+++ b/themes/Ozone.qtcurve
@@ -0,0 +1,170 @@
+[InactiveShadows]
+Size=35
+
+[KWin]
+BorderSize=3
+CustomShadows=true
+EdgePad=0
+Grouping=false
+OpaqueBorder=false
+OuterBorder=2
+InnerBorder=0
+RoundBottom=true
+TitleBarPad=0
+
+[Settings]
+customAlphas=0.4,0.1
+activeTabAppearance=soft
+animatedProgress=false
+appearance=customgradient5
+bgndAppearance=customgradient4
+bgndGrad=horiz
+bgndImage=none
+bgndOpacity=100
+boldProgress=false
+borderInactiveTab=true
+borderMenuitems=false
+borderProgress=true
+borderSbarGroove=true
+borderSelection=false
+borderTab=true
+buttonEffect=shadow
+centerTabText=true
+colorMenubarMouseOver=true
+colorSelTab=0
+colorSliderMouseOver=false
+coloredMouseOver=glow
+coloredTbarMo=false
+comboBtn=none
+comboSplitter=false
+crButton=true
+crColor=none
+crHighlight=0
+crSize=15
+customMenuNormTextColor=#000000
+customMenuSelTextColor=#000000
+customMenuTextColor=false
+customShades=1.16,1.07,0.9,0.78,0.84,0.75
+customgradient1=3d,0,1.2,0.5,1,1,1
+customgradient2=3d,0,0.9,0.5,1,1,1
+customgradient3=none,0,1.12,1,1.15
+customgradient4=shine,0,1.05,1,0.92
+customgradient5=light,0,1.04,1,0.92
+darkerBorders=false
+defBtnIndicator=glow
+dlgOpacity=100
+doubleGtkComboArrow=true
+drawStatusBarFrames=false
+dwtAppearance=flat
+dwtSettings=0
+embolden=false
+etchEntry=false
+expanderHighlight=3
+fadeLines=true
+fillProgress=true
+fillSlider=false
+fixParentlessDialogs=false
+flatSbarButtons=true
+focus=glow
+forceAlternateLvCols=false
+gbFactor=-3
+gbLabel=9
+glowProgress=middle
+grooveAppearance=inverted
+groupBox=faded
+gtkButtonOrder=false
+gtkComboMenus=false
+gtkScrollViews=true
+handles=sunken
+highlightFactor=3
+highlightScrollViews=true
+highlightTab=false
+inactiveTitlebarAppearance=none
+invertBotTab=true
+lighterPopupMenuBgnd=0
+lvAppearance=bevelled
+lvButton=false
+lvLines=old
+mapKdeIcons=true
+menuBgndAppearance=harsh
+menuBgndGrad=horiz
+menuBgndImage=none
+menuBgndOpacity=100
+menuDelay=225
+menuIcons=true
+menuStripe=none
+menuStripeAppearance=darkinverted
+menubarAppearance=flat
+menubarApps=VirtualBox,smplayer,amarok,arora,kcalc,kaffeine
+menubarHiding=0
+menubarMouseOver=true
+menuitemAppearance=fade
+noBgndGradientApps=
+noBgndImageApps=
+noBgndOpacityApps=dragon,smplayer,inkscape,totem,kaffeine,kscreenlocker,sonata
+noDlgFixApps=plasma-netbook,plasma,plasma-desktop,kate
+noMenuBgndOpacityApps=inkscape,totem,sonata
+noMenuStripeApps=soffice.bin,gtk
+passwordChar=9679
+popupBorder=true
+progressAppearance=dullglass
+progressColor=origselected
+progressGrooveAppearance=inverted
+progressGrooveColor=dark
+reorderGtkButtons=false
+round=extra
+roundAllTabs=false
+roundMbTopOnly=false
+sbarBgndAppearance=flat
+scrollbarType=kde
+selectionAppearance=harsh
+shadeCheckRadio=none
+shadeMenubarOnlyWhenActive=false
+shadeMenubars=none
+shadePopupMenu=false
+shadeSliders=none
+shading=hsl
+sliderAppearance=soft
+sliderFill=true
+sliderStyle=r-plain
+sliderThumbs=none
+sliderWidth=15
+smallRadio=true
+sortedLv=none
+splitterHighlight=0
+splitters=flat
+square=0
+statusbarApps=kde
+statusbarHiding=0
+stdBtnSizes=false
+stdSidebarButtons=false
+stripedProgress=none
+stripedSbar=false
+sunkenAppearance=customgradient3
+tabAppearance=soft
+tabBgnd=0
+tabMouseOver=glow
+thinSbarGroove=false
+thinnerBtns=true
+thinnerMenuItems=false
+titlebarAlignment=center-full
+titlebarAppearance=none
+titlebarButtonAppearance=gradient
+titlebarButtons=2117
+titlebarEffect=shadow
+titlebarIcon=title
+toolbarAppearance=flat
+toolbarBorders=none
+toolbarSeparators=sunken
+toolbarTabs=false
+unifyCombo=true
+unifySpin=true
+unifySpinBtns=false
+useHighlightForMenu=false
+useQtFileDialogApps=googleearth-bin
+vArrows=true
+version=1.6.1
+windowBorder=1
+windowDrag=3
+xCheck=false
+xbar=false
diff --git a/themes/Plastic.qtcurve b/themes/Plastic.qtcurve
index b65be20..eeac916 100644
--- a/themes/Plastic.qtcurve
+++ b/themes/Plastic.qtcurve
@@ -1,54 +1,160 @@
+[KWin]
+BorderSize=3
+Grouping=false
+OpaqueBorder=false
+OuterBorder=true
+TitleBarPad=1
+
[Settings]
-animatedProgress=true
+activeTabAppearance=flat
+animatedProgress=false
appearance=gradient
-borderMenuitems=true
+bgndAppearance=flat
+bgndGrad=horiz
+bgndImage=none
+bgndOpacity=100
+boldProgress=true
+borderInactiveTab=false
+borderMenuitems=false
+borderProgress=true
+borderSbarGroove=true
+borderSelection=false
+borderTab=false
buttonEffect=none
+centerTabText=false
+colorMenubarMouseOver=false
+colorSelTab=0
+colorSliderMouseOver=false
coloredMouseOver=plastik
-customCheckRadioColor=#000000
+coloredTbarMo=false
+comboBtn=none
+comboSplitter=true
+crButton=false
+crColor=none
+crHighlight=0
+crSize=13
customMenuNormTextColor=#000000
customMenuSelTextColor=#000000
customMenuTextColor=false
-customMenubarsColor=#000000
-customSlidersColor=#000000
+customShades=0
+customgradient1=3d,0,1.2,0.5,1,1,1
+customgradient2=3d,0,0.9,0.5,1,1,1
darkerBorders=false
-defBtnIndicator=colored
+defBtnIndicator=fontcolor
+dlgOpacity=100
+doubleGtkComboArrow=false
drawStatusBarFrames=false
+dwtAppearance=flat
+dwtSettings=0
embolden=false
-fillSlider=true
-framelessGroupBoxes=false
-gradientPbGroove=true
-gtkScrollViews=false
-gtkComboMenus=false
+etchEntry=true
+expanderHighlight=3
+fadeLines=false
+fillProgress=false
+fillSlider=false
+fixParentlessDialogs=false
+flatSbarButtons=false
+focus=standard
+forceAlternateLvCols=false
+gbFactor=0
+gbLabel=0
+glowProgress=none
+grooveAppearance=inverted
+groupBox=plain
gtkButtonOrder=false
+gtkComboMenus=false
+gtkScrollViews=false
handles=dots
highlightFactor=-2
-highlightTab=true
-lighterPopupMenuBgnd=true
+highlightScrollViews=false
+highlightTab=false
+inactiveTitlebarAppearance=gradient
+invertBotTab=true
+lighterPopupMenuBgnd=2
lvAppearance=gradient
-lvLines=false
+lvButton=false
+lvLines=none
mapKdeIcons=true
+menuBgndAppearance=flat
+menuBgndGrad=horiz
+menuBgndImage=none
+menuBgndOpacity=100
+menuDelay=225
+menuIcons=true
+menuStripe=none
+menuStripeAppearance=flat
menubarAppearance=flat
+menubarApps=VirtualBox,smplayer,amarok,arora,kcalc,kaffeine
+menubarHiding=0
menubarMouseOver=true
menuitemAppearance=gradient
+noBgndGradientApps=
+noBgndImageApps=
+noBgndOpacityApps=dragon,smplayer,inkscape,kaffeine,kscreenlocker
+noDlgFixApps=plasma-netbook,plasma,plasma-desktop,kate
+noMenuBgndOpacityApps=inkscape
+noMenuStripeApps=soffice.bin,gtk
+passwordChar=9679
+popupBorder=true
progressAppearance=flat
+progressColor=origselected
+progressGrooveAppearance=flat
+progressGrooveColor=base
+reorderGtkButtons=false
round=full
+roundAllTabs=false
roundMbTopOnly=false
-scrollbarType=windows
+sbarBgndAppearance=flat
+scrollbarType=kde
+selectionAppearance=flat
shadeCheckRadio=none
shadeMenubarOnlyWhenActive=false
shadeMenubars=none
+shadePopupMenu=false
shadeSliders=none
+shading=hsl
sliderAppearance=gradient
+sliderFill=true
sliderStyle=triangular
sliderThumbs=dots
+sliderWidth=15
+smallRadio=false
+sortedLv=none
+splitterHighlight=3
splitters=dots
-stdFocus=true
+square=256
+statusbarApps=kde
+statusbarHiding=0
+stdBtnSizes=false
stdSidebarButtons=false
-stripedProgress=true
+stripedProgress=plain
+stripedSbar=false
+sunkenAppearance=inverted
tabAppearance=gradient
+tabBgnd=0
+tabMouseOver=top
+thinSbarGroove=false
+thinnerBtns=false
thinnerMenuItems=false
+titlebarAlignment=left
+titlebarAppearance=gradient
+titlebarButtonAppearance=gradient
+titlebarButtons=2
+titlebarEffect=shadow
+titlebarIcon=menu
toolbarAppearance=flat
toolbarBorders=light-all
toolbarSeparators=sunken
+toolbarTabs=false
+tooltipAppearance=flat
+unifyCombo=false
+unifySpin=false
+unifySpinBtns=false
+useHighlightForMenu=true
+useQtFileDialogApps=googleearth-bin
vArrows=false
+version=1.6.0
+windowBorder=4
+windowDrag=0
xCheck=true
+xbar=false
diff --git a/themes/Silk.qtcurve b/themes/Silk.qtcurve
new file mode 100644
index 0000000..1d183a6
--- /dev/null
+++ b/themes/Silk.qtcurve
@@ -0,0 +1,89 @@
+[Misc]
+Name=Silk
+Comment=QtCurve derived style.
+[KDE]
+WidgetStyle=qtc_silk
+[Settings]
+activeTabAppearance=flat
+animatedProgress=false
+appearance=customgradient2
+borderMenuitems=false
+buttonEffect=shadow
+colorSelTab=false
+coloredMouseOver=glow
+comboSplitter=false
+crButton=true
+crHighlight=false
+customCheckRadioColor=#000000
+customMenuNormTextColor=#000000
+customMenuSelTextColor=#000000
+customMenuTextColor=false
+customMenubarsColor=#000000
+customShades=1.16,1.07,0.9,0.78,0.84,0.75
+customSlidersColor=#000000
+customShadesX=1.1,1.1,1.1,1.1,1.1,1.1
+customgradient1=false,0,1.05,0.49,1,0.5,0.95,1,1
+customgradient2=false,0,1.05,1,1
+customgradient3=false,0.85,1,1,0.92
+customgradient4=false,0,1,1,0.98
+customgradient5=false,0,1.2,0.5,1,1,1
+customgradient6=false,0,0.9,0.5,1,1,1
+darkerBorders=false
+defBtnIndicator=glow
+drawStatusBarFrames=false
+embolden=false
+fadeLines=true
+fixParentlessDialogs=false
+flatSbarButtons=true
+focus=filled
+framelessGroupBoxes=true
+groupBoxLine=true
+gtkButtonOrder=false
+gtkComboMenus=false
+gtkScrollViews=false
+handles=sunken
+highlightFactor=0
+highlightScrollViews=false
+highlightTab=false
+inactiveTitlebarAppearance=customgradient6
+lighterPopupMenuBgnd=2
+lvAppearance=customgradient3
+lvLines=false
+mapKdeIcons=true
+menuDelay=225
+menuStripe=false
+menuStripeAppearance=customgradient2
+menubarAppearance=customgradient4
+menubarMouseOver=true
+menuitemAppearance=fade
+progressAppearance=customgradient1
+progressGrooveAppearance=inverted
+progressGrooveColor=dark
+round=full
+roundMbTopOnly=true
+scrollbarType=kde
+selectionAppearance=gradient
+shadeCheckRadio=none
+shadeMenubarOnlyWhenActive=false
+shadeMenubars=none
+shadeSliders=none
+shading=hsl
+sliderAppearance=customgradient2
+sliderStyle=plain
+sliderThumbs=lines
+splitters=flat
+squareScrollViews=false
+stdSidebarButtons=false
+stripedProgress=none
+sunkengradientX=false,0,0.5,0.5,0.1,1,0.9
+sunkenScrollViews=true
+tabAppearance=flat
+thinnerMenuItems=false
+titlebarAppearance=customgradient5
+titlebarButtonAppearance=customgradient2
+toolbarAppearance=flat
+toolbarBorders=none
+toolbarSeparators=sunken
+useHighlightForMenu=false
+vArrows=true
+xCheck=false