From b23b8edce7cbd48165084dbd852875afeb800735 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Oct 2010 18:12:45 +0000 Subject: Update qtcurve to latest upstream version git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-style-qtcurve@1182805 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- config/CMakeLists.txt | 9 +- config/exportthemedialog.cpp | 6 +- config/exportthemedialog.h | 4 +- config/qtcurveconfig.cpp | 1337 +++++++++++++++++-- config/qtcurveconfig.h | 77 +- config/qtcurveconfigbase.ui | 2940 +++++++++++++++++++++++++++++++++--------- 6 files changed, 3679 insertions(+), 694 deletions(-) (limited to 'config') 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 Craig.Drummond@lycos.co.uk + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -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 Craig.Drummond@lycos.co.uk + QtCurve (C) Craig Drummond, 2007 - 2010 craig.p.drummond@gmail.com ---- @@ -22,7 +22,7 @@ */ #include -#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 Craig.Drummond@lycos.co.uk + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -19,7 +19,9 @@ */ #include "qtcurveconfig.h" +#ifdef QTC_STYLE_SUPPORT #include "exportthemedialog.h" +#endif #include #include #include @@ -30,6 +32,11 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include @@ -39,23 +46,100 @@ #include #include #include +#include +#include +#include +#include +#include #include +#include #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 + : stackId1.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 + : acurrentShading(); + + 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, ¤tStyle, &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()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()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; isetValue(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; ivalue(), 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; ivalue(); + } + 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 Craig.Drummond@lycos.co.uk + QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com ---- @@ -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 +#include #include #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 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 @@ 0 0 - 666 - 556 + 862 + 638 @@ -41,182 +41,208 @@ AlignCenter - + + + + Category + + + true + + + true + + - spacer2 - - - Vertical + stackList - - Fixed + + + 1 + 7 + 0 + 0 + - + - 20 - 16 + 150 + 0 - - + + - optionsTab + optionBtn - - - 3 - 3 - 0 - 0 - + + Options + + + + + stack - tab + WStackPage - - General + + 0 unnamed - + - textLabel1_6 + appearance - - Splitters: + + The setting here affects the general appearance - and will be applied to buttons, combo boxes, and spin buttons. - + - textLabel1_2_3 + textLabel1 - Scrollbars: + Appearance: - + - textLabel1_2_3_2 + spacer10_2 - - Sliders: + + Horizontal - - - - textLabel1_7 + + Expanding - - Appearance: + + + 571 + 16 + - + - textLabel1 + textLabel1_6 - Progress bars: + Focus rectangle: - + - textLabel1_8_2 + textLabel3 - Listviews: - - - This controls the % that widgets will be highlighted by when the mouse hovers over them + Button effect: - + - lvAppearance + round - + - embolden + darkerBorders - Bold text, and + Darker borders - + - tabAppearance + stdSidebarButtons - - - - progressAppearance + + Standard buttons for sidebars - The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons. + 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. - scrollbarType - - - - 3 - 0 - 0 - 0 - - - - - - stripedProgress + buttonEffect - + - gradientPbGroove + textLabel2_4 - Gradient groove - - - - - sliderAppearance + Roundedness: - + - animatedProgress + vArrows - Animated + 'V' style arrows - + - lvLines - - - Lines + focus - + - stdFocus + frame4 - - Dotted focus rectangle + + StyledPanel - - 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. + + Raised + + + 0 + + + unnamed + + + 0 + + + 0 + + + + framelessGroupBoxes + + + Frameless groupboxes, + + + + + groupBoxLine + + + + 3 + 0 + 0 + 0 + + + + draw line after title (KDE4 && Gtk2) + + + - + drawStatusBarFrames @@ -224,158 +250,204 @@ Draw statusbar frames - + - framelessGroupBoxes - - - Frameless groupboxes + sunkenAppearance - + - shadeSliders + textLabel1_12 - - - 3 - 0 - 0 - 0 - + + Sunken appearance: - + - textLabel1_8_2_2 + fadeLines - Tabs: + Draw fading lines (KDE4 && Gtk2) - - This controls the % that widgets will be highlighted by when the mouse hovers over them + + - + - textLabel1_8_2_2_2 + thinnerBtns - Checks/radios: + Thinner buttons when etched/shadowed - - This controls the % that widgets will be highlighted by when the mouse hovers over them + + - + - shadeCheckRadio + spacer9 - - - 3 - 0 - 0 - 0 - + + Vertical - - + + Expanding + + + + 20 + 162 + + + + - customCheckRadioColor + etchEntry - + Etch entries and scrollviews when button effect set to etched/shadowed. - + + + + + WStackPage + + + 1 + + + + unnamed + + - customSlidersColor + comboSplitter - + Draw splitter + + + This option controls whether a line is drawn near non-editable combo box arrows. - + - textLabel1_3 + unifyCombo - Default button: + Draw arrow of editable combos within edit field - + - textLabel1_3_2 + spacer27_2 - - Mouse-over: + + Vertical - - + + Expanding + + + + 20 + 429 + + + + - appearance + spacer26_2 - - The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons. + + Horizontal - - + + Expanding + + + + 31 + 20 + + + + - stdSidebarButtons + textLabel1_17 - Standard buttons for sidebars + Button shade: - + - coloredMouseOver + customComboBtnColor - - The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons. + + - + - textLabel1_8 + comboBtn + + + + + gtkComboMenus - Highlight by: + Gtk style comboboxes (KDE4) - This controls the % that widgets will be highlighted by when the mouse hovers over them + 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. - + - darkerBorders + doubleGtkComboArrow - Darker borders + Double arrows for Gtk style comboboxes - - - round - - - + + + + + WStackPage + + + 2 + + + + unnamed + + - vArrows + unifySpinBtns - 'V' style arrows + Combine both buttons - + - splitters + unifySpin + + + Draw arrows within edit field - + - spacer6 + spacer28_3 Vertical @@ -386,575 +458,2222 @@ 20 - 20 + 31 - - - xCheck - - + + + + + WStackPage + + + 3 + + + + unnamed + + + + textLabel4 + + + Markings: + + + + + spacer12_2 + + + Vertical + + + Expanding + + + + 16 + 482 + + + + + + splitterHighlight + + + % + + + + + spacer11 + + + Horizontal + + + Expanding + + + + 461 + 16 + + + + + + splitters + + + + + textLabel1_21 + + + Background mouse-over highlight: + + + + + + + WStackPage + + + 4 + + + + unnamed + + + + textLabel5 + + + Appearance: + + + + + textLabel6 + + + Coloration: + + + + + shadeSliders + + + + 3 + 0 + 0 + 0 + + + + This color setting affects both scrollbar sliders, and other sliders. + + + + + customSlidersColor + + + + + + + + spacer14 + + + Horizontal + + + Expanding + + + + 307 + 16 + + + + + + sliderAppearance + + + This appearance setting affects both scrollbar sliders, and other sliders. + + + + + spacer13 + + + Vertical + + + Expanding + + + + 20 + 191 + + + + + + grooveAppearance + + + + + sliderThumbs + + + + 3 + 0 + 0 + 0 + + + + + + sliderWidth + + + + + textLabel7 + + + Style: + + + + + textLabel8_2 + + + Slider thumbs: + + + + + textLabel8_2x + + + Slider width: + + + + + fillSlider + + + Fill used part of groove: + + + + + textLabel8_2_2 + + + Background + + + + + sliderFill + + + This appearance setting affects both scrollbar sliders, and other sliders. + + + + + flatSbarButtons + + + Flat + + + + + sliderStyle + + + This setting only affects standard sliders - i.e. not scrollbar sliders. 'Triangular' is a very similar style to plastik's sliders. + + + + + textLabel2_5 + + + Groove appearance: + + + + + thinSbarGroove + + + Thin scrollbar groove + + + + + textLabel8 + + + Scrollbar buttons: + + + + + scrollbarType + + + + 3 + 0 + 0 + 0 + + + + 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 + + + + + sbarBgndAppearance + + + + 3 + 0 + 0 + 0 + + + + + + colorSliderMouseOver + + + Color only on mouse-over + + + + + + + WStackPage + + + 5 + + + + unnamed + + + + progressAppearance + + + + + stripedProgress + + + + + animatedProgress + + + Animated + + + + + spacer16 + + + Vertical + + + Expanding + + + + 16 + 369 + + + + + + textLabel1_3 + + + Groove: + + + + + textLabel9 + + + Bar: + + + + + progressGrooveAppearance + + + + + progressGrooveColor + + + + + fillProgress + + + + 3 + 0 + 0 + 0 + + + + No border + + + Enable this option to remove the 1 pixel border around the filled element. + + + + + + + WStackPage + + + 6 + + + + unnamed + + + + defBtnIndicator + + + + 3 + 0 + 0 + 0 + + + + + + textLabel10 + + + Indicate with: + + + + + embolden + + + Embolden text + + + + + spacer17 + + + Horizontal + + + Expanding + + + + 27 + 2 + + + + + + spacer18 + + + Vertical + + + Expanding + + + + 3 + 30 + + + + + + + + WStackPage + + + 7 + + + + unnamed + + + + textLabel1_8 + + + Highlight by: + + + This controls the % that widgets will be highlighted by when the mouse hovers over them + + + + + textLabel11 + + + Coloration: + + + + + highlightFactor + + + % + + + + + coloredMouseOver + + + + + spacer19 + + + Horizontal + + + Expanding + + + + 50 + 6 + + + + + + spacer20 + + + Vertical + + + Expanding + + + + 5 + 20 + + + + + + + + WStackPage + + + 8 + + + + unnamed + + + + lvButton + + + + 3 + 0 + 0 + 0 + + + + Button color + + + + + textLabel12 + + + Header appearance: + + + + + lvAppearance + + + + + textLabel12_2 + + + Shade header of sorted column: + + + + + sortedLv + + + + + customSortedLvColor + + + false + + + + + + + + textLabel1_8_2_2_3_2 + + + Selection appearance (KDE4 && Gtk2): + + + + + selectionAppearance + + + + + spacer22 + + + Vertical + + + Expanding + + + + 16 + 389 + + + + + + forceAlternateLvCols + + + Force alternate colors + + + + + textLabel1_18 + + + Lines between items: + + + + + lvLines + + + + + squareLvSelection + + + Square selection + + + + + + + WStackPage + + + 9 + + + + unnamed + + + + gtkScrollViews + + + Scrollbars on the outside + + + + + highlightScrollViews + + + Highlight on focus (KDE) + + + + + squareScrollViews + + + Always draw with a square frame - regardless of the general round setting. + + + + + spacer28_2 + + + Vertical + + + Expanding + + + + 16 + 272 + + + + + + + + WStackPage + + + 10 + + + + unnamed + + + + textLabel13 + + + Active tab appearance: + + + + + textLabel8_3 + + + Inactive tab appearance: + + + + + activeTabAppearance + + + + + tabAppearance + + + + + highlightTab + + + Highlight + + + This will cause a coloured stripe to be drawn over the current tab. + + + + + colorSelTab + + + % + + + Tint by + + + + + textLabel1_14 + + + Mouse-over: + + + + + tabMouseOver + + + + + roundAllTabs + + + Round all tabs + + + + + borderTab + + + Draw a light border around tab widget + + + + + borderInactiveTab + + + Draw inner border of inactive tabs + + + + + spacer23 + + + Vertical + + + Expanding + + + + 20 + 320 + + + + + + tabBgnd + + + % + + + + + textLabel1_19 + + + Alter background by: + + + + + invertBotTab + + + Invert shade of bottom tabs + + + + + + + WStackPage + + + 11 + + + + unnamed + + + + shadeCheckRadio + + + + 3 + 0 + 0 + 0 + + + + + + customCheckRadioColor + + + + + + + + textLabel14 + + + Coloration: + + + + + xCheck + + 'X' style checkmarks - + + + spacer25 + + + Horizontal + + + Expanding + + + + 211 + 16 + + + + + + spacer26 + + + Vertical + + + Expanding + + + + 20 + 364 + + + + + + crButton + + + Button like + + + + + smallRadio + + + Small radio 'dot' + + + + + crColor + + + Color when selected + + + + + crHighlight + + + % + + + + + textLabel2_6 + + + Background mouse-over highlight: + + + + + + + WStackPage + + + 12 + + + + unnamed + + + + spacer28 + + + Horizontal + + + Expanding + + + + 395 + 16 + + + + + + textLabel15_2 + + + Button Appearance: + + + + + titlebarButtonAppearance + + + + + titlebarAppearance + + + + + textLabel15 + + + Titlebar Appearance: + + + + + textLabel15_3 + + + Titlebar Appearance: + + + + + inactiveTitlebarAppearance + + + + + textLabel1_13 + + + Text alignment: + + + + + titlebarAlignment + + + + + colorTitlebarOnly + + + Color titlebar only (KDE4) + + + + + spacer27 + + + Vertical + + + Expanding + + + + 20 + 270 + + + + + + titlebarBorder + + + Light border (KDE4) + + + + + + + WStackPage + + + 13 + + + + unnamed + + + + textLabel2 + + + Handles: + + + + + textLabel1_4 + + + Border: + + + + + toolbarBorders + + + + + handles + + + + + spacer4 + + + Horizontal + + + MinimumExpanding + + + + 121 + 20 + + + + + + spacer5 + + + Vertical + + + Expanding + + + + 20 + 19 + + + + + + groupBox2 + + + Toolbars + + + false + + + + unnamed + + + + textLabel1_4_2_2 + + + Appearance: + + + + + toolbarAppearance + + + + + textLabel2_2 + + + Separators: + + + + + toolbarSeparators + + + + + spacer4_2 + + + Horizontal + + + MinimumExpanding + + + + 20 + 20 + + + + + + + + groupBox2_2 + + + Menus + + + false + + + + unnamed + + + + shadeMenubarOnlyWhenActive + + + Apply coloration to active window only + + + + + textLabel1_4_2_3 + + + Coloration: + + + + + textLabel1_4_2 + + + Menubar appearance: + + + + + textLabel1_4_2_4 + + + Menuitem appearance: + + + + + useHighlightForMenu + + + Use 'highlight' color for active menuitems + + + + + textLabel1_15 + + + Stripe (KDE): + + + + + popupBorder + + + Border popupmenus + + + + + textLabel1_16 + + + Sub-menu delay: + + + + + menuStripeAppearance + + + false + + + + + colorMenubarMouseOver + + + Color menubar items on mouse-over + + + + + customMenuTextColor + + + Custom text colors (active/normal): + + + + + customMenuNormTextColor + + + + + + + + customMenuSelTextColor + + + + + + + + menuBgndAppearance + + + + + menuBgndGrad + + + + + customMenuStripeColor + + + false + + + + + + + + thinnerMenuItems + + + Thinner menu items + + + + + textLabel1_7 + + + Popup-menu background: + + + + + menuStripe + + + + + lighterPopupMenuBgnd + + + % + + + + + menuDelay + + + + + menuitemAppearance + + + + + shadeMenubars + + + + 3 + 0 + 0 + 0 + + + + + + menubarAppearance + + + + + borderMenuitems + + + Border menuitems + + + + + menuIcons + + + Draw icons + + + + + roundMbTopOnly + + + Round selected menubar items on top only + + + + + customMenubarsColor + + + + + + + + menubarMouseOver + + + Enable mouse-over for menubar items + + + + + + + + + WStackPage + + + 14 + + + + unnamed + + + + textLabel1_20 + + + Titlebar appearance: + + + + + dwtAppearance + + + + + spacer28_4 + + + Horizontal + + + Expanding + + + + 18 + 3 + + + + + + spacer29 + + + Vertical + + + Expanding + + + + 6 + 85 + + + + + + + + WStackPage + + + 15 + + + + unnamed + + + + fixParentlessDialogs + + + 'Fix' parentless dialogs + + + <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> + +<p>If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.</p> + +<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> + + + + + mapKdeIcons + + + Map KDE icons (Gtk2) + + + - highlightTab + gtkButtonOrder - Highlight selected - - - This will cause a coloured stripe to be drawn over the current tab. + Gtk button order - + - colorSelTab + spacer7 - - Color selected + + Vertical - - + + Expanding + + + + 20 + 381 + + + + - sliderThumbs + textLabel1_2 - - - 3 - 0 - 0 - 0 - + + Character to use for password entries: - + - defBtnIndicator + passwordChar - 3 + 4 0 0 0 - - - - fillSlider - - Fill used - - - - - sliderStyle - - - - - buttonEffect + - + - highlightFactor + stdBtnSizes - - % + + Don't make 'auto-default' buttons larger (KDE4) - tab + WStackPage - - Menus && Toolbars + + 16 unnamed - + - textLabel1_4 - - - Border: + gradCombo - - - spacer5 - - - Vertical - - - Expanding - - - - 20 - 54 - - - - + - groupBox2_2 + groupBox3 - Menus - - - true + Settings unnamed - - - lighterPopupMenuBgnd - - - Lighter popup-menu background - - - - - menubarMouseOver - - - Enable mouse-over for menubar items - - - + - roundMbTopOnly - - - Round selected menubar items on top only + gradBorder - + + + + Position (%) + + + true + + + true + + + + + Value (%) + + + true + + + true + + - textLabel1_4_2_3 + gradStops - - Coloration: + + + 1 + 7 + 0 + 0 + - + - textLabel1_4_2 + groupBox6 - - Menubar appearance: + + Gradient Stop + + + unnamed + + + + addButton + + + + 0 + 1 + 0 + 0 + + + + + + + + + updateButton + + + + 0 + 1 + 0 + 0 + + + + + + + + + removeButton + + + + 0 + 1 + 0 + 0 + + + + + + + + + textLabel2_3 + + + + 1 + 5 + 0 + 0 + + + + Value: + + + + + textLabel1_11 + + + + 1 + 5 + 0 + 0 + + + + Position: + + + + + stopPosition + + + 100 + + + % + + + + + stopValue + + + 200 + + + % + + + + + spacer12 + + + Horizontal + + + Expanding + + + + 160 + 8 + + + + - + - textLabel1_4_2_4 + textLabel1_9 - - Menuitem appearance: - - - - - thinnerMenuItems + + + 1 + 3 + 0 + 0 + - Thinner menu items - - - - - shadeMenubarOnlyWhenActive + <i><b>NOTE: </b><br> + +<u>Position</u> has a range of 0% to 100% - 0% being top/left, and 100% being bottom/right.<br> + +<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> - - Active window only + + WordBreak|AlignTop - + + + + + groupBox4 + + + Preview + + + + unnamed + + - customMenuTextColor + previewWidgetContainer - - Custom text colors (normal/selected): + + NoFrame - - - - menuitemAppearance + + Raised - + - shadeMenubars + previewColor - 3 + 0 0 0 0 - - - - menubarAppearance - - - - - customMenubarsColor - - - - - - - - borderMenuitems - - - Border - - - - - customMenuNormTextColor - - - - - - - - customMenuSelTextColor - - - - - - textLabel2 - - - Handles: - - - - - spacer4 - - - Horizontal - - - MinimumExpanding - - - - 20 - 20 - - - - - - handles - + + + + + + WStackPage + + + 17 + + + + unnamed + - toolbarBorders + shading + + + + 3 + 0 + 0 + 0 + - + - groupBox2 + customShading - Toolbars + Use Custom Values - + true unnamed - + + + spacer10 + + + Vertical + + + Expanding + + + + 4 + 15 + + + + + + shade2 + + + + 1 + 0 + 0 + 0 + + + + - textLabel1_4_2_2 + shade3 - - Appearance: + + + 1 + 0 + 0 + 0 + - + - toolbarAppearance + shade1 + + + + 1 + 0 + 0 + 0 + - + - textLabel2_2 + shade4 - - Separators: + + + 1 + 0 + 0 + 0 + - + - toolbarSeparators + shade5 + + + + 1 + 0 + 0 + 0 + - + - spacer4_2 + shade0 - - Horizontal + + + 1 + 0 + 0 + 0 + - - MinimumExpanding + + + + textLabel1_10 - - - 20 - 20 - + + + 3 + 3 + 0 + 0 + - - - - - - - - TabPage - - - Advanced - - - - unnamed - - - - gtkComboMenus - - - Gtk style comboboxes (KDE4 only) - - - - - gtkScrollViews - - - Gtk style scrollviews (KDE3 and KDE4 only) - - - - - gtkButtonOrder - - - Gtk button order - - - - - mapKdeIcons - - - Map KDE icons (Gtk2 only) - - - - - fixParentlessDialogs - - - 'Fix' parentless dialogs - - - <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> - -<p>If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.</p> - -<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> - - - - - inactiveHighlight - - - Use blended background/highlight colour for highlight of inactive elements - - - <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> - -<p>If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.</p> + + <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> -<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> - - - - - textLabel1_2 - - - Character to use for password entries: - +1 Is used for the light part of 3d elements - such as the border of tab widgets.<br> +2 Is used for the lighter shade of striped progressbars.<br> +3 Is used for the dark part of 3d elements - such as the border of tab widgets.<br> +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> +5 Is used for the background of pressed widgets, and the border of toolbars (when not dark).<br> +6 Is used as the border of most widgets.</i> + + + WordBreak|AlignTop + + + - + - passwordChar + textLabel1_5 - 4 + 5 0 0 0 - - - - - - - spacer8 - - - Horizontal - - - Expanding - - - - 133 - 6 - - - - - - textLabel1_5 - Shading routine: - - - shading - - - - - spacer7 - - - Vertical - - - Expanding - - - - 20 - 203 - - - - - - spacer6_2 - - - Horizontal - - - Expanding - - - - 321 - 20 - - - - - - optionBtn - - - Options - - + + + framelessGroupBoxes + toggled(bool) + groupBoxLine + setEnabled(bool) + + + flatSbarButtons + toggled(bool) + sbarBgndAppearance + setEnabled(bool) + + + fillSlider + toggled(bool) + sliderFill + setEnabled(bool) + + + flatSbarButtons + toggled(bool) + thinSbarGroove + setEnabled(bool) + + - optionsTab + stackList appearance + sunkenAppearance round buttonEffect + focus + drawStatusBarFrames + framelessGroupBoxes + groupBoxLine + vArrows + stdSidebarButtons + darkerBorders + fadeLines + thinnerBtns + etchEntry + comboSplitter + unifyCombo + gtkComboMenus + doubleGtkComboArrow + comboBtn + customComboBtnColor + unifySpinBtns + unifySpin splitters + splitterHighlight sliderAppearance shadeSliders customSlidersColor + colorSliderMouseOver sliderStyle fillSlider + sliderFill + grooveAppearance + thinSbarGroove scrollbarType + flatSbarButtons + sbarBgndAppearance sliderThumbs progressAppearance - gradientPbGroove stripedProgress animatedProgress + fillProgress + progressGrooveAppearance + progressGrooveColor embolden defBtnIndicator coloredMouseOver highlightFactor lvAppearance + lvButton + sortedLv + customSortedLvColor + forceAlternateLvCols + selectionAppearance + squareLvSelection lvLines - tabAppearance + gtkScrollViews + highlightScrollViews + squareScrollViews + activeTabAppearance highlightTab colorSelTab + tabAppearance + tabMouseOver + roundAllTabs + borderTab + borderInactiveTab + invertBotTab + tabBgnd shadeCheckRadio customCheckRadioColor xCheck - stdFocus - vArrows - drawStatusBarFrames - stdSidebarButtons - framelessGroupBoxes - darkerBorders + smallRadio + crHighlight + crButton + crColor + titlebarAppearance + inactiveTitlebarAppearance + titlebarButtonAppearance + titlebarAlignment + colorTitlebarOnly + titlebarBorder toolbarBorders handles menubarAppearance @@ -965,32 +2684,93 @@ customMenuNormTextColor customMenuSelTextColor menubarMouseOver + colorMenubarMouseOver roundMbTopOnly menuitemAppearance borderMenuitems + menuIcons + useHighlightForMenu lighterPopupMenuBgnd + menuBgndAppearance + menuBgndGrad + menuDelay thinnerMenuItems + menuStripe + customMenuStripeColor + menuStripeAppearance + popupBorder toolbarAppearance toolbarSeparators - gtkComboMenus - gtkScrollViews + dwtAppearance gtkButtonOrder mapKdeIcons fixParentlessDialogs - inactiveHighlight + stdBtnSizes passwordChar + gradCombo + gradStops + gradBorder + stopPosition + stopValue + addButton + updateButton + removeButton + previewColor shading + shade0 + shade1 + shade2 + shade3 + shade4 + shade5 optionBtn + kpushbutton.h + kcolorbutton.h + knuminput.h + knuminput.h + kcolorbutton.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h kcolorbutton.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h kcolorbutton.h knuminput.h knuminput.h kcolorbutton.h kcolorbutton.h kcolorbutton.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + kcolorbutton.h + kpushbutton.h kpushbutton.h + kpushbutton.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + kcolorbutton.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h + knuminput.h -- cgit v1.2.3