diff options
29 files changed, 2466 insertions, 1919 deletions
diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 4fce771..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "admin"] - path = admin - url = http://system@scm.trinitydesktop.org/scm/git/tde-common-admin -[submodule "cmake"] - path = cmake - url = http://system@scm.trinitydesktop.org/scm/git/tde-common-cmake diff --git a/CMakeL10n.txt b/CMakeL10n.txt index 9f0fb1a..6fe92e2 100644 --- a/CMakeL10n.txt +++ b/CMakeL10n.txt @@ -9,15 +9,21 @@ # ################################################# -cmake_minimum_required( VERSION 2.8 ) +cmake_minimum_required( VERSION 3.1 ) ##### include our cmake modules ################# -set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) include( TDEL10n ) ##### create translation templates ############## -tde_l10n_create_template( "qtcurve" ) +tde_l10n_create_template( "messages/qtcurve/" ) + +tde_l10n_create_template( + CATALOG "desktop_files/qtcurve-desktops" + SOURCES + style/*.themerc + colors/*.kcsrc +) diff --git a/CMakeLists.txt b/CMakeLists.txt index c74594b..f75607d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ # ################################################# -cmake_minimum_required( VERSION 2.8 ) +cmake_minimum_required( VERSION 3.1 ) ##### cpack configuration ####################### @@ -19,8 +19,8 @@ set(DEBIAN_PACKAGE_DESCRIPTION "QtCurve for TQt/TDE") set(DEBIAN_PACKAGE_SECTION "tde") set(CPACK_SOURCE_GENERATOR "TBZ2") set(CPACK_PACKAGE_VERSION_MAJOR "1") -set(CPACK_PACKAGE_VERSION_MINOR "6") -set(CPACK_PACKAGE_VERSION_PATCH "2") +set(CPACK_PACKAGE_VERSION_MINOR "8") +set(CPACK_PACKAGE_VERSION_PATCH "5") set(CPACK_PACKAGE_CONTACT "Craig Drummond <craig.p.drummond@gmail.com>") set(QTCURVE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") set(QTCURVE_VERSION_FULL "${QTCURVE_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}") @@ -48,10 +48,14 @@ include( FindPkgConfig ) ##### include our cmake modules ################# -set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) include( TDEMacros ) +##### set version number ######################## + +tde_set_project_version( ) + + ##### setup install paths ####################### include( TDESetupPaths ) @@ -87,7 +91,7 @@ add_subdirectory( style ) add_subdirectory( themes ) add_subdirectory( colors ) tde_conditional_add_subdirectory( BUILD_CONFIG_MODULE config ) -tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) +tde_conditional_add_project_translations( BUILD_TRANSLATIONS ) ##### write configure files ##################### @@ -1,3 +1,56 @@ +1.8.5 +----- +1. Allow scrollbar sliders to be as thin as 5 pixels. At this setting, sliders + will be squared. + +1.8.4 +----- +1. Fix crash upon exit - due to double free. + +1.8.3 +----- +1. If a gradient uses alpha, then blen gradient colour with background + colour - as Qt3 does not support painting with an alpha channel. + +1.8.2 +----- +1. When hiding shortcuts, only show these if widget is enabled. +2. Slightly clean-up code. + +1.8.1 +----- +1. Safer handling of hidden shortcut underscore in popup menus. Only keep + track of menu widget, not its ancestors. +2. If hiding keyboard shortcut underlines: Keep track of open popup menus, + and only show keyboard short cut for the current one. + +1.8.0 +----- +1. Add option to not display keyboard shortcurt underline until 'Alt' is + pressed. +2. Add options to specify appearance of toolbar buttons. +3. Allow to use popup menu shade factor when colouring as per menubar. +4. If highlighting scrollviews, and allow mouse-over for entries, also allow + mouse-over for scrollviews. + +1.7.1 +----- +1. Remove box around arrow in listview lines - to match Gtk better. + +1.7.0 +----- + 1. Add option to use tiled pixmap as background for windows and menus. + 2. Draw line focus for items that cannot use glow focus. + 3. Use popup menu gradient's border setting to determine border type of menus. + 4. Add option to draw standard, raised, or joined toolbar buttons. + 5. Add option to use thinner frames, focus, etc. + 6. If not rounding, enable all 'square' options. + 7. Store background colour setting in XProperty - so that this can be used by + QtCurve twin decoration. + 8. Implement shading popup menus as per memubar settings. + 9. Fix segfault when obtaining MDI colours. +10. Dont overwrite user supplied CMAKE_INSTALL_PREFIX + 1.6.2 ----- 1. Disable the support for 'fix parent-less dialog' option - this causes too many diff --git a/admin b/admin deleted file mode 160000 -Subproject f9148018b2f8a11fd830712c1b508046cc34ff2 diff --git a/cmake b/cmake deleted file mode 160000 -Subproject 47eede594abc7947a83cfb777b5e3c8c0b443d5 diff --git a/colors/CMakeLists.txt b/colors/CMakeLists.txt index d495e42..babdbd4 100644 --- a/colors/CMakeLists.txt +++ b/colors/CMakeLists.txt @@ -1 +1,4 @@ -install(FILES QtCurve.kcsrc DESTINATION ${DATA_INSTALL_DIR}/tdedisplay/color-schemes) +tde_create_translated_desktop( + SOURCE QtCurve.kcsrc + DESTINATION ${DATA_INSTALL_DIR}/tdedisplay/color-schemes +) diff --git a/colors/QtCurve.kcsrc b/colors/QtCurve.kcsrc index d7409dc..f7de1fe 100644 --- a/colors/QtCurve.kcsrc +++ b/colors/QtCurve.kcsrc @@ -1,5 +1,6 @@ [Color Scheme] Name=QtCurve + activeBackground=169,195,228 activeBlend=169,195,228 activeForeground=255,255,255 diff --git a/common/common.h b/common/common.h index 88dfb40..dcc9b5c 100644 --- a/common/common.h +++ b/common/common.h @@ -296,6 +296,10 @@ enum #define SIZE_GRIP_SIZE 12 #define USE_LIGHTER_POPUP_MENU (opts.lighterPopupMenuBgnd) +#define USE_BORDER(B) (GB_SHINE!=(B) && GB_NONE!=(B)) +#define DRAW_MENU_BORDER (APPEARANCE_FLAT!=opts.menuBgndAppearance && opts.version>=MAKE_VERSION(1,7) && \ + USE_BORDER(getGradient(opts.menuBgndAppearance, &opts)->border)) + #define USE_GLOW_FOCUS(mouseOver) (FOCUS_GLOW==opts.focus && (MO_GLOW!=opts.coloredMouseOver || !(mouseOver))) #define USE_SHADED_MENU_BAR_COLORS (SHADE_CUSTOM==opts.shadeMenubars || SHADE_BLEND_SELECTED==opts.shadeMenubars) @@ -552,6 +556,32 @@ typedef enum typedef struct { +#if defined __cplusplus + TQString file; + TQPixmap img; +#else // __cplusplus + const char *file; + GdkPixbuf *img; +#endif // __cplusplus +} TQtCPixmap; + +#define BGND_IMG_ON_BORDER (IMG_FILE==opts.bgndImage.type && opts.bgndImage.onBorder) + +typedef enum +{ + PP_TL, + PP_TM, + PP_TR, + PP_BL, + PP_BM, + PP_BR, + PP_LM, + PP_RM, + PP_CENTRED, +} EPixPos; + +typedef struct +{ EImageType type; bool loaded; #if defined __cplusplus @@ -566,6 +596,13 @@ typedef struct typedef enum { + THIN_BUTTONS = 0x0001, + THIN_MENU_ITEMS = 0x0002, + THIN_FRAMES = 0x0004 +} EThinFlags; + +typedef enum +{ SQUARE_NONE = 0x0000, SQUARE_ENTRY = 0x0001, SQUARE_PROGRESS = 0x0002, @@ -713,6 +750,7 @@ typedef enum APPEARANCE_FADE, /* Only for poupmenu items! */ APPEARANCE_STRIPED = APPEARANCE_FADE, /* Only for windows and menus */ APPEARANCE_NONE = APPEARANCE_FADE, /* Only for titlebars */ + APPEARANCE_FILE, /* Only for windows and menus */ APPEARANCE_LV_BEVELLED, /* To be used only with getGradient */ APPEARANCE_AGUA_MOD, APPEARANCE_LV_AGUA, @@ -777,6 +815,13 @@ typedef enum typedef enum { + TBTN_STANDARD, + TBTN_RAISED, + TBTN_JOINED +} ETBarBtn; + +typedef enum +{ BORDER_FLAT, BORDER_RAISED, BORDER_SUNKEN, @@ -1056,7 +1101,10 @@ typedef struct splitterHighlight, crSize, gbFactor, - gbLabel; + gbLabel, + thin, + tbarBtnAppearance, + tbarBtnEffect; ERound round; bool embolden, highlightTab, @@ -1078,6 +1126,7 @@ typedef struct gtkScrollViews, stdSidebarButtons, toolbarTabs, + hideShortcutUnderline, #ifdef __cplusplus gtkComboMenus, /* @@ -1088,8 +1137,8 @@ typedef struct mapKdeIcons, #if defined CONFIG_DIALOG || ( defined QT4_OR_ABOVE) || !defined __cplusplus gtkButtonOrder, - fadeLines, #endif + fadeLines, reorderGtkButtons, borderMenuitems, colorMenubarMouseOver, @@ -1154,6 +1203,7 @@ typedef struct ESliderStyle sliderStyle; EMouseOver coloredMouseOver; ETBarBorder toolbarBorders; + ETBarBtn tbarBtns; EDefBtnIndicator defBtnIndicator; ELine sliderThumbs, handles, @@ -1221,6 +1271,8 @@ typedef struct #else Gradient *customGradient[NUM_CUSTOM_GRAD]; #endif + TQtCPixmap bgndPixmap; + TQtCPixmap menuBgndPixmap; TQtCImage bgndImage, menuBgndImage; #if !defined __cplusplus || ( defined QT4_OR_ABOVE) @@ -1272,7 +1324,7 @@ static inline double mix(double a, double b, double k) static inline double wrap(double a, double d) { - register double r = fmod( a, d ); + double r = fmod( a, d ); return ( r < 0.0 ? d + r : ( r > 0.0 ? r : 0.0 ) ); } diff --git a/common/config_file.c b/common/config_file.c index 91a9108..95e31ef 100644 --- a/common/config_file.c +++ b/common/config_file.c @@ -1608,7 +1608,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts) TQString filename(TQFile::decodeName(cfgDir)+CONFIG_FILE); if(!TQFile::exists(filename)) - filename=TQFile::decodeName(cfgDir)+"../"OLD_CONFIG_FILE; + filename=TQFile::decodeName(cfgDir)+"../"+OLD_CONFIG_FILE; return readConfig(filename, opts, defOpts); } } @@ -1631,7 +1631,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts) sprintf(filename, "%s"CONFIG_FILE, cfgDir); if(!qtcFileExists(filename)) - sprintf(filename, "%s../"OLD_CONFIG_FILE, cfgDir); + sprintf(filename, "%s../" OLD_CONFIG_FILE, cfgDir); rv=readConfig(filename, opts, defOpts); free(filename); return rv; @@ -2300,7 +2300,7 @@ static bool fileExists(const char *path) static const char * getSystemConfigFile() { - static const char * constFiles[]={ /*"/etc/qt4/"OLD_CONFIG_FILE, "/etc/qt3/"OLD_CONFIG_FILE, "/etc/qt/"OLD_CONFIG_FILE,*/ "/etc/"OLD_CONFIG_FILE, NULL }; + static const char * constFiles[]={ /*"/etc/qt4/" OLD_CONFIG_FILE, "/etc/qt3/" OLD_CONFIG_FILE, "/etc/qt/" OLD_CONFIG_FILE,*/ "/etc/" OLD_CONFIG_FILE, NULL }; int i; diff --git a/common/config_file.c-orig b/common/config_file.c-orig deleted file mode 100644 index b1e3c53..0000000 --- a/common/config_file.c-orig +++ /dev/null @@ -1,1238 +0,0 @@ -/* - QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk - - ---- - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License version 2 as published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - */ - -#include "common.h" -#include <ctype.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <pwd.h> -#include <sys/types.h> - -#define TQTC_MAX_FILENAME_LEN 1024 -#define TQTC_MAX_INPUT_LINE_LEN 256 -#define TQTC_FILE "qtcurvestylerc" - -#ifdef CONFIG_READ -static int c2h(char ch) -{ - return (ch>='0' && ch<='9') ? ch-'0' : - (ch>='a' && ch<='f') ? 10+(ch-'a') : - (ch>='A' && ch<='F') ? 10+(ch-'A') : - 0; -} - -#define ATOH(str) ((c2h(*str)<<4)+c2h(*(str+1))) - -static void setRgb(color *col, const char *str) -{ - if(str && strlen(str)>6) - { - int offset='#'==str[0] ? 1 : 0; -#ifdef __cplusplus - col->setRgb(ATOH(&str[offset]), ATOH(&str[offset+2]), ATOH(&str[offset+4])); -#else - col->red=ATOH(&str[offset])<<8; - col->green=ATOH(&str[offset+2])<<8; - col->blue=ATOH(&str[offset+4])<<8; - col->pixel=0; -#endif - } - else -#ifdef __cplusplus - col->setRgb(0, 0, 0); -#else - col->red=col->green=col->blue=col->pixel=0; -#endif -} - -static EDefBtnIndicator toInd(const char *str, EDefBtnIndicator def) -{ - if(str) - { - if(0==memcmp(str, "fontcolor", 9) || 0==memcmp(str, "border", 6)) - return IND_FONT_COLOR; - if(0==memcmp(str, "none", 4)) - return IND_NONE; - if(0==memcmp(str, "corner", 6)) - return IND_CORNER; - if(0==memcmp(str, "colored", 7)) - return IND_COLORED; - } - - return def; -} - -static ELine toLine(const char *str, ELine def) -{ - if(str) - { - if(0==memcmp(str, "dashes", 6)) - return LINE_DASHES; - if(0==memcmp(str, "none", 4)) - return LINE_NONE; - if(0==memcmp(str, "sunken", 6)) - return LINE_SUNKEN; - if(0==memcmp(str, "dots", 4)) - return LINE_DOTS; - if(0==memcmp(str, "flat", 4)) - return LINE_FLAT; - } - return def; -} - -static ETBarBorder toTBarBorder(const char *str, ETBarBorder def) -{ - if(str) - { - if(0==memcmp(str, "dark", 4)) - return 0==memcmp(&str[4], "-all", 4) ? TB_DARK_ALL : TB_DARK; - if(0==memcmp(str, "none", 4)) - return TB_NONE; - if(0==memcmp(str, "light", 5)) - return 0==memcmp(&str[5], "-all", 4) ? TB_LIGHT_ALL : TB_LIGHT; - } - return def; -} - -static EMouseOver toMouseOver(const char *str, EMouseOver def) -{ - if(str) - { - if(0==memcmp(str, "true", 4) || 0==memcmp(str, "colored", 7)) - return MO_COLORED; - if(0==memcmp(str, "plastik", 7)) - return MO_PLASTIK; - if(0==memcmp(str, "false", 4) || 0==memcmp(str, "none", 4)) - return MO_NONE; - } - return def; -} - -static EAppearance toAppearance(const char *str, EAppearance def) -{ - if(str) - { - if(0==memcmp(str, "flat", 4)) - return APPEARANCE_FLAT; - if(0==memcmp(str, "raised", 6)) - return APPEARANCE_RAISED; - if(0==memcmp(str, "gradient", 8) || 0==memcmp(str, "lightgradient", 13)) - return APPEARANCE_GRADIENT; - if(0==memcmp(str, "splitgradient", 13)) - return APPEARANCE_SPLIT_GRADIENT; - if(0==memcmp(str, "glass", 5) || 0==memcmp(str, "shinyglass", 10)) - return APPEARANCE_SHINY_GLASS; - if(0==memcmp(str, "dullglass", 9)) - return APPEARANCE_DULL_GLASS; - if(0==memcmp(str, "inverted", 8)) - return APPEARANCE_INVERTED; - if(0==memcmp(str, "bevelled", 8)) - return APPEARANCE_BEVELLED; - } - return def; -} - -static EShade toShade(const char *str, bool allowDarken, EShade def) -{ - if(str) - { - /* true/false is from 0.25... */ - if(0==memcmp(str, "true", 4) || 0==memcmp(str, "selected", 8)) - return SHADE_BLEND_SELECTED; - if(0==memcmp(str, "origselected", 12)) - return SHADE_SELECTED; - if(allowDarken && 0==memcmp(str, "darken", 6)) - return SHADE_DARKEN; - if(0==memcmp(str, "custom", 6)) - return SHADE_CUSTOM; - if(0==memcmp(str, "none", 4)) - return SHADE_NONE; - } - - return def; -} - -/* Prior to 0.42 round was a bool - so need to read 'false' as 'none' */ -static ERound toRound(const char *str, ERound def) -{ - if(str) - { - if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5)) - return ROUND_NONE; - if(0==memcmp(str, "slight", 6)) - return ROUND_SLIGHT; - if(0==memcmp(str, "full", 4)) - return ROUND_FULL; - } - - return def; -} - -static EScrollbar toScrollbar(const char *str, EScrollbar def) -{ - if(str) - { - if(0==memcmp(str, "kde", 3)) - return SCROLLBAR_KDE; - if(0==memcmp(str, "windows", 7)) - return SCROLLBAR_WINDOWS; - if(0==memcmp(str, "platinum", 8)) - return SCROLLBAR_PLATINUM; - if(0==memcmp(str, "next", 4)) - return SCROLLBAR_NEXT; - if(0==memcmp(str, "none", 4)) - return SCROLLBAR_NONE; - } - - return def; -} - -static EEffect toEffect(const char *str, EEffect def) -{ - if(str) - { - if(0==memcmp(str, "none", 4)) - return EFFECT_NONE; - if(0==memcmp(str, "shadow", 6)) - return EFFECT_SHADOW; - if(0==memcmp(str, "etch", 4)) - return EFFECT_ETCH; - } - - return def; -} - -static EShading toShading(const char * str, EShading def) -{ - if(str) - { - if(0==memcmp(str, "simple", 6)) - return SHADING_SIMPLE; - if(0==memcmp(str, "hsl", 3)) - return SHADING_HSL; - if(0==memcmp(str, "hsv", 3)) - return SHADING_HSV; - } - - return def; -} - -static EStripe toStripe(const char * str, EStripe def) -{ - if(str) - { - if(0==memcmp(str, "plain", 5) || 0==memcmp(str, "true", 4)) - return STRIPE_PLAIN; - if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5)) - return STRIPE_NONE; - if(0==memcmp(str, "diagonal", 8)) - return STRIPE_DIAGONAL; - } - - return def; -} - -static ESliderStyle toSlider(const char * str, ESliderStyle def) -{ - if(str) - { - if(0==memcmp(str, "round", 5)) - return SLIDER_ROUND; - if(0==memcmp(str, "plain", 5)) - return SLIDER_PLAIN; - if(0==memcmp(str, "triangular", 10)) - return SLIDER_TRIANGULAR; - } - - return def; -} - -#endif - -#ifdef CONFIG_WRITE -#include <kstandarddirs.h> -#endif - -static const char * getHome() -{ - static const char *home=NULL; - - if(!home) - { - struct passwd *p=getpwuid(getuid()); - - if(p) - home=p->pw_dir; - else - { - char *env=getenv("HOME"); - - if(env) - home=env; - } - - if(!home) - home="/tmp"; - } - - return home; -} - -static const char *xdgConfigFolder() -{ - static char xdgDir[TQTC_MAX_FILENAME_LEN]={'\0'}; - - if(!xdgDir[0]) - { - static const char *home=NULL; - -#if 0 - char *env=getenv("XDG_CONFIG_HOME"); - - /* - Check the setting of XDG_CONFIG_HOME - For some reason, sudo leaves the env vars set to those of the - caller - so XDG_CONFIG_HOME would point to the users setting, and - not roots. - - Therefore, check that home is first part of XDG_CONFIG_HOME - */ - - if(env && 0==getuid()) - { - if(!home) - home=getHome(); - if(home && home!=strstr(env, home)) - env=NULL; - } -#else - /* - Hmm... for 'root' dont bother to check env var, just set to ~/.config - - as problems would arise if "sudo tdecmshell style", and then - "sudo su" / "tdecmshell style". The 1st would write to ~/.config, but - if root has a XDG_ set then that would be used on the second :-( - */ - char *env=0==getuid() ? NULL : getenv("XDG_CONFIG_HOME"); -#endif - - if(!env) - { - if(!home) - home=getHome(); - - sprintf(xdgDir, "%s/.config", home); - } - else - strcpy(xdgDir, env); - -#if defined CONFIG_WRITE || !defined __cplusplus - { - struct stat info; - - if(0!=lstat(xdgDir, &info)) - { -#ifdef __cplusplus - TDEStandardDirs::makeDir(xdgDir, 0755); -#else - g_mkdir_with_parents(xdgDir, 0755); -#endif - } - } -#endif - } - - return xdgDir; -} - -#ifdef CONFIG_READ - -#ifdef __cplusplus -#define TQTC_IS_BLACK(A) (0==(A).red() && 0==(A).green() && 0==(A).blue()) -#else -#define TQTC_IS_BLACK(A) (0==(A).red && 0==(A).green && 0==(A).blue) -#endif - -static void checkColor(EShade *s, color *c) -{ - if(SHADE_CUSTOM==*s && TQTC_IS_BLACK(*c)) - *s=SHADE_NONE; -} - -#ifdef __cplusplus - -#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000 -#include <TQMap> -#include <TQFile> -#include <TQTextStream> -#define TQTC_LATIN1(A) A.toLatin1() -#else -#define TQTC_LATIN1(A) A.latin1() - -#include <tqmap.h> -#include <tqfile.h> -#include <tqtextstream.h> -#endif - -class TQtCConfig -{ - public: - - TQtCConfig(const TQString &filename); - - bool ok() const { return values.count()>0; } - const TQString & readEntry(const char *key, const TQString &def=TQString()); - - private: - - TQMap<TQString, TQString> values; -}; - -TQtCConfig::TQtCConfig(const TQString &filename) -{ - TQFile f(filename); - -#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000 - if(f.open(TQIODevice::ReadOnly)) -#else - if(f.open(IO_ReadOnly)) -#endif - { - TQTextStream stream(&f); - TQString line; - - while(!stream.atEnd()) - { - line = stream.readLine(); -#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000 - int pos=line.indexOf('='); -#else - int pos=line.find('='); -#endif - if(-1!=pos) - values[line.left(pos)]=line.mid(pos+1); - } - f.close(); - } -} - -inline const TQString & TQtCConfig::readEntry(const char *key, const TQString &def) -{ - return values.contains(key) ? values[key] : def; -} - -inline TQString readStringEntry(TQtCConfig &cfg, const char *key) -{ - return cfg.readEntry(key); -} - -static int readNumEntry(TQtCConfig &cfg, const char *key, int def) -{ - const TQString &val(readStringEntry(cfg, key)); - - return val.isEmpty() ? def : val.toInt(); -} - -static bool readBoolEntry(TQtCConfig &cfg, const char *key, bool def) -{ - const TQString &val(readStringEntry(cfg, key)); - - return val.isEmpty() ? def : (val=="true" ? true : false); -} - -#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000 -#define TQTC_LATIN1(A) A.toLatin1() -#else -#define TQTC_LATIN1(A) A.latin1() -#endif - -#define TQTC_CFG_READ_COLOR(ENTRY) \ - { \ - TQString sVal(cfg.readEntry(#ENTRY)); \ - if(sVal.isEmpty()) \ - opts->ENTRY=def->ENTRY; \ - else \ - setRgb(&(opts->ENTRY), TQTC_LATIN1(sVal)); \ - } - -#else - -static char * lookupCfgHash(GHashTable **cfg, char *key, char *val) -{ - char *rv=NULL; - - if(!*cfg) - *cfg=g_hash_table_new(g_str_hash, g_str_equal); - else - rv=(char *)g_hash_table_lookup(*cfg, key); - - if(!rv && val) - { - g_hash_table_insert(*cfg, g_strdup(key), g_strdup(val)); - rv=(char *)g_hash_table_lookup(*cfg, key); - } - - return rv; -} - -static GHashTable * loadConfig(const char *filename) -{ - FILE *f=fopen(filename, "r"); - GHashTable *cfg=NULL; - - if(f) - { - char line[TQTC_MAX_INPUT_LINE_LEN]; - - while(NULL!=fgets(line, TQTC_MAX_INPUT_LINE_LEN-1, f)) - { - char *eq=strchr(line, '='); - int pos=eq ? eq-line : -1; - - if(pos>0) - { - char *endl=strchr(line, '\n'); - - if(endl) - *endl='\0'; - - line[pos]='\0'; - - lookupCfgHash(&cfg, line, &line[pos+1]); - } - } - - fclose(f); - } - - return cfg; -} - -static void releaseConfig(GHashTable *cfg) -{ - g_hash_table_destroy(cfg); -} - -static char * readStringEntry(GHashTable *cfg, char *key) -{ - return lookupCfgHash(&cfg, key, NULL); -} - -static int readNumEntry(GHashTable *cfg, char *key, int def) -{ - char *str=readStringEntry(cfg, key); - - return str ? atoi(str) : def; -} - -static gboolean readBoolEntry(GHashTable *cfg, char *key, gboolean def) -{ - char *str=readStringEntry(cfg, key); - - return str ? (0==memcmp(str, "true", 4) ? true : false) : def; -} - -#define TQTC_LATIN1(A) A - -#define TQTC_CFG_READ_COLOR(ENTRY) \ - { \ - const char *str=readStringEntry(cfg, #ENTRY); \ - \ - if(str) \ - setRgb(&(opts->ENTRY), str); \ - else \ - opts->ENTRY=def->ENTRY; \ - } -#endif - -#define TQTC_CFG_READ_NUM(ENTRY) \ - opts->ENTRY=readNumEntry(cfg, #ENTRY, def->ENTRY); - -#define TQTC_CFG_READ_BOOL(ENTRY) \ - opts->ENTRY=readBoolEntry(cfg, #ENTRY, def->ENTRY); - -#define TQTC_CFG_READ_ROUND(ENTRY) \ - opts->ENTRY=toRound(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_DI(ENTRY) \ - opts->ENTRY=((double)(readNumEntry(cfg, #ENTRY, ((int)(def->ENTRY*100))-100)+100))/100.0; - -#define TQTC_CFG_READ_TB_BORDER(ENTRY) \ - opts->ENTRY=toTBarBorder(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_MOUSE_OVER(ENTRY) \ - opts->ENTRY=toMouseOver(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_APPEARANCE(ENTRY, DEF) \ - opts->ENTRY=toAppearance(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF); - -/* -#define TQTC_CFG_READ_APPEARANCE(ENTRY) \ - opts->ENTRY=toAppearance(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); -*/ - -#define TQTC_CFG_READ_STRIPE(ENTRY) \ - opts->ENTRY=toStripe(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_SLIDER(ENTRY) \ - opts->ENTRY=toSlider(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_DEF_BTN(ENTRY) \ - opts->ENTRY=toInd(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_LINE(ENTRY) \ - opts->ENTRY=toLine(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_SHADE(ENTRY, AD) \ - opts->ENTRY=toShade(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), AD, def->ENTRY); - -#define TQTC_CFG_READ_SCROLLBAR(ENTRY) \ - opts->ENTRY=toScrollbar(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#define TQTC_CFG_READ_EFFECT(ENTRY) \ - opts->ENTRY=toEffect(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); - -#ifdef TQTC_CONFIG_DIALOG -#define TQTC_CFG_READ_SHADING(ENTRY, UNUSED) \ - opts->ENTRY=toShading(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY); -#else -#define TQTC_CFG_READ_SHADING(ENTRY, DEF) \ - ENTRY=toShading(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF); -#endif - -#ifdef __cplusplus -static bool readConfig(const TQString &file, Options *opts, Options *def) -#else -static bool readConfig(const char *file, Options *opts, Options *def) -#endif -{ -#ifdef __cplusplus - if(file.isEmpty()) - { - const char *xdg=xdgConfigFolder(); - - if(xdg) - { - TQString filename(xdg); - - filename+="/"TQTC_FILE; - return readConfig(filename, opts, def); - } - } -#else - if(!file) - { - const char *xdg=xdgConfigFolder(); - - if(xdg) - { - char filename[TQTC_MAX_FILENAME_LEN]; - - sprintf(filename, "%s/"TQTC_FILE, xdg); - return readConfig(filename, opts, def); - } - } -#endif - else - { -#ifdef __cplusplus - TQtCConfig cfg(file); - - if(cfg.ok()) - { -#else - GHashTable *cfg=loadConfig(file); - - if(cfg) - { -#endif - TQTC_CFG_READ_NUM(passwordChar) - TQTC_CFG_READ_ROUND(round) - TQTC_CFG_READ_DI(highlightFactor) - TQTC_CFG_READ_TB_BORDER(toolbarBorders) - TQTC_CFG_READ_APPEARANCE(appearance, def->appearance) - TQTC_CFG_READ_BOOL(fixParentlessDialogs) - TQTC_CFG_READ_STRIPE(stripedProgress) - TQTC_CFG_READ_SLIDER(sliderStyle) - TQTC_CFG_READ_BOOL(animatedProgress) - TQTC_CFG_READ_BOOL(lighterPopupMenuBgnd) - TQTC_CFG_READ_BOOL(embolden) - TQTC_CFG_READ_DEF_BTN(defBtnIndicator) - TQTC_CFG_READ_LINE(sliderThumbs) - TQTC_CFG_READ_LINE(handles) - TQTC_CFG_READ_BOOL(highlightTab) - TQTC_CFG_READ_BOOL(colorSelTab) - TQTC_CFG_READ_SHADE(shadeSliders, false) - TQTC_CFG_READ_SHADE(shadeMenubars, true) - TQTC_CFG_READ_SHADE(shadeCheckRadio, false) - TQTC_CFG_READ_APPEARANCE(menubarAppearance, def->menubarAppearance) - TQTC_CFG_READ_APPEARANCE(menuitemAppearance, opts->appearance) - TQTC_CFG_READ_APPEARANCE(toolbarAppearance, def->toolbarAppearance) - TQTC_CFG_READ_LINE(toolbarSeparators) - TQTC_CFG_READ_LINE(splitters) - TQTC_CFG_READ_BOOL(customMenuTextColor) - TQTC_CFG_READ_MOUSE_OVER(coloredMouseOver) - TQTC_CFG_READ_BOOL(menubarMouseOver) - TQTC_CFG_READ_BOOL(shadeMenubarOnlyWhenActive) - TQTC_CFG_READ_BOOL(thinnerMenuItems) - TQTC_CFG_READ_COLOR(customSlidersColor) - TQTC_CFG_READ_COLOR(customMenubarsColor) - TQTC_CFG_READ_COLOR(customMenuSelTextColor) - TQTC_CFG_READ_COLOR(customMenuNormTextColor) - TQTC_CFG_READ_COLOR(customCheckRadioColor) - TQTC_CFG_READ_SCROLLBAR(scrollbarType) - TQTC_CFG_READ_EFFECT(buttonEffect) - TQTC_CFG_READ_APPEARANCE(lvAppearance, opts->appearance) - TQTC_CFG_READ_APPEARANCE(tabAppearance, opts->appearance) - TQTC_CFG_READ_APPEARANCE(sliderAppearance, opts->appearance) - TQTC_CFG_READ_APPEARANCE(progressAppearance, opts->appearance) -#ifndef TQTC_PLAIN_FOCUS_ONLY - TQTC_CFG_READ_BOOL(stdFocus) -#endif - TQTC_CFG_READ_BOOL(lvLines) - TQTC_CFG_READ_BOOL(drawStatusBarFrames) - TQTC_CFG_READ_BOOL(fillSlider) - TQTC_CFG_READ_BOOL(roundMbTopOnly) - TQTC_CFG_READ_BOOL(borderMenuitems) - TQTC_CFG_READ_BOOL(gradientPbGroove) - TQTC_CFG_READ_BOOL(darkerBorders) - TQTC_CFG_READ_BOOL(vArrows) - TQTC_CFG_READ_BOOL(xCheck) - TQTC_CFG_READ_BOOL(framelessGroupBoxes) - TQTC_CFG_READ_BOOL(inactiveHighlight) - TQTC_CFG_READ_BOOL(colorMenubarMouseOver) -#ifdef __cplusplus - TQTC_CFG_READ_BOOL(stdSidebarButtons) - TQTC_CFG_READ_BOOL(gtkScrollViews) - TQTC_CFG_READ_BOOL(gtkComboMenus) -/* -#else - TQTC_CFG_READ_BOOL(setDialogButtonOrder) -*/ -#endif -#if !defined __cplusplus || defined TQTC_CONFIG_DIALOG - TQTC_CFG_READ_BOOL(mapKdeIcons) -#endif -#if defined TQTC_CONFIG_DIALOG || (defined [[[TQT_VERSION IS DEPRECATED]]] && ([[[TQT_VERSION IS DEPRECATED]]] >= 0x040000)) || !defined __cplusplus - TQTC_CFG_READ_BOOL(gtkButtonOrder) -#endif - TQTC_CFG_READ_SHADING(shading, shading); - -#ifndef __cplusplus - releaseConfig(cfg); -#endif - if(SHADE_SELECTED==opts->shadeCheckRadio) - opts->shadeCheckRadio=SHADE_BLEND_SELECTED; - - checkColor(&opts->shadeMenubars, &opts->customMenubarsColor); - checkColor(&opts->shadeSliders, &opts->customSlidersColor); - checkColor(&opts->shadeCheckRadio, &opts->customCheckRadioColor); - - if(APPEARANCE_BEVELLED==opts->toolbarAppearance) - opts->toolbarAppearance=APPEARANCE_GRADIENT; - else if(APPEARANCE_RAISED==opts->toolbarAppearance) - opts->toolbarAppearance=APPEARANCE_FLAT; - - if(APPEARANCE_BEVELLED==opts->menubarAppearance) - opts->menubarAppearance=APPEARANCE_GRADIENT; - else if(APPEARANCE_RAISED==opts->menubarAppearance) - opts->menubarAppearance=APPEARANCE_FLAT; - - if(APPEARANCE_BEVELLED==opts->sliderAppearance) - opts->sliderAppearance=APPEARANCE_GRADIENT; - - if(APPEARANCE_BEVELLED==opts->tabAppearance) - opts->tabAppearance=APPEARANCE_GRADIENT; - - if(opts->highlightFactor<((100.0+MIN_HIGHLIGHT_FACTOR)/100.0) || - opts->highlightFactor>((100.0+MAX_HIGHLIGHT_FACTOR)/100.0)) - opts->highlightFactor=DEFAULT_HIGHLIGHT_FACTOR; - - if(opts->animatedProgress && !opts->stripedProgress) - opts->animatedProgress=false; - - if(opts->colorSelTab && APPEARANCE_GRADIENT!=opts->tabAppearance) - opts->colorSelTab=false; - - if(SHADE_CUSTOM==opts->shadeMenubars || SHADE_BLEND_SELECTED==opts->shadeMenubars || !opts->borderMenuitems) - opts->colorMenubarMouseOver=true; - - return true; - } - } - - return false; -} - -static bool fileExists(const char *path) -{ - struct stat info; - - return 0==lstat(path, &info) && (info.st_mode&S_IFMT)==S_IFREG; -} - -static const char * getSystemConfigFile() -{ - static const char * constFiles[]={ "/etc/qt4/"TQTC_FILE, "/etc/qt3/"TQTC_FILE, "/etc/qt/"TQTC_FILE, NULL }; - - int i; - - for(i=0; constFiles[i]; ++i) - if(fileExists(constFiles[i])) - return constFiles[i]; - return NULL; -} - -static void defaultSettings(Options *opts) -{ - /* Set hard-coded defaults... */ - opts->contrast=7; - opts->passwordChar=0x25CF; - opts->highlightFactor=DEFAULT_HIGHLIGHT_FACTOR; - opts->round=ROUND_FULL; - opts->lighterPopupMenuBgnd=true; - opts->animatedProgress=true; - opts->stripedProgress=STRIPE_DIAGONAL; - opts->sliderStyle=SLIDER_TRIANGULAR; - opts->highlightTab=true; - opts->colorSelTab=false; - opts->embolden=false; - opts->appearance=APPEARANCE_DULL_GLASS; - opts->lvAppearance=APPEARANCE_BEVELLED; - opts->tabAppearance=APPEARANCE_GRADIENT; - opts->sliderAppearance=APPEARANCE_DULL_GLASS; - opts->menubarAppearance=APPEARANCE_GRADIENT; - opts->menuitemAppearance=APPEARANCE_DULL_GLASS; - opts->toolbarAppearance=APPEARANCE_GRADIENT; - opts->progressAppearance=APPEARANCE_DULL_GLASS; - opts->defBtnIndicator=IND_COLORED; - opts->sliderThumbs=LINE_FLAT; - opts->handles=LINE_DOTS; - opts->shadeSliders=SHADE_BLEND_SELECTED; - opts->shadeMenubars=SHADE_DARKEN; - opts->shadeCheckRadio=SHADE_NONE; - opts->toolbarBorders=TB_NONE; - opts->toolbarSeparators=LINE_NONE; - opts->splitters=LINE_FLAT; - opts->fixParentlessDialogs=false; - opts->customMenuTextColor=false; - opts->coloredMouseOver=MO_PLASTIK; - opts->menubarMouseOver=true; - opts->shadeMenubarOnlyWhenActive=true; - opts->thinnerMenuItems=false; - opts->scrollbarType=SCROLLBAR_KDE; - opts->buttonEffect=EFFECT_NONE; -#ifndef TQTC_PLAIN_FOCUS_ONLY - opts->stdFocus=true; -#endif - opts->lvLines=false; - opts->drawStatusBarFrames=false; - opts->fillSlider=true; - opts->roundMbTopOnly=true; - opts->borderMenuitems=true; - opts->gradientPbGroove=true; - opts->darkerBorders=false; - opts->vArrows=false; - opts->xCheck=false; - opts->framelessGroupBoxes=false; - opts->colorMenubarMouseOver=false; - opts->inactiveHighlight=false; -#ifdef TQTC_CONFIG_DIALOG - opts->shading=SHADING_HSL; -#endif -#ifdef __cplusplus - opts->stdSidebarButtons=false; - opts->gtkScrollViews=false; - opts->gtkComboMenus=false; - opts->customMenubarsColor.setRgb(0, 0, 0); - opts->customSlidersColor.setRgb(0, 0, 0); - opts->customMenuNormTextColor.setRgb(0, 0, 0); - opts->customMenuSelTextColor.setRgb(0, 0, 0); - opts->customCheckRadioColor.setRgb(0, 0, 0); -#else -/* - opts->setDialogButtonOrder=false; -*/ - opts->customMenubarsColor.red=opts->customMenubarsColor.green=opts->customMenubarsColor.blue=0; - opts->customSlidersColor.red=opts->customSlidersColor.green=opts->customSlidersColor.blue=0; - opts->customMenuNormTextColor.red=opts->customMenuNormTextColor.green=opts->customMenuNormTextColor.blue=0; - opts->customMenuSelTextColor.red=opts->customMenuSelTextColor.green=opts->customMenuSelTextColor.blue=0; - opts->customCheckRadioColor.red=opts->customCheckRadioColor.green=opts->customCheckRadioColor.blue=0; -#endif - -#if !defined __cplusplus || defined TQTC_CONFIG_DIALOG - opts->mapKdeIcons=true; -#endif -#if defined TQTC_CONFIG_DIALOG || (defined [[[TQT_VERSION IS DEPRECATED]]] && ([[[TQT_VERSION IS DEPRECATED]]] >= 0x040000)) || !defined __cplusplus - opts->gtkButtonOrder=false; -#endif - - /* Read system config file... */ - { - static const char * systemFilename=NULL; - - if(!systemFilename) - systemFilename=getSystemConfigFile(); - - if(systemFilename) - readConfig(systemFilename, opts, opts); - } -} - -#endif - -#ifdef CONFIG_WRITE -static const char *toStr(EDefBtnIndicator ind) -{ - switch(ind) - { - case IND_NONE: - return "none"; - case IND_FONT_COLOR: - return "fontcolor"; - case IND_CORNER: - return "corner"; - default: - return "colored"; - } -} - -static const char *toStr(ELine ind, bool none) -{ - switch(ind) - { - case LINE_DOTS: - return "dots"; - case LINE_DASHES: - return none ? "none" : "dashes"; - case LINE_FLAT: - return "flat"; - default: - return "sunken"; - } -} - -static const char *toStr(ETBarBorder ind) -{ - switch(ind) - { - case TB_DARK: - return "dark"; - case TB_DARK_ALL: - return "dark-all"; - case TB_LIGHT_ALL: - return "light-all"; - case TB_NONE: - return "none"; - default: - return "light"; - } -} - -static const char *toStr(EMouseOver mo) -{ - switch(mo) - { - case MO_COLORED: - return "colored"; - case MO_NONE: - return "none"; - default: - return "plastik"; - } -} - -static const char *toStr(EAppearance exp) -{ - switch(exp) - { - case APPEARANCE_FLAT: - return "flat"; - case APPEARANCE_RAISED: - return "raised"; - case APPEARANCE_GRADIENT: - return "gradient"; - case APPEARANCE_SPLIT_GRADIENT: - return "splitgradient"; - case APPEARANCE_DULL_GLASS: - return "dullglass"; - case APPEARANCE_BEVELLED: - return "bevelled"; - case APPEARANCE_INVERTED: - return "inverted"; - default: - return "shinyglass"; - } -} - -static const char *toStr(EShade exp, bool dark, bool convertBlendSelToSel) -{ - switch(exp) - { - default: - case SHADE_NONE: - return "none"; - case SHADE_BLEND_SELECTED: - return dark || !convertBlendSelToSel ? "selected" : "origselected"; - case SHADE_CUSTOM: - return "custom"; - /* case SHADE_SELECTED */ - case SHADE_DARKEN: - return dark ? "darken" : "origselected"; - } -} - -static const char *toStr(ERound exp) -{ - switch(exp) - { - case ROUND_NONE: - return "none"; - case ROUND_SLIGHT: - return "slight"; - default: - case ROUND_FULL: - return "full"; - } -} - -static const char *toStr(EScrollbar sb) -{ - switch(sb) - { - case SCROLLBAR_KDE: - return "kde"; - default: - case SCROLLBAR_WINDOWS: - return "windows"; - case SCROLLBAR_PLATINUM: - return "platinum"; - case SCROLLBAR_NEXT: - return "next"; - case SCROLLBAR_NONE: - return "none"; - } -} - -static const char *toStr(EEffect e) -{ - switch(e) - { - case EFFECT_NONE: - return "none"; - default: - case EFFECT_SHADOW: - return "shadow"; - case EFFECT_ETCH: - return "etch"; - } -} - -inline const char * toStr(bool b) { return b ? "true" : "false"; } - -static TQString toStr(const TQColor &col) -{ - TQString colorStr; - - colorStr.sprintf("#%02X%02X%02X", col.red(), col.green(), col.blue()); - return colorStr; -} - -static const char *toStr(EShading s) -{ - switch(s) - { - case SHADING_SIMPLE: - return "simple"; - default: - case SHADING_HSL: - return "hsl"; - case SHADING_HSV: - return "hsv"; - } -} - -static const char *toStr(EStripe s) -{ - switch(s) - { - default: - case STRIPE_PLAIN: - return "plain"; - case STRIPE_NONE: - return "none"; - case STRIPE_DIAGONAL: - return "diagonal"; - } -} - -static const char *toStr(ESliderStyle s) -{ - switch(s) - { - case SLIDER_PLAIN: - return "plain"; - case SLIDER_TRIANGULAR: - return "triangular"; - default: - case SLIDER_ROUND: - return "round"; - } -} - -#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000 -#define CFG config -#else -#define CFG (*cfg) -#endif - -#define CFG_WRITE_ENTRY(ENTRY) \ - if (!exportingStyle && def.ENTRY==opts.ENTRY) \ - CFG.deleteEntry(#ENTRY); \ - else \ - CFG.writeEntry(#ENTRY, toStr(opts.ENTRY)); - -#define CFG_WRITE_ENTRY_FORCE(ENTRY) \ - CFG.writeEntry(#ENTRY, toStr(opts.ENTRY)); - -#define CFG_WRITE_ENTRY_B(ENTRY, B) \ - if (!exportingStyle && def.ENTRY==opts.ENTRY) \ - CFG.deleteEntry(#ENTRY); \ - else \ - CFG.writeEntry(#ENTRY, toStr(opts.ENTRY, B)); - -#define CFG_WRITE_ENTRY_SHADE(ENTRY, DARK, CONVERT_SHADE) \ - if (!exportingStyle && def.ENTRY==opts.ENTRY) \ - CFG.deleteEntry(#ENTRY); \ - else \ - CFG.writeEntry(#ENTRY, toStr(opts.ENTRY, DARK, CONVERT_SHADE)); - -#define CFG_WRITE_ENTRY_D(ENTRY) \ - if (!exportingStyle && def.ENTRY==opts.ENTRY) \ - CFG.deleteEntry(#ENTRY); \ - else \ - CFG.writeEntry(#ENTRY, ((int)(opts.ENTRY*100))-100); - -#define CFG_WRITE_ENTRY_NUM(ENTRY) \ - if (!exportingStyle && def.ENTRY==opts.ENTRY) \ - CFG.deleteEntry(#ENTRY); \ - else \ - CFG.writeEntry(#ENTRY, opts.ENTRY); - -bool static writeConfig(TDEConfig *cfg, const Options &opts, const Options &def, bool exportingStyle=false) -{ - if(!cfg) - { - const char *xdg=xdgConfigFolder(); - - if(xdg) - { - char filename[TQTC_MAX_FILENAME_LEN]; - - sprintf(filename, "%s/"TQTC_FILE, xdg); - -#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000 - TDEConfig defCfg(filename, TDEConfig::SimpleConfig); -#else - TDEConfig defCfg(filename, false, false); -#endif - - return writeConfig(&defCfg, opts, def, exportingStyle); - } - } - else - { -#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000 - TDEConfigGroup config(cfg, TQTC_GROUP); -#else - cfg->setGroup(TQTC_GROUP); -#endif - CFG_WRITE_ENTRY_NUM(passwordChar) - CFG_WRITE_ENTRY(round) - CFG_WRITE_ENTRY_D(highlightFactor) - CFG_WRITE_ENTRY(toolbarBorders) - CFG_WRITE_ENTRY_FORCE(appearance) - CFG_WRITE_ENTRY(fixParentlessDialogs) - CFG_WRITE_ENTRY(stripedProgress) - CFG_WRITE_ENTRY(sliderStyle) - CFG_WRITE_ENTRY(animatedProgress) - CFG_WRITE_ENTRY(lighterPopupMenuBgnd) - CFG_WRITE_ENTRY(embolden) - CFG_WRITE_ENTRY(defBtnIndicator) - CFG_WRITE_ENTRY_B(sliderThumbs, true) - CFG_WRITE_ENTRY_B(handles, false) - CFG_WRITE_ENTRY(highlightTab) - CFG_WRITE_ENTRY(colorSelTab) - CFG_WRITE_ENTRY_SHADE(shadeSliders, false, false) - CFG_WRITE_ENTRY_SHADE(shadeMenubars, true, false) - CFG_WRITE_ENTRY_SHADE(shadeCheckRadio, false, true) - CFG_WRITE_ENTRY_FORCE(menubarAppearance) - CFG_WRITE_ENTRY_FORCE(menuitemAppearance) - CFG_WRITE_ENTRY_FORCE(toolbarAppearance) - CFG_WRITE_ENTRY_B(toolbarSeparators, true) - CFG_WRITE_ENTRY_B(splitters, false) - CFG_WRITE_ENTRY(customMenuTextColor) - CFG_WRITE_ENTRY(coloredMouseOver) - CFG_WRITE_ENTRY(menubarMouseOver) - CFG_WRITE_ENTRY(shadeMenubarOnlyWhenActive) - CFG_WRITE_ENTRY(thinnerMenuItems) - CFG_WRITE_ENTRY(customSlidersColor) - CFG_WRITE_ENTRY(customMenubarsColor) - CFG_WRITE_ENTRY(customMenuSelTextColor) - CFG_WRITE_ENTRY(customMenuNormTextColor) - CFG_WRITE_ENTRY(customCheckRadioColor) - CFG_WRITE_ENTRY(scrollbarType) - CFG_WRITE_ENTRY(buttonEffect) - CFG_WRITE_ENTRY_FORCE(lvAppearance) - CFG_WRITE_ENTRY_FORCE(tabAppearance) - CFG_WRITE_ENTRY_FORCE(sliderAppearance) - CFG_WRITE_ENTRY_FORCE(progressAppearance) -#ifndef TQTC_PLAIN_FOCUS_ONLY - CFG_WRITE_ENTRY(stdFocus) -#endif - CFG_WRITE_ENTRY(lvLines) - CFG_WRITE_ENTRY(drawStatusBarFrames) - CFG_WRITE_ENTRY(fillSlider) - CFG_WRITE_ENTRY(roundMbTopOnly) - CFG_WRITE_ENTRY(borderMenuitems) - CFG_WRITE_ENTRY(gradientPbGroove) - CFG_WRITE_ENTRY(darkerBorders) - CFG_WRITE_ENTRY(vArrows) - CFG_WRITE_ENTRY(xCheck) - CFG_WRITE_ENTRY(framelessGroupBoxes) - CFG_WRITE_ENTRY(inactiveHighlight) -#ifdef __cplusplus - CFG_WRITE_ENTRY(stdSidebarButtons) -#endif - - CFG_WRITE_ENTRY(gtkScrollViews) - CFG_WRITE_ENTRY(gtkComboMenus) - CFG_WRITE_ENTRY(gtkButtonOrder) - CFG_WRITE_ENTRY(mapKdeIcons) - CFG_WRITE_ENTRY(shading) - cfg->sync(); - return true; - } - return false; -} -#endif diff --git a/config/exportthemedialog.cpp b/config/exportthemedialog.cpp index 32bd2e5..ccb9cce 100644 --- a/config/exportthemedialog.cpp +++ b/config/exportthemedialog.cpp @@ -64,7 +64,7 @@ void CExportThemeDialog::slotOk() KMessageBox::error(this, i18n("Name is empty!")); else { - TQString fileName(themeUrl->url()+"/"THEME_PREFIX+name+".themerc"); + TQString fileName(themeUrl->url()+"/"+THEME_PREFIX+name+".themerc"); TDEConfig cfg(fileName, false, false); bool rv(!cfg.isReadOnly()); diff --git a/config/qtcurveconfig.cpp b/config/qtcurveconfig.cpp index 64ffcae..78e1ea4 100644 --- a/config/qtcurveconfig.cpp +++ b/config/qtcurveconfig.cpp @@ -85,10 +85,10 @@ static void drawGradient(const TQColor &top, const TQColor &bot, bool increase, 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 rl(rTop << 16); + int gl(gTop << 16); + int bl(bTop << 16); + int i; int dr(((1<<16) * (bot.red() - rTop)) / size), dg(((1<<16) * (bot.green() - gTop)) / size), @@ -799,7 +799,7 @@ QtCurveConfig::~QtCurveConfig() void QtCurveConfig::loadStyles(TQPopupMenu *menu) { - TQStringList files(TDEGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true)); + TQStringList files(TDEGlobal::dirs()->findAllResources("data", "QtCurve/*" EXTENSION, false, true)); files.sort(); @@ -1374,9 +1374,11 @@ void QtCurveConfig::roundChanged() void QtCurveConfig::importStyle() { TQString file(KFileDialog::getOpenFileName(TQString::null, - i18n("*"EXTENSION"|QtCurve Settings Files\n" - THEME_PREFIX"*"THEME_SUFFIX"|QtCurve TDE Theme Files"), - this)); + TQString("*%1|").arg(EXTENSION)+ + i18n("QtCurve Settings Files") + "\n" + + TQString("%1*%2|").arg(THEME_PREFIX).arg(THEME_SUFFIX)+ + i18n("QtCurve TDE Theme Files"), + this)); if(!file.isEmpty()) loadStyle(file); @@ -1384,7 +1386,7 @@ void QtCurveConfig::importStyle() void QtCurveConfig::exportStyle() { - TQString file(KFileDialog::getSaveFileName(TQString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this)); + TQString file(KFileDialog::getSaveFileName(TQString::null, TQString("*%1|").arg(EXTENSION)+i18n("QtCurve Settings Files"), this)); if(!file.isEmpty()) { diff --git a/config/qtcurveconfigbase.ui b/config/qtcurveconfigbase.ui index a5d7c1f..d5040c9 100644 --- a/config/qtcurveconfigbase.ui +++ b/config/qtcurveconfigbase.ui @@ -270,9 +270,6 @@ <property name="text"> <string>Draw fading lines (KDE4 && Gtk2)</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <widget class="TQCheckBox" row="11" column="0"> <property name="name"> @@ -281,9 +278,6 @@ <property name="text"> <string>Thinner buttons when etched/shadowed</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <spacer row="13" column="1"> <property name="name"> diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt deleted file mode 100644 index deef1da..0000000 --- a/po/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po ) - -if( _srcs ) - tde_create_translation( LANG auto OUTPUT_NAME qtcurve ) -endif( ) diff --git a/po/generate.sh b/po/generate.sh deleted file mode 100755 index efd9121..0000000 --- a/po/generate.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -BASEDIR=".." # root of translatable sources -PROJECT="qtcurve" # project name -BUGADDR="http://sourceforge.net/tracker/?group_id=50231&atid=459007" # MSGID-Bugs -WDIR=`pwd` # working dir -echo "Preparing rc files" -cd ${BASEDIR} -# we use simple sorting to make sure the lines do not jump around too much from system to system -find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list -xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.cpp -# additional string for TDEAboutData -echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp -echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp -cd ${WDIR} -echo "Done preparing rc files" - -echo "Extracting messages" -cd ${BASEDIR} -# see above on sorting -find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list -echo "rc.cpp" >> ${WDIR}/infiles.list -cd ${WDIR} -xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \ - -kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \ - --msgid-bugs-address="${BUGADDR}" \ - --files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; } - -#Fix charset... -cat ${PROJECT}.pot | sed s^charset=CHARSET^charset=UTF-8^g > ${PROJECT}.pot-new -mv ${PROJECT}.pot-new ${PROJECT}.pot - -echo "Done extracting messages" - -echo "Merging translations" -catalogs=`find . -name '*.po'` -for cat in $catalogs; do - echo $cat - msgmerge -o $cat.new $cat ${PROJECT}.pot - mv $cat.new $cat -done -echo "Done merging translations" - -echo "Cleaning up" -cd ${WDIR} -rm rcfiles.list -rm infiles.list -rm rc.cpp -echo "Done" diff --git a/style/CMakeLists.txt b/style/CMakeLists.txt index 94e80f5..fc14b38 100644 --- a/style/CMakeLists.txt +++ b/style/CMakeLists.txt @@ -29,15 +29,18 @@ link_directories( ##### other data ################################ -install( FILES qtcurve.themerc DESTINATION ${DATA_INSTALL_DIR}/tdestyle/themes ) +tde_create_translated_desktop( + SOURCE qtcurve.themerc + DESTINATION ${DATA_INSTALL_DIR}/tdestyle/themes +) -##### plastik ################################### +##### qtcurve ################################### set( target qtcurve ) set( ${target}_SRCS - qtcurve.cpp pixmaps.h + qtcurve.cpp pixmaps.h shortcuthandler.cpp ) tde_add_kpart( ${target} AUTOMOC diff --git a/style/qtc_fixx11h.h b/style/qtc_fixx11h.h index 572870a..4eba111 100644 --- a/style/qtc_fixx11h.h +++ b/style/qtc_fixx11h.h @@ -5,12 +5,12 @@ If you get compile errors caused by X11 includes (the line where first error appears contains word like None, Unsorted, - Below, etc.), put #include <fixx11h.h> in the .cpp file + Below, etc.), put #include <fixx11h.h> in the .cpp file (not .h file!) between the place where X11 headers are included and the place where the file with compile error is included (or the place where the compile error in the .cpp file occurs). - + This file remaps X11 #defines to const variables or inline functions. The side effect may be that these symbols may now refer to different variables diff --git a/style/qtc_tdestyle.cpp b/style/qtc_tdestyle.cpp index abe7bf4..5981f8f 100644 --- a/style/qtc_tdestyle.cpp +++ b/style/qtc_tdestyle.cpp @@ -130,7 +130,7 @@ void TQtCTDEStyle::polish( TQStyleControlElementData ceData, ControlElementFlags TQFrame::Shape shape = frame->frameShape(); if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) installObjectEventHandler(ceData, elementFlags, ptr, this); - } + } } } } @@ -147,7 +147,7 @@ void TQtCTDEStyle::unPolish( TQStyleControlElementData ceData, ControlElementFla TQFrame::Shape shape = frame->frameShape(); if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) removeObjectEventHandler(ceData, elementFlags, ptr, this); - } + } } } } @@ -884,7 +884,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) sibling = sibling->nextSibling(); } while (sibling && !sibling->isVisible()); - + return sibling; } @@ -1736,8 +1736,4 @@ bool TQtCTDEStyle::objectEventHandler( TQStyleControlElementData ceData, Control void TQtCTDEStyle::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } - -// vim: set noet ts=4 sw=4: -// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off; - #include "qtc_tdestyle.moc" diff --git a/style/qtc_tdestyle.h b/style/qtc_tdestyle.h index 9d01a15..d9843df 100644 --- a/style/qtc_tdestyle.h +++ b/style/qtc_tdestyle.h @@ -1,12 +1,12 @@ /* * $Id$ - * + * * TDEStyle * Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org> - * + * * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech, * Copyright (C) 1998-2000 TrollTech AS. - * + * * Many thanks to Bradley T. Hughes for the 3 button scrollbar code. * * This library is free software; you can redistribute it and/or @@ -35,9 +35,9 @@ #include <tqcommonstyle.h> struct TQtCTDEStylePrivate; -/** +/** * Simplifies and extends the TQStyle API to make style coding easier. - * + * * The TDEStyle class provides a simple internal menu transparency engine * which attempts to use XRender for accelerated blending where requested, * or falls back to fast internal software tinting/blending routines. @@ -53,24 +53,23 @@ struct TQtCTDEStylePrivate; class TQtCTDEStyle: public TQCommonStyle { Q_OBJECT - public: /** * TQtCTDEStyle Flags: - * + * * @li Default - Default style setting, where menu transparency * and the FilledFrameWorkaround are disabled. - * + * * @li AllowMenuTransparency - Enable this flag to use TQtCTDEStyle's * internal menu transparency engine. - * - * @li FilledFrameWorkaround - Enable this flag to facilitate - * proper repaints of TQMenuBars and TQToolBars when the style chooses - * to paint the interior of a TQFrame. The style primitives in question + * + * @li FilledFrameWorkaround - Enable this flag to facilitate + * proper repaints of TQMenuBars and TQToolBars when the style chooses + * to paint the interior of a TQFrame. The style primitives in question * are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses - * this workaround to enable painting of gradients in menubars and + * this workaround to enable painting of gradients in menubars and * toolbars. */ typedef uint TDEStyleFlags; @@ -90,12 +89,12 @@ class TQtCTDEStyle: public TQCommonStyle * @li WindowsStyleScrollBar - Two button scrollbar with the previous * button at the top/left, and the next button at the bottom/right. * - * @li PlatinumStyleScrollBar - Two button scrollbar with both the + * @li PlatinumStyleScrollBar - Two button scrollbar with both the * previous and next buttons at the bottom/right. * * @li ThreeButtonScrollBar - %KDE style three button scrollbar with * two previous buttons, and one next button. The next button is always - * at the bottom/right, whilst the two previous buttons are on either + * at the bottom/right, whilst the two previous buttons are on either * end of the scrollbar. * * @li NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but @@ -110,14 +109,14 @@ class TQtCTDEStyle: public TQCommonStyle NextStyleScrollBar = 0x00000004 //!< two button, NeXT style }; - /** + /** * Constructs a TDEStyle object. * * Select the appropriate TDEStyle flags and scrollbar type * for your style. The user's style preferences selected in KControl * are read by using TQSettings and are automatically applied to the style. * As a fallback, TDEStyle paints progressbars and tabbars. It inherits from - * TQCommonStyle for speed, so don't expect much to be implemented. + * TQCommonStyle for speed, so don't expect much to be implemented. * * It is advisable to use a currently implemented style such as the HighColor * style as a foundation for any new TDEStyle, so the limited number of @@ -132,7 +131,7 @@ class TQtCTDEStyle: public TQCommonStyle TQtCTDEStyle( TDEStyleFlags flags = TQtCTDEStyle::Default, TDEStyleScrollBarType sbtype = TQtCTDEStyle::WindowsStyleScrollBar ); - /** + /** * Destructs the TQtCTDEStyle object. */ ~TQtCTDEStyle(); @@ -144,7 +143,7 @@ class TQtCTDEStyle: public TQCommonStyle /** * Modifies the scrollbar type used by the style. - * + * * This function is only provided for convenience. It allows * you to make a late decision about what scrollbar type to use for the * style after performing some processing in your style's constructor. @@ -165,12 +164,12 @@ class TQtCTDEStyle: public TQCommonStyle /** * TDEStyle Primitive Elements: * - * The TDEStyle class extends the TQt's Style API by providing certain + * The TDEStyle class extends the TQt's Style API by providing certain * simplifications for parts of TQStyle. To do this, the TDEStylePrimitive * elements were defined, which are very similar to TQt's PrimitiveElement. - * - * The first three Handle primitives simplify and extend PE_DockWindowHandle, - * so do not reimplement PE_DockWindowHandle if you want the TDEStyle handle + * + * The first three Handle primitives simplify and extend PE_DockWindowHandle, + * so do not reimplement PE_DockWindowHandle if you want the TDEStyle handle * simplifications to be operable. Similarly do not reimplement CC_Slider, * SC_SliderGroove and SC_SliderHandle when using the TDEStyle slider * primitives. TDEStyle automatically double-buffers slider painting @@ -190,7 +189,7 @@ class TQtCTDEStyle: public TQCommonStyle * as the applet handles used in Kicker. The default implementation paints a filled * rect of arbitrary color. * - * @li KPE_SliderGroove - This primitive must be reimplemented. It is used to + * @li KPE_SliderGroove - This primitive must be reimplemented. It is used to * paint the slider groove. The default implementation paints a filled rect of * arbitrary color. * @@ -199,7 +198,7 @@ class TQtCTDEStyle: public TQCommonStyle * arbitrary color. * * @li KPE_ListViewExpander - This primitive is already implemented in TDEStyle. It - * is used to draw the Expand/Collapse element in TQListViews. To indicate the + * is used to draw the Expand/Collapse element in TQListViews. To indicate the * expanded state, the style flags are set to Style_Off, while Style_On implies collapsed. * * @li KPE_ListViewBranch - This primitive is already implemented in TDEStyle. It is @@ -218,8 +217,8 @@ class TQtCTDEStyle: public TQCommonStyle }; /** - * This function is identical to TQt's TQStyle::drawPrimitive(), except that - * it adds one further parameter, 'widget', that can be used to determine + * This function is identical to TQt's TQStyle::drawPrimitive(), except that + * it adds one further parameter, 'widget', that can be used to determine * the widget state of the TDEStylePrimitive in question. * * @see TDEStyle::TDEStylePrimitive @@ -302,10 +301,10 @@ class TQtCTDEStyle: public TQCommonStyle const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; - int pixelMetric( PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, + int pixelMetric( PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const; - TQRect subRect( SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, + TQRect subRect( SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const; TQPixmap stylePixmap( StylePixmap stylepixmap, @@ -314,7 +313,7 @@ class TQtCTDEStyle: public TQCommonStyle const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; - int styleHint( StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, + int styleHint( StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn* shr = 0, const TQWidget* w = 0 ) const; @@ -332,8 +331,5 @@ class TQtCTDEStyle: public TQCommonStyle private: TQtCTDEStylePrivate *d; }; - - -// vim: set noet ts=4 sw=4: #endif diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index 9f06adb..7ceb358 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -110,6 +110,7 @@ dimension, so as to draw the scrollbar at the correct size. #include <iostream> #define COMMON_FUNCTIONS #include "qtcurve.h" +#include "shortcuthandler.h" #define CONFIG_READ #include "config_file.c" #include "pixmaps.h" @@ -145,7 +146,7 @@ static void emitMenuSize(const TQWidget *widget, unsigned short size) if(w) { - static const Atom constAtom = XInternAtom(tqt_xdisplay(), MENU_SIZE_ATOM, False); + static const Atom constAtom = XInternAtom(tqt_xdisplay(), MENU_SIZE_ATOM, False); XChangeProperty(tqt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(), constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&size, 1); } @@ -157,9 +158,12 @@ void setBgndProp(TQWidget *widget, unsigned short app) if(w) { - static const Atom constAtom = XInternAtom(tqt_xdisplay(), BGND_ATOM, False); + static const Atom constAtom = XInternAtom(tqt_xdisplay(), BGND_ATOM, False); + unsigned long prop=((APPEARANCE_STRIPED==app || APPEARANCE_FILE==app ? app : APPEARANCE_FLAT)&0xFF) | + (widget->palette().active().background().rgb()&0x00FFFFFF)<<8; + XChangeProperty(tqt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(), - constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&app, 1); + constAtom, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&prop, 1); } } @@ -186,6 +190,39 @@ static void triggerWMMove(const TQWidget *w, const TQPoint &p) #define MO_ARROW_X(FLAGS, COL) (MO_NONE!=opts.coloredMouseOver && FLAGS&Style_MouseOver && FLAGS&Style_Enabled ? itsMouseOverCols[ARROW_MO_SHADE] : COL) #define MO_ARROW(COL) MO_ARROW_X(flags, COL) +static void adjustToolbarButtons(const TQWidget *widget, const TQToolBar *toolbar, int &leftAdjust, int &topAdjust, + int &rightAdjust, int &bottomAdjust, int &round) +{ + const int constAdjust=4; + const int d = 1; + TQRect geo(widget->geometry()); + + if (TQt::Horizontal==toolbar->orientation()) + { + bool haveLeft=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.x()-d, geo.y())), + haveRight=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.right()+d, geo.y())); + + if(haveLeft && haveRight) + leftAdjust=-constAdjust, rightAdjust=constAdjust, round=ROUNDED_NONE; + else if(haveLeft) + leftAdjust=-constAdjust, round=ROUNDED_RIGHT; + else if(haveRight) + rightAdjust=constAdjust, round=ROUNDED_LEFT; + } + else + { + bool haveTop=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.x(), geo.y()-d)), + haveBot=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.x(), geo.bottom()+d)); + + if(haveTop && haveBot) + topAdjust=-constAdjust, bottomAdjust=constAdjust, round=ROUNDED_NONE; + else if(haveTop) + topAdjust=-constAdjust, round=ROUNDED_BOTTOM; + else if(haveBot) + bottomAdjust=constAdjust, round=ROUNDED_TOP; + } +} + static const int constMenuPixmapWidth=22; static bool useTQt3Settings() @@ -479,6 +516,20 @@ static bool inStackWidget(const TQWidget *w) return false; } +static bool isOnToolbar(const TQWidget *widget, TQPainter *p) +{ + const TQWidget *wid=widget ? widget->parentWidget() : (p && p->device() ? dynamic_cast<TQWidget *>(p->device()) : 0L); + + while(wid) + { + if(::tqqt_cast<const TQToolBar *>(wid)) + return true; + wid=wid->parentWidget(); + } + + return false; +} + static void setRgb(TQColor *col, const TQStringList &rgb) { if(3==rgb.size()) @@ -683,11 +734,11 @@ enum ECacheFlags CACHE_COL_SEL_TAB }; -static TQString createKey(int size, TQRgb color, bool horiz, int app, ECacheFlags flags) +static TQString createKey(int size, TQRgb color, TQRgb bgnd, bool horiz, int app, ECacheFlags flags) { TQString key; - TQTextOStream(&key) << size << '-' << color << '-' << horiz << '-' << app << '-' << flags; + TQTextOStream(&key) << size << '-' << color << '-' << bgnd << '-' << horiz << '-' << app << '-' << flags; return key; } @@ -809,6 +860,7 @@ QtCurveStyle::QtCurveStyle(const TQString &name) QtCurveStyle::QtCurveStyle() #endif : BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar), + itsPopupMenuCols(0L), itsSliderCols(0L), itsDefBtnCols(0L), itsMouseOverCols(0L), @@ -834,7 +886,8 @@ QtCurveStyle::QtCurveStyle() itsActive(true), itsIsSpecialHover(false), itsDragWidget(0L), - itsDragWidgetHadMouseTracking(false) + itsDragWidgetHadMouseTracking(false), + itsShortcutHandler(new ShortcutHandler(this)) { #ifdef TQTC_STYLE_SUPPORT TQString rcFile; @@ -1076,10 +1129,6 @@ QtCurveStyle::QtCurveStyle() setMenuColors(TQApplication::palette().active()); - if(USE_LIGHTER_POPUP_MENU) - itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE], - TO_FACTOR(opts.lighterPopupMenuBgnd)); - if ((SHADE_CUSTOM==opts.shadeMenubars || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars) && "soffice.bin"==TQString(tqApp->argv()[0]) && TOO_DARK(SHADE_CUSTOM==opts.shadeMenubars ? opts.customMenubarsColor @@ -1111,9 +1160,10 @@ QtCurveStyle::QtCurveStyle() QtCurveStyle::~QtCurveStyle() { - if(itsSidebarButtonsCols!=itsSliderCols && - itsSidebarButtonsCols!=itsDefBtnCols) + if(itsSidebarButtonsCols!=itsSliderCols && itsSidebarButtonsCols!=itsDefBtnCols) delete [] itsSidebarButtonsCols; + if(itsPopupMenuCols && itsPopupMenuCols!=itsMenubarCols && itsPopupMenuCols!=itsBackgroundCols && itsPopupMenuCols!=itsActiveMdiColors) + delete [] itsPopupMenuCols; if(itsActiveMdiColors && itsActiveMdiColors!=itsHighlightCols && itsActiveMdiColors!=itsBackgroundCols) delete [] itsActiveMdiColors; if(itsMdiColors && itsMdiColors!=itsBackgroundCols) @@ -1152,6 +1202,12 @@ static TQString getFile(const TQString &f) return d; } +inline void addEventFilter(TQObject *object, TQObject *filter) +{ + object->removeEventFilter(filter); + object->installEventFilter(filter); +} + void QtCurveStyle::applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) { @@ -1244,6 +1300,19 @@ void QtCurveStyle::applicationPolish(const TQStyleControlElementData &ceData, Co if(opts.fixParentlessDialogs && (opts.noDlgFixApps.contains(appName) || opts.noDlgFixApps.contains("kde"))) opts.fixParentlessDialogs=false; #endif +// BASE_STYLE::polish(app); + if(opts.hideShortcutUnderline) + addEventFilter(app, itsShortcutHandler); + } +} + +void QtCurveStyle::applicationUnPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) +{ + if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) { + TQApplication *app = reinterpret_cast<TQApplication*>(ptr); + if(opts.hideShortcutUnderline) + app->removeEventFilter(itsShortcutHandler); +// BASE_STYLE::unPolish(app); } } @@ -1376,10 +1445,6 @@ void QtCurveStyle::polish(TQPalette &pal) shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSidebarButtonsCols); - if(USE_LIGHTER_POPUP_MENU && newGray) - itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE], - TO_FACTOR(opts.lighterPopupMenuBgnd)); - if(newCheckRadioSelCols) { if(SHADE_BLEND_SELECTED==opts.crColor) { shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsCheckRadioSelCols); @@ -1419,6 +1484,35 @@ void QtCurveStyle::polish(TQPalette &pal) if(APPEARANCE_STRIPED==opts.bgndAppearance) pal.setBrush(TQColorGroup::Background, TQBrush(pal.active().background(), *createStripePixmap(pal.active().background(), true))); + else if(APPEARANCE_FILE==opts.bgndAppearance) + { + TQPixmap pix(opts.bgndPixmap.img.width(), opts.bgndPixmap.img.height()); + TQPainter p(&pix); + WindowBorders borders=qtcGetWindowBorderSize(); + int xadjust=borders.sides>0 && borders.sides!=opts.bgndPixmap.img.width() + ? borders.sides>opts.bgndPixmap.img.width() + ? borders.sides%opts.bgndPixmap.img.width() + : borders.sides + :0, + yadjust=borders.titleHeight>0 && borders.titleHeight!=opts.bgndPixmap.img.height() + ? borders.titleHeight>opts.bgndPixmap.img.height() + ? borders.titleHeight%opts.bgndPixmap.img.height() + : borders.titleHeight + :0; + + p.fillRect(0, 0, opts.bgndPixmap.img.width(), opts.bgndPixmap.img.height(), pal.active().background()); + + p.drawPixmap(-xadjust, -yadjust, opts.bgndPixmap.img); + if(xadjust>0) + p.drawPixmap(opts.bgndPixmap.img.width()-xadjust, -yadjust, opts.bgndPixmap.img); + if(yadjust>0) + p.drawPixmap(-xadjust, opts.bgndPixmap.img.height()-yadjust, opts.bgndPixmap.img); + if(xadjust>0 && yadjust>0) + p.drawPixmap(opts.bgndPixmap.img.width()-xadjust, opts.bgndPixmap.img.height()-yadjust, opts.bgndPixmap.img); + + p.end(); + pal.setBrush(TQColorGroup::Background, TQBrush(pal.active().background(), pix)); + } } static TQColor disable(const TQColor &col, const TQColor &bgnd) @@ -1479,8 +1573,11 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen if(isWindowDragWidget(TQT_TQOBJECT(widget))) installObjectEventHandler(ceData, elementFlags, ptr, this); - if(APPEARANCE_STRIPED==opts.bgndAppearance && (::tqqt_cast<TQDialog *>(widget) || ::tqqt_cast<TQMainWindow *>(widget))) - setBgndProp(widget, APPEARANCE_STRIPED); + if(::tqqt_cast<TQDialog *>(widget) || ::tqqt_cast<TQMainWindow *>(widget)) + { + setBgndProp(widget, opts.bgndAppearance); + installObjectEventHandler(ceData, elementFlags, ptr, this); // To trap palette change + } if(widget->parentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->parentWidget())) { @@ -1547,8 +1644,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen (widget->parentWidget() && ::tqqt_cast<const TQListBox *>(widget) && ::tqqt_cast<const TQComboBox *>(widget->parentWidget())))) ((TQFrame *)widget)->setLineWidth(0); - else if ((USE_LIGHTER_POPUP_MENU || !IS_FLAT_BGND(opts.menuBgndAppearance)) && !opts.borderMenuitems && - widget && ::tqqt_cast<const TQPopupMenu *>(widget)) + else if (!DRAW_MENU_BORDER && !opts.borderMenuitems && widget && ::tqqt_cast<const TQPopupMenu *>(widget)) ((TQFrame *)widget)->setLineWidth(1); if (::tqqt_cast<TQRadioButton *>(widget) || ::tqqt_cast<TQCheckBox *>(widget)) @@ -1623,39 +1719,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen installObjectEventHandler(ceData, elementFlags, ptr, this); if(BLEND_TITLEBAR || opts.windowBorder&WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR) emitMenuSize(widget, ceData.rect.height()); - if(SHADE_WINDOW_BORDER==opts.shadeMenubars) - { - TQPalette pal(ceData.palette); - TQColorGroup act(pal.active()); - TQColorGroup inact(pal.inactive()); - - getMdiColors(act, true); - act.setColor(TQColorGroup::Foreground, itsActiveMdiTextColor); - inact.setColor(TQColorGroup::Foreground, opts.shadeMenubarOnlyWhenActive ? itsMdiTextColor : itsActiveMdiTextColor); - pal.setInactive(inact); - pal.setActive(act); - widget->setPalette(pal); - } - else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars || - (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) - { - TQPalette pal(ceData.palette); - TQColorGroup act(pal.active()); - - act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor - ? opts.customMenuNormTextColor - : TQApplication::palette().active().highlightedText()); - - if(!opts.shadeMenubarOnlyWhenActive) - { - TQColorGroup inact(pal.inactive()); - inact.setColor(TQColorGroup::Foreground, act.color(TQColorGroup::Foreground)); - pal.setInactive(inact); - } - - pal.setActive(act); - widget->setPalette(pal); - } + setMenuTextColors(widget, true); } else if(::tqqt_cast<TQToolBar *>(widget)) { @@ -1663,7 +1727,10 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen widget->setBackgroundMode(PaletteBackground); } else if(::tqqt_cast<TQPopupMenu *>(widget)) + { widget->setBackgroundMode(NoBackground); // PaletteBackground); + setMenuTextColors(widget, true); + } else if (ceData.widgetObjectTypes.contains("TDEToolBarSeparator") || (ceData.widgetObjectTypes.contains("TDEListViewSearchLineWidget") && widget->parent() && ::tqqt_cast<TQToolBar *>(widget->parent()))) @@ -1837,7 +1904,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen widget->setPalette(pal); } - if(APPEARANCE_STRIPED==opts.bgndAppearance) + if(APPEARANCE_STRIPED==opts.bgndAppearance || APPEARANCE_FILE==opts.bgndAppearance) widget->setBackgroundOrigin(TQWidget::WindowOrigin); } @@ -2096,15 +2163,21 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, { TQWidget *widget=(TQWidget*)object; TQPainter painter(widget); - TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : ceData.palette.active().background()); + const TQColor *pc(popupMenuCols(widget->palette().active())); + TQColor col(pc[ORIGINAL_SHADE]); if(APPEARANCE_STRIPED==opts.menuBgndAppearance) { painter.drawTiledPixmap(ceData.rect, *createStripePixmap(col, false)); } + else if(APPEARANCE_FILE==opts.menuBgndAppearance) + { + painter.fillRect(widget->rect(), col); + painter.drawTiledPixmap(widget->rect(), opts.menuBgndPixmap.img); + } else { - drawBevelGradientReal(col, &painter, ceData.rect, GT_HORIZ==opts.menuBgndGrad, false, + drawBevelGradientReal(col, col, &painter, ceData.rect, GT_HORIZ==opts.menuBgndGrad, false, opts.menuBgndAppearance, WIDGET_OTHER); } return false; @@ -2324,7 +2397,8 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, default: break; } - + if(TQEvent::PaletteChange==event->type() && (::tqqt_cast<TQDialog *>(object) || ::tqqt_cast<TQMainWindow *>(object))) + setBgndProp(static_cast<TQWidget *>(object), opts.bgndAppearance); #ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(object)) { @@ -2438,12 +2512,13 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, itsHoverTab=0L; itsHoverWidget->repaint(false); } - else if(!itsHoverWidget->hasMouseTracking() || - (itsFormMode=isFormWidget(itsHoverWidget))) + else if(!itsHoverWidget->hasMouseTracking() || (itsFormMode=isFormWidget(itsHoverWidget))) { itsHoverWidget->repaint(false); itsFormMode=false; } + else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView *>(itsHoverWidget)) + itsHoverWidget->repaint(false); } else itsHoverWidget=0L; @@ -2479,38 +2554,38 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, return BASE_STYLE::objectEventHandler(ceData, elementFlags, source, event); } -void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig, - const TQColorGroup &cg, SFlags flags, - int round, const TQColor &fill, const TQColor *custom, - bool doBorder, bool doCorners, EWidget w) const +void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig, const TQColorGroup &cg, SFlags flags, int round, + const TQColor &fill, const TQColor *custom, bool doBorder, bool doCorners, EWidget w, const TQWidget *widget) const { - EAppearance app(widgetApp(w, &opts)); + EAppearance app(widgetApp(APPEARANCE_NONE!=opts.tbarBtnAppearance && + (WIDGET_TOOLBAR_BUTTON==w || (WIDGET_BUTTON(w) && isOnToolbar(widget, p))) + ? WIDGET_TOOLBAR_BUTTON : w, &opts)); TQRect r(rOrig), - br(r); - bool bevelledButton(WIDGET_BUTTON(w) && APPEARANCE_BEVELLED==app), - sunken(flags &(Style_Down|Style_On|Style_Sunken)), - flatWidget(WIDGET_PROGRESSBAR==w && !opts.borderProgress), - lightBorder(!flatWidget && DRAW_LIGHT_BORDER(sunken , w, app)), - draw3dfull(!flatWidget && !lightBorder && DRAW_3D_FULL_BORDER(sunken, app)), - draw3d(!flatWidget && (draw3dfull || (!lightBorder && DRAW_3D_BORDER(sunken, app)))), - doColouredMouseOver(!sunken && doBorder && + br(r); + bool bevelledButton(WIDGET_BUTTON(w) && APPEARANCE_BEVELLED==app), + sunken(flags &(Style_Down|Style_On|Style_Sunken)), + flatWidget(WIDGET_PROGRESSBAR==w && !opts.borderProgress), + lightBorder(!flatWidget && DRAW_LIGHT_BORDER(sunken , w, app)), + draw3dfull(!flatWidget && !lightBorder && DRAW_3D_FULL_BORDER(sunken, app)), + draw3d(!flatWidget && (draw3dfull || (!lightBorder && DRAW_3D_BORDER(sunken, app)))), + doColouredMouseOver(!sunken && doBorder && opts.coloredMouseOver && flags&Style_MouseOver && WIDGET_SPIN!=w && WIDGET_COMBO_BUTTON!=w && WIDGET_SB_BUTTON!=w && (WIDGET_SB_SLIDER!=w || !opts.colorSliderMouseOver) && !(flags&DW_CLOSE_BUTTON) && (opts.coloredTbarMo || !(flags&STD_TOOLBUTTON)) && (flags&CHECK_BUTTON || flags&TOGGLE_BUTTON || !sunken)), - plastikMouseOver(doColouredMouseOver && MO_PLASTIK==opts.coloredMouseOver), - colouredMouseOver(doColouredMouseOver && + plastikMouseOver(doColouredMouseOver && MO_PLASTIK==opts.coloredMouseOver), + colouredMouseOver(doColouredMouseOver && (MO_COLORED==opts.coloredMouseOver || MO_COLORED_THICK==opts.coloredMouseOver || (MO_GLOW==opts.coloredMouseOver && itsFormMode))), - doEtch(!itsFormMode && doBorder && ETCH_WIDGET(w) && !(flags&CHECK_BUTTON) && + doEtch(!itsFormMode && doBorder && ETCH_WIDGET(w) && !(flags&CHECK_BUTTON) && DO_EFFECT), - glowFocus(doEtch && USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled), - sunkenToggleMo(sunken && !(flags&Style_Down) && flags&(Style_MouseOver|TOGGLE_BUTTON)), - horiz(flags&Style_Horizontal); + glowFocus(doEtch && USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled), + sunkenToggleMo(sunken && !(flags&Style_Down) && flags&(Style_MouseOver|TOGGLE_BUTTON)), + horiz(flags&Style_Horizontal); const TQColor *cols(custom ? custom : itsBackgroundCols), - *border(colouredMouseOver ? borderColors(flags, cols) : cols); + *border(colouredMouseOver ? borderColors(flags, cols) : cols); p->save(); @@ -2530,7 +2605,7 @@ void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRec p->setClipRegion(p->clipRegion().eor(TQRegion(br))); } br.addCoords(1, 1,-1,-1); - drawBevelGradient(fill, p, br, horiz, sunken, app, w); + drawBevelGradient(fill, bgnd, p, br, horiz, sunken, app, w); br.addCoords(-1, -1, 1, 1); if(WIDGET_PROGRESSBAR==w && opts.stripedProgress) p->restore(); @@ -2541,7 +2616,7 @@ void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRec else if(colouredMouseOver || (draw3d && flags&Style_Raised)) { int dark(/*bevelledButton ? */2/* : 4*/); - + if(colouredMouseOver) p->setPen(border[MO_STD_LIGHT(w, sunken)]); else @@ -2602,16 +2677,16 @@ void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRec if(horiz) { - drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x()+so, r.y(), len, r.height()), + drawBevelGradient(itsMouseOverCols[col], bgnd, p, TQRect(r.x()+so, r.y(), len, r.height()), horiz, sunken, app, w); - drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x()+r.width()-eo, r.y(), len, r.height()), + drawBevelGradient(itsMouseOverCols[col], bgnd, p, TQRect(r.x()+r.width()-eo, r.y(), len, r.height()), horiz, sunken, app, w); } else { - drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x(), r.y()+so, r.width(), len), + drawBevelGradient(itsMouseOverCols[col], bgnd, p, TQRect(r.x(), r.y()+so, r.width(), len), horiz, sunken, app, w); - drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x(), r.y()+r.height()-eo, r.width(), len), + drawBevelGradient(itsMouseOverCols[col], bgnd, p, TQRect(r.x(), r.y()+r.height()-eo, r.width(), len), horiz, sunken, app, w); } } @@ -2672,7 +2747,7 @@ void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRec ? itsMouseOverCols : itsButtonCols : cols; - + if((!sunken || sunkenToggleMo) && flags&Style_Enabled && !glowFocus && ((((doEtch && WIDGET_OTHER!=w && WIDGET_SLIDER_TROUGH!=w) || WIDGET_COMBO==w || WIDGET_SB_SLIDER==w) && MO_GLOW==opts.coloredMouseOver && flags&Style_MouseOver) || @@ -2688,7 +2763,7 @@ void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRec } if(doEtch || glowFocus) { - if( (!sunken || sunkenToggleMo) && + if( (!sunken || sunkenToggleMo) && !(opts.thin&THIN_FRAMES) && ((WIDGET_OTHER!=w && WIDGET_SLIDER_TROUGH!=w && MO_GLOW==opts.coloredMouseOver && flags&Style_MouseOver) || glowFocus || (WIDGET_DEF_BUTTON==w && IND_GLOW==opts.defBtnIndicator)/* || @@ -2696,7 +2771,7 @@ void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRec drawGlow(p, rOrig, cg, WIDGET_DEF_BUTTON==w && flags&Style_MouseOver ? WIDGET_STD_BUTTON : w, glowFocus ? itsFocusCols : 0); else - drawEtch(p, rOrig, cg, EFFECT_SHADOW==opts.buttonEffect && WIDGET_BUTTON(w) && !sunken, ROUNDED_NONE==round); + drawEtch(p, rOrig, cg, EFFECT_SHADOW==opts.buttonEffect && WIDGET_BUTTON(w) && !sunken, ROUNDED_NONE==round, w); } p->restore(); @@ -2737,12 +2812,15 @@ void QtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &c } } -void QtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const +void QtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square, EWidget w) const { square=square || ROUND_NONE==opts.round; int mod(square ? 0 : 2); + if(WIDGET_TOOLBAR_BUTTON==w && EFFECT_ETCH==opts.tbarBtnEffect) + raised=false; + { TQColor col(raised ? shade(cg.background(), ETCHED_DARK) : itsBackgroundCols[1]); @@ -2797,40 +2875,41 @@ void QtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r if(WIDGET_TAB_BOT==w || WIDGET_TAB_TOP==w) cols=itsBackgroundCols; - switch(borderProfile) - { - case BORDER_FLAT: - break; - case BORDER_RAISED: - case BORDER_SUNKEN: - case BORDER_LIGHT: - if(flags&Style_Enabled && (hasMouseOver || hasFocus) && (WIDGET_ENTRY==w || WIDGET_SCROLLVIEW==w || WIDGET_COMBO==w || WIDGET_SPIN==w)) - p->setPen(midColorF(cg.background(), cols[BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile - ? 0 : FRAME_DARK_SHADOW], 1.5-ENTRY_INNER_ALPHA)); - else - p->setPen(flags&Style_Enabled && (BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile || APPEARANCE_FLAT!=app) - ? blendBorderColors - ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile - ? 0 : FRAME_DARK_SHADOW]) // Was base??? - : cols[BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile ? 0 : FRAME_DARK_SHADOW] - : cg.background()); - p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2); - p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1); - if(!hasFocus && !hasMouseOver && BORDER_LIGHT!=borderProfile) - p->setPen(WIDGET_SCROLLVIEW==w - ? cg.background() - : WIDGET_ENTRY==w - ? cg.base() - : flags&Style_Enabled && (BORDER_SUNKEN==borderProfile || APPEARANCE_FLAT!=app || - WIDGET_TAB_TOP==w || WIDGET_TAB_BOT==w) - ? blendBorderColors - ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile - ? FRAME_DARK_SHADOW : 0]) // Was base??? - : cols[BORDER_RAISED==borderProfile ? FRAME_DARK_SHADOW : 0] - : cg.background()); - p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()+r.height()-2); - p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+r.width()-2, r.y()+r.height()-2); - } + if(!(opts.thin&THIN_FRAMES)) + switch(borderProfile) + { + case BORDER_FLAT: + break; + case BORDER_RAISED: + case BORDER_SUNKEN: + case BORDER_LIGHT: + if(flags&Style_Enabled && (hasMouseOver || hasFocus) && (WIDGET_ENTRY==w || WIDGET_SCROLLVIEW==w || WIDGET_COMBO==w || WIDGET_SPIN==w)) + p->setPen(midColorF(cg.background(), cols[BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile + ? 0 : FRAME_DARK_SHADOW], 1.5-ENTRY_INNER_ALPHA)); + else + p->setPen(flags&Style_Enabled && (BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile || APPEARANCE_FLAT!=app) + ? blendBorderColors + ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile + ? 0 : FRAME_DARK_SHADOW]) // Was base??? + : cols[BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile ? 0 : FRAME_DARK_SHADOW] + : cg.background()); + p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2); + p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1); + if(!hasFocus && !hasMouseOver && BORDER_LIGHT!=borderProfile) + p->setPen(WIDGET_SCROLLVIEW==w + ? cg.background() + : WIDGET_ENTRY==w + ? cg.base() + : flags&Style_Enabled && (BORDER_SUNKEN==borderProfile || APPEARANCE_FLAT!=app || + WIDGET_TAB_TOP==w || WIDGET_TAB_BOT==w) + ? blendBorderColors + ? midColor(cg.background(), cols[BORDER_RAISED==borderProfile + ? FRAME_DARK_SHADOW : 0]) // Was base??? + : cols[BORDER_RAISED==borderProfile ? FRAME_DARK_SHADOW : 0] + : cg.background()); + p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()+r.height()-2); + p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+r.width()-2, r.y()+r.height()-2); + } if(ROUNDED && ROUNDED_NONE!=round) { @@ -3247,7 +3326,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS bool menuTitle(widget && (ceData.widgetObjectTypes.count() > 0) && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1].ascii(), "TDEPopupTitle")); const TQColor *use(buttonColors(cg)); TQRect r2(r); - + if(menuTitle) r2.addCoords(2, 2, -2, -2); drawLightBevel(p, r2, cg, flags|Style_Horizontal, ROUNDED_ALL, getFill(flags, use), use); @@ -3257,7 +3336,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS const TQColor *use(flags&Style_Enabled && itsSortedLvColors && isSort ? itsSortedLvColors : opts.lvButton ? buttonColors(cg) : backgroundColors(cg)); - + flags=((flags|Style_Sunken)^Style_Sunken)| Style_Raised; if(NO_SECT!=itsHoverSect && HOVER_HEADER==itsHover && itsHoverWidget) @@ -3270,7 +3349,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS bool sunken(flags &(Style_Down | Style_On | Style_Sunken)); - drawBevelGradient(getFill(flags, use), p, r, flags&Style_Horizontal, + drawBevelGradient(getFill(flags, use), cg.background(), p, r, flags&Style_Horizontal, sunken, opts.lvAppearance, WIDGET_LISTVIEW_HEADER); if(APPEARANCE_RAISED==opts.lvAppearance) @@ -3548,7 +3627,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS if(IS_FLAT(opts.appearance)) p->fillRect(TQRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), bgnd); else - drawBevelGradient(bgnd, p, TQRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), true, + drawBevelGradient(bgnd, bgnd, p, TQRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), true, drawSunken, app, wid); if(MO_NONE!=opts.coloredMouseOver && !glow && sflags&Style_MouseOver && sflags&Style_Enabled) @@ -3681,7 +3760,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS p->save(); if(opts.crHighlight && sflags&Style_MouseOver) - drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, r, true, + drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), cg.background(), p, r, true, false, opts.selectionAppearance, WIDGET_SELECTION); else p->fillRect(r, cg.background()); @@ -3698,7 +3777,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS if(IS_FLAT(opts.appearance)) p->fillRect(TQRect(x+1, y+1, rect.width()-2, rect.height()-2), bgnd); else - drawBevelGradient(bgnd, p, TQRect(x+1, y+1, rect.width()-2, rect.height()-2), true, + drawBevelGradient(bgnd, bgnd, p, TQRect(x+1, y+1, rect.width()-2, rect.height()-2), true, drawSunken, app, wid); if(coloredMo) @@ -3822,9 +3901,9 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS if(0!=opts.tabBgnd && p->device() && inStackWidget(dynamic_cast<const TQWidget *>(p->device()))) color=shade(color, TO_FACTOR(opts.tabBgnd)); - + if(flags&Style_MouseOver && opts.splitterHighlight) - drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.splitterHighlight)), p, r, !(flags&Style_Horizontal), + drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.splitterHighlight)), cg.background(), p, r, !(flags&Style_Horizontal), false, opts.selectionAppearance, WIDGET_SELECTION); else p->fillRect(r, color); @@ -3856,7 +3935,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS (!((TQGroupBox *)(p->device()))->title().isEmpty() || ((TQGroupBox *)(p->device()))->isCheckable())) r2.addCoords(8, 0, -8, 0); p->setPen(backgroundColors(cg)[STD_BORDER]); - p->drawLine(r2.x(), r2.y(), r2.x()+r2.width()-1, r2.y()); + p->drawLine(r2.x(), r2.y(), r2.x()+r2.width()-1, r2.y()); } else if (FRAME_NONE!=opts.groupBox) { if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault()) @@ -3889,8 +3968,6 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS (sv || (widget && widget->parentWidget() && ::tqqt_cast<const TQFrame *>(widget) && widget->parentWidget()->inherits("KateView")))); - const TQColor *use(opts.highlightScrollViews && /*!square &&*/ flags&Style_HasFocus ? itsHighlightCols : - backgroundColors(cg)); // if(square) // { @@ -3909,19 +3986,29 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS flags&=~Style_HasFocus; if(sv && opts.etchEntry && ((TQFrame *)widget)->lineWidth()>2) { - drawEntryField(p, r, cg, flags, flags&Style_Enabled - ? /*flags&Style_MouseOver + drawEntryField(p, r, cg, flags, flags&Style_Enabled && opts.highlightScrollViews + ? flags&Style_MouseOver ? ENTRY_MOUSE_OVER - :*/ flags&Style_HasFocus + : flags&Style_HasFocus ? ENTRY_FOCUS : ENTRY_NONE : ENTRY_NONE, square ? ROUNDED_NONE : ROUNDED_ALL, WIDGET_SCROLLVIEW); } else + { + const TQColor *use(sv && opts.highlightScrollViews + ? widget==itsHoverWidget + ? itsMouseOverCols + : flags&Style_HasFocus + ? itsFocusCols + : backgroundColors(cg) + : backgroundColors(cg)); + drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal|Style_Enabled), square ? ROUNDED_NONE : ROUNDED_ALL, use, sv ? WIDGET_SCROLLVIEW : WIDGET_OTHER, APP_KICKER!=itsThemedApp, itsIsTransKicker ? BORDER_FLAT : (flags&Style_Sunken ? BORDER_SUNKEN : BORDER_RAISED) ); + } itsFormMode=false; } } @@ -3940,26 +4027,33 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS } case PE_PanelPopup: { - const TQColor *use(backgroundColors(cg)); + const TQColor *use(popupMenuCols(cg)); + EGradientBorder border=getGradient(opts.menuBgndAppearance, &opts)->border; p->setPen(use[STD_BORDER]); p->setBrush(NoBrush); p->drawRect(r); - if(!IS_FLAT_BGND(opts.menuBgndAppearance)) - ; - else if(USE_LIGHTER_POPUP_MENU) + + if(USE_BORDER(border) && APPEARANCE_FLAT!=opts.menuBgndAppearance) { - p->setPen(/*USE_LIGHTER_POPUP_MENU ? */itsLighterPopupMenuBgndCol/* : cg.background()*/); - p->drawRect(TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2)); + p->setPen(use[0]); + if(GB_LIGHT==border) + p->drawRect(TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2)); + else + { + if(GB_3D==border) + p->setPen(use[ORIGINAL_SHADE]); + p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1); + p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2); + p->setPen(use[FRAME_DARK_SHADOW]); + p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+r.width()-2, r.y()+r.height()-2); + p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()+r.height()-2); + } } - else + else if(IS_FLAT_BGND(opts.menuBgndAppearance)) { - p->setPen(use[0]); - p->drawLine(r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1); - p->drawLine(r.x()+1, r.y()+1, r.x()+1, r.y()+r.height()-2); - p->setPen(use[FRAME_DARK_SHADOW]); - p->drawLine(r.x()+1, r.y()+r.height()-2, r.x()+r.width()-2, r.y()+r.height()-2); - p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()+r.height()-2); + p->setPen(/*USE_LIGHTER_POPUP_MENU ? */use[ORIGINAL_SHADE]/* : cg.background()*/); + p->drawRect(TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2)); } break; } @@ -3989,7 +4083,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS case PE_PanelDockWindow: case PE_PanelMenuBar: { - // fix for toolbar lag (from Mosfet Liquid) + // fix for toolbar lag (from Mosfet Liquid) TQWidget *w = dynamic_cast<TQWidget *>(p->device()); if(w) @@ -4092,7 +4186,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS p->setClipRegion(TQRegion(s2)+TQRegion(addpage)); if(opts.flatSbarButtons && SCROLLBAR_NONE!=opts.scrollbarType && ROUNDED && !IS_FLAT(opts.sbarBgndAppearance)) - drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], p, r, flags&Style_Horizontal, false, + drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], itsBackgroundCols[ORIGINAL_SHADE], p, r, flags&Style_Horizontal, false, opts.sbarBgndAppearance, WIDGET_SB_BGND); else if(opts.thinSbarGroove && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons) && IS_FLAT(opts.sbarBgndAppearance)) { @@ -4253,13 +4347,13 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS (dynamic_cast<const TQButton *>(widget) || dynamic_cast<const TQComboBox *>(widget))) return; - if(FOCUS_LINE==opts.focus) + if(FOCUS_LINE==opts.focus || FOCUS_GLOW==opts.focus) { p->setPen(view && flags&Style_Selected ? cg.highlightedText() : itsFocusCols[FOCUS_SHADE(flags&Style_Selected)]); p->drawLine(r.x(), r.y()+r.height()-1, r.x()+r.width()-1, r.y()+r.height()-1); - } + } else if(r.width()<4 || r.height()<4 || view) { // TQRect r2(r); @@ -4342,7 +4436,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS // if((opts.square&SQUARE_SCROLLVIEW) && scrollView) // { // const TQColor *use(backgroundColors(cg)); -// +// // p->setPen(use[STD_BORDER]); // p->drawLine(r.bottomLeft(), r.topLeft()); // p->drawLine(r.topLeft(), r.topRight()); @@ -4366,7 +4460,7 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS if(flags&Style_Enabled && isReadOnly) flags-=Style_Enabled; } - + // HACK!! (From Plastik) // // In this place there is no reliable way to detect if we are in tdehtml; the @@ -4382,8 +4476,8 @@ void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQS TQRect r2(r); r2.addCoords(1, 1, -1, -1); // p->fillRect(r2, flags&Style_Enabled ? cg.base() : cg.background()); - drawEntryField(p, r, cg, flags, !isReadOnly && isEnabled - ? flags&Style_MouseOver && !scrollView + drawEntryField(p, r, cg, flags, !isReadOnly && isEnabled && (!scrollView || opts.highlightScrollViews) + ? flags&Style_MouseOver ? ENTRY_MOUSE_OVER : flags&Style_HasFocus ? ENTRY_FOCUS @@ -4492,7 +4586,7 @@ void QtCurveStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, co { case KPE_ToolBarHandle: { - if(APPEARANCE_STRIPED!=opts.bgndAppearance) + if(APPEARANCE_STRIPED!=opts.bgndAppearance && APPEARANCE_FILE!=opts.bgndAppearance) { TQRect r2(r); r2.addCoords(-1, -1, 2, 2); @@ -4509,7 +4603,7 @@ void QtCurveStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, co r.rect(&x, &y, &w, &h); if(!IS_FLAT(opts.dwtAppearance)) - drawBevelGradient(cg.background(), p, r, horizontal, false, opts.dwtAppearance, WIDGET_DOCK_WIDGET_TITLE); + drawBevelGradient(cg.background(), cg.background(), p, r, horizontal, false, opts.dwtAppearance, WIDGET_DOCK_WIDGET_TITLE); else p->fillRect(r, cg.background()); // .dark(DW_BGND)); // p->setPen(itsBackgroundCols[STD_BORDER]); @@ -4584,7 +4678,7 @@ void QtCurveStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, co { TQRect ar(r.x()+((r.width()-(LV_SIZE+4))>>1), r.y()+((r.height()-(LV_SIZE+4))>>1), LV_SIZE+4, LV_SIZE+4); - +#if 0 if(LV_OLD==opts.lvLines) { int lo(ROUNDED ? 2 : 0); @@ -4611,7 +4705,7 @@ void QtCurveStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, co ar.y()+ar.height()-2); } } - +#endif ::drawArrow(p, ar, flags&Style_Enabled ? cg.mid() : cg.text(), flags&Style_On // Collapsed = On ? TQApplication::reverseLayout() ? PE_ArrowLeft @@ -4664,7 +4758,9 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty itsHover(itsHoverTab && itsHoverTab->isEnabled() && data.tab()==itsHoverTab && !(flags&Style_Selected) && ceData.tabBarData.currentTabIndex!=tabIndex), - glowMo(!active && itsHover && opts.coloredMouseOver && TAB_MO_GLOW==opts.tabMouseOver); + glowMo(!active && itsHover && opts.coloredMouseOver && TAB_MO_GLOW==opts.tabMouseOver), + thin(opts.thin&THIN_FRAMES), + drawOuterGlow(glowMo && !thin); int sizeAdjust(!active && TAB_MO_GLOW==opts.tabMouseOver ? 1 : 0); const TQColor &fill(getTabFill(flags&Style_Selected, itsHover, itsBackgroundCols)); EBorder borderProfile(active || opts.borderInactiveTab @@ -4703,7 +4799,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty rx.addCoords(1, 0, -1, -6); p->fillRect(rx, shade(cg.background(), TO_FACTOR(opts.tabBgnd))); } - + if(!active) { if(top) { tr.addCoords(0, 2, 0, 0); @@ -4730,11 +4826,11 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty if(opts.tabBgnd) col=shade(col, TO_FACTOR(opts.tabBgnd)); - + if(invertedSel) p->fillRect(glowTr, col); else - drawBevelGradient(col, p, glowTr, true, + drawBevelGradient(col, cg.background(), p, glowTr, true, active, active ? SEL_TAB_APP : NORM_TAB_APP, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT); drawBorder(cg.background(), p, glowTr, cg, flags|Style_Horizontal|Style_Enabled, @@ -4746,7 +4842,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty ? (top ? ROUNDED_TOPRIGHT : ROUNDED_BOTTOMRIGHT) : ROUNDED_NONE, glowMo ? itsMouseOverCols : 0L, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT, true, borderProfile, false); - if(glowMo) + if(drawOuterGlow) { glowTr.addCoords(-1, -1, 1, 1); drawGlow(p, glowTr, cg, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT); @@ -4760,16 +4856,22 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty p->setPen(itsBackgroundCols[STD_BORDER]); p->drawPoint(r.x(), r.y()+r.height()-2); p->drawPoint(r.x()+r.width()-1, r.y()+r.height()-2); - p->setPen(itsBackgroundCols[0]); - p->drawLine(r.x()+1, r.y()+r.height()-3, r.x()+1, r.y()+r.height()-1); - //p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-1); - p->setPen(itsBackgroundCols[opts.borderTab ? 0 : FRAME_DARK_SHADOW]); - p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-2); + if(!thin) + { + p->setPen(itsBackgroundCols[0]); + p->drawLine(r.x()+1, r.y()+r.height()-3, r.x()+1, r.y()+r.height()-1); + //p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-1); + p->setPen(itsBackgroundCols[opts.borderTab ? 0 : FRAME_DARK_SHADOW]); + p->drawPoint(r.x()+r.width()-2, r.y()+r.height()-2); + } } else { - p->setPen(itsBackgroundCols[0]); - p->drawLine(r.x(), r.y()+r.height()-1, r.x()+r.width()-1, r.y()+r.height()-1); + if(!thin) + { + p->setPen(itsBackgroundCols[0]); + p->drawLine(r.x(), r.y()+r.height()-1, r.x()+r.width()-1, r.y()+r.height()-1); + } p->setPen(itsBackgroundCols[STD_BORDER]); p->drawLine(r.x(), r.y()+r.height()-2, r.x()+r.width()-1, r.y()+r.height()-2); @@ -4788,7 +4890,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty p->setPen(itsBackgroundCols[!active && TAB_MO_GLOW==opts.tabMouseOver && opts.round>ROUND_SLIGHT && !(opts.square&SQUARE_TAB_FRAME) ? ORIGINAL_SHADE : STD_BORDER]); p->drawLine(x, r.y()+r.height()-1, x, r.height()-2); - if(active) + if(active && !thin) { p->setPen(itsBackgroundCols[reverse ? dark : 0]); p->drawLine(x2, r.y()+r.height()-1, x2, r.y()+r.height()-2); @@ -4827,19 +4929,25 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty p->setPen(itsBackgroundCols[STD_BORDER]); p->drawPoint(r.x(), r.y()+1); p->drawPoint(r.x()+r.width()-1, r.y()+1); - p->setPen(itsBackgroundCols[0]); - p->drawLine(r.x()+1, r.y()+2, r.x()+1, r.y()); - p->setPen(itsBackgroundCols[opts.borderTab ? 0 : FRAME_DARK_SHADOW]); - p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()); - p->drawPoint(r.x()+r.width()-1, r.y()); + if(!thin) + { + p->setPen(itsBackgroundCols[0]); + p->drawLine(r.x()+1, r.y()+2, r.x()+1, r.y()); + p->setPen(itsBackgroundCols[opts.borderTab ? 0 : FRAME_DARK_SHADOW]); + p->drawLine(r.x()+r.width()-2, r.y()+1, r.x()+r.width()-2, r.y()); + p->drawPoint(r.x()+r.width()-1, r.y()); + } } else { - p->setPen(itsBackgroundCols[opts.borderTab ? 0 : dark]); - p->drawLine(r.x(), r.y(), r.x()+r.width()-1, r.y()); + if(!thin) + { + p->setPen(itsBackgroundCols[opts.borderTab ? 0 : dark]); + p->drawLine(r.x(), r.y(), r.x()+r.width()-1, r.y()); + } p->setPen(itsBackgroundCols[STD_BORDER]); p->drawLine(r.x(), r.y()+1, r.x()+r.width()-1, r.y()+1); - + if(opts.coloredMouseOver && itsHover && TAB_MO_GLOW!=opts.tabMouseOver) drawHighlight(p, TQRect(tr.x()+(firstTab ? moOffset : 1), tr.y()+(TAB_MO_TOP==opts.tabMouseOver ? tr.height()-2 : 1), @@ -4852,7 +4960,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty p->setPen(itsBackgroundCols[STD_BORDER]); p->drawPoint(r.x(), r.y()); } - + if(active && opts.highlightTab) { p->setPen(itsHighlightCols[0]); @@ -4927,7 +5035,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty } } - drawItem(p, tr, AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text()); + drawItem(p, tr, AlignCenter | ShowPrefix | (styleHint(SH_UnderlineAccelerator, ceData, elementFlags, data, 0, widget) ? 0 : NoAccel), cg, flags & Style_Enabled, 0, t->text()); if ((flags & Style_HasFocus) && !t->text().isEmpty()) { @@ -5010,7 +5118,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty int cw(iw+pw+constSpace); - xo=cw<w ? (w-cw)>>1 : constSpace; + xo=cw<w ? (w-cw)>>1 : constSpace; p->drawPixmap(x+xo, y + (h>>1) - (pixmap.height()>>1), pixmap); xo+=pw; } @@ -5033,7 +5141,8 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty // Make the label indicate if the button is a default button or not int i, - j(opts.embolden && (elementFlags & CEF_IsDefault) ? 2 : 1); + j(opts.embolden && button->isDefault() ? 2 : 1), + textFlags(AlignCenter|ShowPrefix|(styleHint(SH_UnderlineAccelerator, ceData, elementFlags, data, 0, widget) ? 0 : NoAccel)); bool sidebar(!opts.stdSidebarButtons && (((elementFlags & CEF_IsFlat) && button->inherits("KMultiTabBarTab")) || ((elementFlags & CEF_HasParentWidget) && button->inherits("Ideal::Button") && @@ -5043,7 +5152,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty : ceData.colorGroup.buttonText()); for(i=0; i<j; i++) - drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, ceData.colorGroup, + drawItem(p, TQRect(x+i, y, w, h), textFlags, ceData.colorGroup, (elementFlags & CEF_IsEnabled), button->pixmap(), button->text(), -1, &textCol); @@ -5059,11 +5168,13 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty if(data.isDefault()) break; + //const TQPopupMenu *popupmenu((const QPopupMenu *)widget); TQMenuItem *mi(data.menuItem()); int tab(data.tabWidth()), maxpmw(data.maxIconWidth()), x, y, w, h; bool reverse(TQApplication::reverseLayout()); + const TQColor *use(popupMenuCols(cg)); maxpmw=TQMAX(maxpmw, constMenuPixmapWidth); r.rect(&x, &y, &w, &h); @@ -5073,20 +5184,17 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty else { if(IS_FLAT_BGND(opts.menuBgndAppearance)) - p->fillRect(r, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol - : itsBackgroundCols[ORIGINAL_SHADE]); + p->fillRect(r, use[ORIGINAL_SHADE]); if(opts.menuStripe) - drawBevelGradient(menuStripeCol(), p, + drawBevelGradient(menuStripeCol(cg), use[ORIGINAL_SHADE], p, TQRect(reverse ? r.right()-maxpmw : r.x(), r.y(), maxpmw, r.height()), false, false, opts.menuStripeAppearance, WIDGET_OTHER); } if((flags&Style_Active) && (flags&Style_Enabled)) - drawMenuItem(p, r, flags, cg, false, ROUNDED_ALL, - USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol - : itsBackgroundCols[ORIGINAL_SHADE], + drawMenuItem(p, r, flags, cg, false, ROUNDED_ALL, use[ORIGINAL_SHADE], opts.useHighlightForMenu ? itsHighlightCols : itsBackgroundCols); if(!mi) @@ -5095,7 +5203,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty if(mi->isSeparator()) { y=r.y()+(r.height()>>1); - p->setPen(itsBackgroundCols[MENU_SEP_SHADE]); + p->setPen(popupMenuCols(cg)[MENU_SEP_SHADE]); p->drawLine(r.x()+3+(!reverse && opts.menuStripe ? maxpmw : 0), y, r.x()+r.width()-4-(reverse && opts.menuStripe ? maxpmw : 0), y); // p->setPen(itsBackgroundCols[0]); @@ -5164,15 +5272,18 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty if(!text.isNull()) { - int t(text.find('\t')); + int t(text.find('\t')), + textFlags=AlignVCenter|ShowPrefix|DontClip|SingleLine; + + if (!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, data, 0, widget)) + textFlags |= NoAccel; // draw accelerator/tab-text if(t>=0) - p->drawText(tr, AlignVCenter|ShowPrefix|DontClip|SingleLine|(reverse ? AlignLeft : AlignRight), - text.mid(t+1)); + p->drawText(tr, textFlags|(reverse ? AlignLeft : AlignRight), text.mid(t+1)); - p->drawText(ir, AlignVCenter|ShowPrefix|DontClip|SingleLine|(reverse ? AlignRight : AlignLeft), text, t); - } + p->drawText(ir, textFlags|(reverse ? AlignRight : AlignLeft), text, t); + } else if(mi->pixmap()) { TQPixmap *pixmap(mi->pixmap()); @@ -5219,8 +5330,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty TQMenuItem *mi(data.menuItem()); if(mi->text().isEmpty()) // Draw pixmap... - drawItem(p, r, AlignCenter|ShowPrefix|DontClip|SingleLine, cg, flags&Style_Enabled, - mi->pixmap(), TQString()); + drawItem(p, r, AlignCenter|ShowPrefix|DontClip|SingleLine, cg, flags&Style_Enabled, mi->pixmap(), TQString()); else { const TQColor *col=((opts.colorMenubarMouseOver && active) || (!opts.colorMenubarMouseOver && down)) @@ -5232,7 +5342,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty : &cg.foreground(); p->setPen(*col); - p->drawText(r, AlignCenter|ShowPrefix|DontClip|SingleLine, mi->text()); + p->drawText(r, AlignCenter|ShowPrefix|DontClip|SingleLine|(styleHint(SH_UnderlineAccelerator, ceData, elementFlags, data, 0, widget) ? 0 : NoAccel), mi->text()); } break; @@ -5271,8 +5381,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty col=itsBackgroundCols[2]; } - drawBevelGradient(col, p, rx, true, - false, opts.progressGrooveAppearance, WIDGET_PBAR_TROUGH); + drawBevelGradient(col, cg.background(), p, rx, true, false, opts.progressGrooveAppearance, WIDGET_PBAR_TROUGH); const TQColor *use(backgroundColors(cg)); @@ -5286,7 +5395,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty p->drawLine(r.topLeft(), r.topRight()); p->drawLine(r.bottomLeft(), r.bottomRight()); } - + if(doEtch) drawEtch(p, r, cg, false, (opts.square&SQUARE_PROGRESS)); @@ -5471,13 +5580,13 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty r-=visualRect(subRect(SR_CheckBoxIndicator, ceData, elementFlags, widget), ceData, elementFlags); p->setClipRegion(r); - drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, checkbox->rect(), true, + drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), cg.background(), p, checkbox->rect(), true, false, opts.selectionAppearance, WIDGET_SELECTION); p->setClipping(false); } int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); - drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, + drawItem(p, r, alignment|AlignVCenter|ShowPrefix|(styleHint(SH_UnderlineAccelerator, ceData, elementFlags, data, 0, widget) ? 0 : NoAccel), cg, flags & Style_Enabled, checkbox->pixmap(), checkbox->text()); if(checkbox->hasFocus() && FOCUS_GLOW!=opts.focus) @@ -5509,15 +5618,15 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty rb.height())); r-=visualRect(subRect(SR_RadioButtonIndicator, ceData, elementFlags, widget), ceData, elementFlags); p->setClipRegion(r); - drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, ceData.rect, true, + drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), cg.background(), p, ceData.rect, true, false, opts.selectionAppearance, WIDGET_SELECTION); p->setClipping(false); } int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft); - drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, - radiobutton->pixmap(), radiobutton->text()); + drawItem(p, r, alignment|AlignVCenter|ShowPrefix|(styleHint(SH_UnderlineAccelerator, ceData, elementFlags, data, 0, widget) ? 0 : NoAccel), + cg, flags & Style_Enabled, radiobutton->pixmap(), radiobutton->text()); if((elementFlags & CEF_HasFocus) && FOCUS_GLOW!=opts.focus) drawPrimitive(PE_FocusRect, p, ceData, elementFlags, visualRect(subRect(SR_RadioButtonFocusRect, ceData, elementFlags, @@ -5641,7 +5750,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons case CC_ToolButton: { const TQToolButton *toolbutton((const TQToolButton *)widget); - TQRect button(querySubControlMetrics(control, ceData, elementFlags, SC_ToolButton, data, widget)), + TQRect button(querySubControlMetrics(control, ceData, elementFlags, SC_ToolButton, data, widget)), menuarea(querySubControlMetrics(control, ceData, elementFlags, SC_ToolButtonMenu, data, widget)); SFlags bflags(flags|STD_TOOLBUTTON), @@ -5676,6 +5785,24 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons !qstrcmp(ceData.parentWidgetData.name.ascii(), "qt_maxcontrols")) onControlButtons = true; + int round(ROUNDED_ALL), leftAdjust(0), topAdjust(0), rightAdjust(0), bottomAdjust(0); + bool horizTBar(true), + raised(!onControlButtons && (TBTN_RAISED==opts.tbarBtns || TBTN_JOINED==opts.tbarBtns)); + + if(raised) + { + if(tb) + { + if(TBTN_JOINED==opts.tbarBtns) + { + horizTBar=Qt::Horizontal==tb->orientation(); + adjustToolbarButtons(widget, tb, leftAdjust, topAdjust, rightAdjust, bottomAdjust, round); + } + } + else + raised=false; + } + if(active & SC_ToolButton) bflags |=Style_Down; if(active & SC_ToolButtonMenu) @@ -5692,10 +5819,9 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons // If we're pressed, on, or raised... #if defined TQTC_TQT_ONLY || !defined TDE_VERSION - if(bflags &(Style_Down | Style_On | Style_Raised) || onControlButtons) + if(bflags &(Style_Down | Style_On | Style_Raised) || onControlButtons || raised) #else - if(bflags &(Style_Down | Style_On | Style_Raised | Style_MouseOver) || - onControlButtons) + if(bflags &(Style_Down | Style_On | Style_Raised | Style_MouseOver) || onControlButtons || raised) #endif { //Make sure the standalone toolbuttons have a gradient in the right direction @@ -5711,10 +5837,35 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons } } + if(raised && TBTN_JOINED==opts.tbarBtns && !horizTBar) + bflags &= ~Style_Horizontal; + if(elementFlags & CEF_BiState) bflags|=TOGGLE_BUTTON; - drawPrimitive(PE_ButtonTool, p, ceData, elementFlags, button, cg, bflags, data); + const TQColor *use(buttonColors(cg)); + + TQRect btnRect(r); + + btnRect.addCoords(leftAdjust, topAdjust, rightAdjust, bottomAdjust); + drawLightBevel(cg.background(), p, btnRect, cg, bflags, round, getFill(bflags, use), use, true, true, WIDGET_STD_BUTTON); + + if(raised && TBTN_JOINED==opts.tbarBtns) + { + const int constSpace=opts.fadeLines ? 7 : 4; + + p->setPen(use[0]); + if(leftAdjust) + p->drawLine(r.x(), r.y()+constSpace, r.x(), r.height()-(constSpace+1)); + if(topAdjust) + p->drawLine(r.x()+constSpace, r.y(), r.width()-(constSpace+1), r.y()); + p->setPen(use[STD_BORDER]); + if(rightAdjust) + p->drawLine(r.x()+r.width()-1, r.y()+constSpace, r.x()+r.width()-1, r.height()-(constSpace+1)); + if(bottomAdjust) + p->drawLine(r.x()+constSpace, r.y()+r.height()-1, r.width()-(constSpace+1), r.y()+r.height()-1); + } + //drawPrimitive(PE_ButtonTool, p, button, cg, bflags, data); } // Check whether to draw a background pixmap @@ -5845,7 +5996,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons getFill(fillFlags, cols, false, (SHADE_DARKEN==opts.comboBtn || (SHADE_NONE!=opts.comboBtn && !(flags&Style_Enabled))) && editable), - cols, true, true, editable ? WIDGET_COMBO_BUTTON : WIDGET_COMBO); + cols, true, true, editable ? WIDGET_COMBO_BUTTON : WIDGET_COMBO, widget); } } @@ -5874,7 +6025,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons : fieldFlags&Style_HasFocus ? ENTRY_FOCUS : ENTRY_NONE - : ENTRY_NONE, + : ENTRY_NONE, (opts.square&SQUARE_ENTRY) ? ROUNDED_NONE : opts.unifyCombo @@ -5944,7 +6095,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons drawLightBevel(p, btn, cg, btnFlags|Style_Horizontal, reverse ? ROUNDED_LEFT : ROUNDED_RIGHT, getFill(btnFlags, cols, false, SHADE_DARKEN==opts.comboBtn || (SHADE_NONE!=opts.comboBtn && !(flags&Style_Enabled))), - cols, true, true, WIDGET_COMBO); + cols, true, true, WIDGET_COMBO, widget); p->restore(); } @@ -5960,7 +6111,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons { bool glowFocus(USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled); - if(!sunken && !editable && + if(!sunken && !editable && !(opts.thin&THIN_FRAMES) && ((MO_GLOW==opts.coloredMouseOver && flags&Style_MouseOver)/* || (FOCUS_FULL==opts.focus && flags&Style_HasFocus)*/ || glowFocus)) drawGlow(p, widget ? TQT_TQRECT_OBJECT(ceData.rect) : r, cg, WIDGET_COMBO, glowFocus ? itsFocusCols : NULL); @@ -5977,6 +6128,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons { itsFormMode = isFormWidget(widget); + //const TQSpinWidget *spinwidget((const QSpinWidget *)widget); TQRect frame(querySubControlMetrics(CC_SpinWidget, ceData, elementFlags, SC_SpinWidgetFrame, data, widget)), up(ceData.spinWidgetData.upRect), @@ -5999,7 +6151,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons if(opts.unifySpin) drawEntryField(p, all, cg, flags, ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) && flags&Style_Enabled - ? flags&Style_MouseOver || hw + ? flags&Style_MouseOver || hw ? ENTRY_MOUSE_OVER : flags&Style_HasFocus || (elementFlags & CEF_HasFocus) ? ENTRY_FOCUS @@ -6033,14 +6185,14 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons btnFlags|=Style_Horizontal; drawLightBevel(p, btns, cg, btnFlags, reverse ? ROUNDED_LEFT : ROUNDED_RIGHT, getFill(btnFlags, use), - use, true, true, WIDGET_SPIN); + use, true, true, WIDGET_SPIN, widget); if(hw && (HOVER_SW_DOWN==itsHover || HOVER_SW_UP==itsHover) && flags&Style_Enabled && !(flags&Style_Sunken)) { btnFlags|=Style_MouseOver; p->save(); p->setClipRect(HOVER_SW_UP==itsHover ? up : down); drawLightBevel(p, btns, cg, btnFlags, reverse ? ROUNDED_LEFT : ROUNDED_RIGHT, getFill(btnFlags, use), - use, true, true, WIDGET_SPIN); + use, true, true, WIDGET_SPIN, widget); p->restore(); } p->setPen(use[BORDER_VAL(style&Style_Enabled)]); @@ -6088,7 +6240,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons frame.setWidth(frame.width()+1); drawEntryField(p, frame, cg, flags, ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) && flags&Style_Enabled - ? flags&Style_MouseOver || hw + ? flags&Style_MouseOver || hw ? ENTRY_MOUSE_OVER : flags&Style_HasFocus || (elementFlags & CEF_HasFocus) ? ENTRY_FOCUS @@ -6239,7 +6391,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons if(opts.thinSbarGroove) { if(opts.flatSbarButtons && SCROLLBAR_NONE!=opts.scrollbarType && ROUNDED) { - drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], p, slider, flags&Style_Horizontal, false, + drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], itsBackgroundCols[ORIGINAL_SHADE], p, slider, flags&Style_Horizontal, false, opts.sbarBgndAppearance, WIDGET_SB_BGND); } else if(opts.thinSbarGroove && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons) && @@ -6393,7 +6545,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons textRect(full ? tb->rect().x() : ir.x(), ir.y(), full ? tb->rect().width() : ir.width(), ir.height()); EAppearance app=isActive ? opts.titlebarAppearance : opts.inactiveTitlebarAppearance; - drawBevelGradient(cols[ORIGINAL_SHADE], p, r, true, false, app, WIDGET_MDI_WINDOW); + drawBevelGradient(cols[ORIGINAL_SHADE], cg.background(), p, r, true, false, app, WIDGET_MDI_WINDOW); ir.addCoords(2, 0, -4, 0); TQFontMetrics fm(TQFontMetrics(ceData.font)); @@ -6913,22 +7065,21 @@ TQSize QtCurveStyle::sizeFromContents(ContentsType contents, const TQStyleContro w=constMinW; } - return TQSize(w, contentsSize.height() + margin+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns - ? 6 : 4)); + return TQSize(w, contentsSize.height() + margin+(DO_EFFECT && !isFormWidget(widget) && !(opts.thin&THIN_BUTTONS) ? 6 : 4)); } break; } case CT_ComboBox: { TQSize sz(BASE_STYLE::sizeFromContents(contents, ceData, elementFlags, contentsSize, data, widget)); - return TQSize(sz.width(), sz.height()+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns ? 4 : 2)); + return TQSize(sz.width(), sz.height()+(DO_EFFECT && !isFormWidget(widget) && !(opts.thin&THIN_BUTTONS) ? 4 : 2)); } case CT_PopupMenuItem: { if (!widget || data.isDefault()) break; - const int constMinH(opts.thinnerMenuItems ? 25 : 27); + const int constMinH((opts.thin&THIN_MENU_ITEMS) ? 25 : 27); TQMenuItem *mi(data.menuItem()); int maxpmw(data.maxIconWidth()), @@ -6960,7 +7111,7 @@ TQSize QtCurveStyle::sizeFromContents(ContentsType contents, const TQStyleContro h = TQMAX(h, TQFontMetrics(ceData.font).height() + 2); if (mi->iconSet()!= 0) h = TQMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height()); - h+=(opts.thinnerMenuItems ? 2 : 4); + h+=((opts.thin&THIN_MENU_ITEMS) ? 2 : 4); } // check | 4 pixels | item | 8 pixels | accel | 4 pixels | check @@ -7001,6 +7152,8 @@ int QtCurveStyle::styleHint(StyleHint stylehint, const TQStyleControlElementData { switch(stylehint) { + case SH_UnderlineAccelerator: + return widget && opts.hideShortcutUnderline ? itsShortcutHandler->showShortcut(widget) : true; case SH_PopupMenu_SubMenuPopupDelay: return opts.menuDelay; case SH_ScrollView_FrameOnlyAroundContents: @@ -7074,9 +7227,8 @@ void QtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQCo f.setBold(true); p->setPen(box->colorGroup().foreground()); p->setFont(f); - p->drawText(TQRect(left, top, width, th), (TQApplication::reverseLayout() - ? AlignRight - : AlignLeft)|AlignVCenter|ShowPrefix|SingleLine, + p->drawText(TQRect(left, top, width, th), (TQApplication::reverseLayout() ? AlignRight : AlignLeft)| + AlignVCenter|ShowPrefix|SingleLine, text); return; } @@ -7145,7 +7297,7 @@ void QtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQCo del = !TQPixmapCache::insert(k, mask); } pm = *mask; - if (del) + if (del) delete mask; #endif } @@ -7163,8 +7315,7 @@ void QtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQCo } } -void QtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, - bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const +void QtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const { int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4, border=opts.borderMenuitems ? 0 : fill; @@ -7172,26 +7323,25 @@ void QtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const if(itsHighlightCols!=cols && mbi && !((flags&Style_Enabled) && (flags&Style_Active) && (flags&Style_Down)) && !opts.colorMenubarMouseOver && (opts.borderMenuitems || !IS_FLAT(opts.menuitemAppearance))) fill=ORIGINAL_SHADE; - + if(!mbi && APPEARANCE_FADE==opts.menuitemAppearance) { - bool reverse=TQApplication::reverseLayout(); - int roundOffet=ROUNDED ? 1 : 0; - TQRect main(r.x()+(reverse ? 1+MENUITEM_FADE_SIZE : roundOffet+1), r.y()+roundOffet+1, - r.width()-(1+MENUITEM_FADE_SIZE), r.height()-(2+(roundOffet*2))), - fade(reverse ? r.x()+1 : r.width()-MENUITEM_FADE_SIZE, r.y()+1, MENUITEM_FADE_SIZE, r.height()-2); + bool reverse=TQApplication::reverseLayout(); + int roundOffet=ROUNDED ? 1 : 0; + TQRect main(r.x()+(reverse ? 1+MENUITEM_FADE_SIZE : roundOffet+1), r.y()+roundOffet+1, + r.width()-(1+MENUITEM_FADE_SIZE), r.height()-(2+(roundOffet*2))), + fade(reverse ? r.x()+1 : r.width()-MENUITEM_FADE_SIZE, r.y()+1, MENUITEM_FADE_SIZE, r.height()-2); + const TQColor *pc(popupMenuCols(cg)); p->fillRect(main, cols[fill]); if(ROUNDED) { main.addCoords(-1, -1, 1, 1); - drawBorder(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE], p, main, - cg, Style_Horizontal|Style_Raised, reverse ? ROUNDED_RIGHT : ROUNDED_LEFT, - cols, WIDGET_MENU_ITEM, false, BORDER_FLAT, false, fill); + drawBorder(pc[ORIGINAL_SHADE], p, main, cg, Style_Horizontal|Style_Raised, reverse ? ROUNDED_RIGHT : ROUNDED_LEFT, + pc, WIDGET_MENU_ITEM, false, BORDER_FLAT, false, fill); } - TQColor bgnd(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]); - drawGradient(reverse ? bgnd : cols[fill], reverse ? cols[fill] : bgnd, p, fade, false); + drawGradient(reverse ? pc[ORIGINAL_SHADE] : cols[fill], reverse ? cols[fill] : pc[ORIGINAL_SHADE], p, fade, false); } else if(mbi || opts.borderMenuitems) { @@ -7211,13 +7361,13 @@ void QtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const fr.addCoords(1, 1, -1, -1); if(fr.width()>0 && fr.height()>0) - drawBevelGradient(cols[fill], p, fr, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM); + drawBevelGradient(cols[fill], cg.background(), p, fr, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM); drawBorder(bgnd, p, r, cg, flags, round, cols, WIDGET_OTHER, false, BORDER_FLAT, false, border); } itsFormMode=false; } else - drawBevelGradient(cols[fill], p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM); + drawBevelGradient(cols[fill], cg.background(), p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM); } void QtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags, @@ -7313,7 +7463,7 @@ void QtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGro } } -void QtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const +void QtCurveStyle::drawBevelGradient(const TQColor &base, const TQColor &bgnd, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const { if(IS_FLAT(bevApp) && opts.colorSelTab && sel) bevApp=APPEARANCE_GRADIENT; @@ -7334,7 +7484,7 @@ void QtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQ : APPEARANCE_GRADIENT); TQRect r(0, 0, horiz ? PIXMAP_DIMENSION : origRect.width(), horiz ? origRect.height() : PIXMAP_DIMENSION); - TQString key(createKey(horiz ? r.height() : r.width(), base.rgb(), horiz, app, + TQString key(createKey(horiz ? r.height() : r.width(), base.rgb(), bgnd.rgb(), horiz, app, tab && sel && opts.colorSelTab ? CACHE_COL_SEL_TAB : CACHE_STD)); TQPixmap *pix(itsPixmapCache.find(key)); bool inCache(true); @@ -7343,9 +7493,9 @@ void QtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQ { pix=new TQPixmap(r.width(), r.height()); - TQPainter pixPainter(pix); + TQPainter pixPainter(pix); - drawBevelGradientReal(base, &pixPainter, r, horiz, sel, app, w); + drawBevelGradientReal(base, bgnd, &pixPainter, r, horiz, sel, app, w); pixPainter.end(); int cost(pix->width()*pix->height()*(pix->depth()/8)); @@ -7361,7 +7511,7 @@ void QtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQ } } -void QtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const +void QtCurveStyle::drawBevelGradientReal(const TQColor &base, const TQColor &bgnd, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const { const Gradient *grad=getGradient(app, &opts); @@ -7389,7 +7539,8 @@ void QtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, cons if(/*sel && */opts.colorSelTab && i>0) col=tint(col, itsHighlightCols[0], (1.0-(*it).pos)*(0.2+TO_ALPHA(opts.colorSelTab))); - + if((*it).alpha<0.9999) + col=tint(bgnd, col, (*it).alpha); if(i) drawGradient(prev, col, p, horiz @@ -7417,7 +7568,8 @@ void QtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, cons if(sel && opts.colorSelTab && topTab && i<numStops-1) col=tint(col, itsHighlightCols[0], (1.0-(*it).pos)*(0.2+TO_ALPHA(opts.colorSelTab))); - + if((*it).alpha<0.9999) + col=tint(bgnd, col, (*it).alpha); if(i) drawGradient(prev, col, p, horiz @@ -7430,8 +7582,7 @@ void QtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, cons } } -void QtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot, - TQPainter *p, TQRect const &r, bool horiz) const +void QtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot, TQPainter *p, TQRect const &r, bool horiz) const { if(r.width()>0 && r.height()>0) { @@ -7446,10 +7597,10 @@ void QtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot, 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 rl(rTop << 16); + int gl(gTop << 16); + int bl(bTop << 16); + int i; int dr(((1<<16) * (bot.red() - rTop)) / size), dg(((1<<16) * (bot.green() - gTop)) / size), @@ -7515,7 +7666,7 @@ void QtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQ r.addCoords(-1, 0, 0, 0); else r.addCoords(horiz ? 1 : 0, horiz ? 0 : 1, 0, 0); - + switch(opts.sliderThumbs) { case LINE_FLAT: @@ -7632,7 +7783,7 @@ void QtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColor } else { - drawBevelGradient(fill, p, TQRect(x, y, horiz ? r.width()-1 : size, horiz ? size : r.height()-1), + drawBevelGradient(fill, cg.background(), p, TQRect(x, y, horiz ? r.width()-1 : size, horiz ? size : r.height()-1), horiz, false, opts.sliderAppearance); if(MO_PLASTIK==opts.coloredMouseOver && flags&Style_MouseOver && !opts.colorSliderMouseOver) @@ -7642,18 +7793,18 @@ void QtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColor if(horiz) { - drawBevelGradient(itsMouseOverCols[col], p, TQRect(x+1, y+1, len, size-2), + drawBevelGradient(itsMouseOverCols[col], cg.background(), p, TQRect(x+1, y+1, len, size-2), horiz, false, opts.sliderAppearance); - drawBevelGradient(itsMouseOverCols[col], p, + drawBevelGradient(itsMouseOverCols[col], cg.background(), p, TQRect(x+r.width()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len), y+1, len, size-2), horiz, false, opts.sliderAppearance); } else { - drawBevelGradient(itsMouseOverCols[col], p, TQRect(x+1, y+1, size-2, len), + drawBevelGradient(itsMouseOverCols[col], cg.background(), p, TQRect(x+1, y+1, size-2, len), horiz, false, opts.sliderAppearance); - drawBevelGradient(itsMouseOverCols[col], p, + drawBevelGradient(itsMouseOverCols[col], cg.background(), p, TQRect(x+1, y+r.height()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len), size-2, len), horiz, false, opts.sliderAppearance); @@ -7755,7 +7906,7 @@ void QtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColor itsBackgroundCols[flags&Style_Enabled ? 2 : ORIGINAL_SHADE], itsBackgroundCols, true, true, WIDGET_SLIDER_TROUGH); - if(opts.fillSlider && (horiz ? ceData.currentStep>0 : ceData.currentStep<ceData.maxSteps) && + if(opts.fillSlider && (horiz ? ceData.currentStep>0 : ceData.currentStep<ceData.maxSteps) && ceData.maxSteps!=ceData.minSteps && flags&Style_Enabled) { TQRect used(groove); @@ -7789,7 +7940,8 @@ void QtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColor void QtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool menu, bool horiz) const { - if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars) + if(menu && (APPEARANCE_STRIPED==opts.bgndAppearance || APPEARANCE_FILE==opts.bgndAppearance) && + IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars) return; TQRect rx(r); @@ -7799,7 +7951,7 @@ void QtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, co if(menu && BLEND_TITLEBAR) rx.addCoords(0, -qtcGetWindowBorderSize().titleHeight, 0, 0); - drawBevelGradient(color, p, rx, horiz, false, app); + drawBevelGradient(color, cg.background(), p, rx, horiz, false, app); } void QtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb, @@ -7893,6 +8045,11 @@ const TQColor * QtCurveStyle::buttonColors(const TQColorGroup &cg) const return itsButtonCols; } +const TQColor * QtCurveStyle::popupMenuCols(const TQColorGroup &cg) const +{ + return opts.shadePopupMenu ? menuColors(cg, true) : backgroundColors(cg); +} + const TQColor * QtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const { return opts.crColor && flags&Style_Enabled && (flags&Style_On || !(flags&Style_Off)) @@ -7970,6 +8127,75 @@ void QtCurveStyle::setMenuColors(const TQColorGroup &cg) case SHADE_WINDOW_BORDER: break; } + + TQColor *base=opts.shadePopupMenu + ? SHADE_WINDOW_BORDER==opts.shadeMenubars + ? (TQColor *)getMdiColors(cg, true) + : itsMenubarCols + : itsBackgroundCols; + + if(USE_LIGHTER_POPUP_MENU) + { + if(!itsPopupMenuCols) + itsPopupMenuCols=new TQColor [TOTAL_SHADES+1]; + shadeColors(shade(base[ORIGINAL_SHADE], TO_FACTOR(opts.lighterPopupMenuBgnd)), itsPopupMenuCols); + } + else + itsPopupMenuCols=base; +} + +void QtCurveStyle::setMenuTextColors(TQWidget *widget, bool isMenuBar) const +{ + if(SHADE_WINDOW_BORDER==opts.shadeMenubars) + { + TQPalette pal(widget->palette()); + + getMdiColors(pal.active(), false); + + pal.setBrush(TQPalette::Active, TQColorGroup::Foreground, itsActiveMdiTextColor); + pal.setBrush(TQPalette::Active, TQColorGroup::Text, pal.brush(TQPalette::Active, TQColorGroup::Foreground)); + if(isMenuBar) + { + pal.setBrush(TQPalette::Inactive, TQColorGroup::Foreground, + opts.shadeMenubarOnlyWhenActive ? itsMdiTextColor : itsActiveMdiTextColor); + pal.setBrush(TQPalette::Inactive, TQColorGroup::Text, pal.brush(TQPalette::Inactive, TQColorGroup::Foreground)); + } + else if(opts.shadePopupMenu) + { + pal.setBrush(TQPalette::Disabled, TQColorGroup::Foreground, midColor(itsActiveMdiTextColor, + popupMenuCols(pal.active())[ORIGINAL_SHADE])); + pal.setBrush(TQPalette::Disabled, TQColorGroup::Text, pal.brush(TQPalette::Disabled, TQColorGroup::Foreground)); + } + + widget->setPalette(pal); + } + else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || + SHADE_SELECTED==opts.shadeMenubars || + (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) + { + TQPalette pal(widget->palette()); + + pal.setBrush(TQPalette::Active, TQColorGroup::Foreground, opts.customMenuTextColor + ? opts.customMenuNormTextColor + : pal.active().highlightedText()); + pal.setBrush(TQPalette::Active, TQColorGroup::Text, pal.brush(TQPalette::Active, TQColorGroup::Foreground)); + + if(isMenuBar && !opts.shadeMenubarOnlyWhenActive) + { + pal.setBrush(TQPalette::Inactive, TQColorGroup::Foreground, opts.customMenuTextColor + ? opts.customMenuNormTextColor + : pal.active().highlightedText()); + pal.setBrush(TQPalette::Inactive, TQColorGroup::Text, pal.brush(TQPalette::Inactive, TQColorGroup::Foreground)); + } + else if(!isMenuBar && opts.shadePopupMenu) + { + const TQColor *pc(popupMenuCols(pal.active())); + pal.setBrush(TQPalette::Disabled, TQColorGroup::Foreground, + midColor(pal.brush(TQPalette::Active, TQColorGroup::Foreground).color(), pc[ORIGINAL_SHADE])); + pal.setBrush(TQPalette::Disabled, TQColorGroup::Text, pal.brush(TQPalette::Disabled, TQColorGroup::Foreground)); + } + widget->setPalette(pal); + } } const TQColor * QtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const @@ -8106,8 +8332,8 @@ const TQColor * QtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) } } - if(itsMdiColors && opts.shadeMenubarOnlyWhenActive && SHADE_WINDOW_BORDER==opts.shadeMenubars && - itsActiveMdiColors[ORIGINAL_SHADE]==itsMdiColors[ORIGINAL_SHADE]) + if(opts.shadeMenubarOnlyWhenActive && SHADE_WINDOW_BORDER==opts.shadeMenubars && + itsActiveMdiColors && itsMdiColors && itsActiveMdiColors[ORIGINAL_SHADE]==itsMdiColors[ORIGINAL_SHADE]) opts.shadeMenubarOnlyWhenActive=false; if(!itsActiveMdiColors) { @@ -8431,8 +8657,9 @@ const TQColor & QtCurveStyle::getTabFill(bool current, bool highlight, const TQC : use[2]; } -const TQColor & QtCurveStyle::menuStripeCol() const +const TQColor & QtCurveStyle::menuStripeCol(const TQColorGroup &cg) const { + const TQColor *pc(popupMenuCols(cg)); switch(opts.menuStripe) { default: @@ -8443,17 +8670,12 @@ const TQColor & QtCurveStyle::menuStripeCol() const case SHADE_BLEND_SELECTED: // Hack! Use opts.customMenuStripeColor to store this setting! if(IS_BLACK(opts.customMenuStripeColor)) - opts.customMenuStripeColor=midColor(itsHighlightCols[ORIGINAL_SHADE], - opts.lighterPopupMenuBgnd<0 - ? itsLighterPopupMenuBgndCol - : itsBackgroundCols[ORIGINAL_SHADE]); + opts.customMenuStripeColor=midColor(itsHighlightCols[ORIGINAL_SHADE], pc[ORIGINAL_SHADE]); return opts.customMenuStripeColor; case SHADE_SELECTED: return itsHighlightCols[MENU_STRIPE_SHADE]; case SHADE_DARKEN: - return USE_LIGHTER_POPUP_MENU - ? itsLighterPopupMenuBgndCol - : itsBackgroundCols[MENU_STRIPE_SHADE]; + return pc[MENU_STRIPE_SHADE]; } } @@ -8521,7 +8743,7 @@ TQPixmap * QtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) pix=new TQPixmap(64, 64); pix->fill(col.rgb()); - + TQPainter p; p.begin(pix); p.setPen(TQColor((3*col.red()+col2.red())/4, diff --git a/style/qtcurve.h b/style/qtcurve.h index a060102..453076a 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -78,10 +78,11 @@ class TQSlider; #define BASE_STYLE TDEStyle #endif +class ShortcutHandler; + class QtCurveStyle : public BASE_STYLE { Q_OBJECT - public: @@ -139,19 +140,20 @@ class QtCurveStyle : public BASE_STYLE virtual ~QtCurveStyle(); void applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); + void applicationUnPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void polish(TQPalette &pal); TQColorGroup setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis=false); void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQColor &fill, const TQColor *custom=NULL, - bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const - { drawLightBevel(cg.background(), p, r, cg, flags, round, fill, custom, doBorder, doCorners, w); } + bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER, const TQWidget *widget=0L) const + { drawLightBevel(cg.background(), p, r, cg, flags, round, fill, custom, doBorder, doCorners, w, widget); } void drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQColor &fill, const TQColor *custom=NULL, - bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const; + bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER, const QWidget *widget=0L) const; void drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols=0) const; - void drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised=false, bool square=false) const; + void drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised=false, bool square=false, EWidget w=WIDGET_OTHER) const; void drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQColor *custom=NULL, EWidget w=WIDGET_OTHER, bool doCorners=true, EBorder borderProfile=BORDER_FLAT, bool blendBorderColors=true, int borderVal=STD_BORDER) const; @@ -195,9 +197,9 @@ class QtCurveStyle : public BASE_STYLE bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const; void drawProgress(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQWidget *widget) const; - void drawBevelGradient(const TQColor &base, TQPainter *p, TQRect const &r, + void drawBevelGradient(const TQColor &base, const TQColor &bgnd, TQPainter *p, TQRect const &r, bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const; - void drawBevelGradientReal(const TQColor &base, TQPainter *p, TQRect const &r, + void drawBevelGradientReal(const TQColor &base, const TQColor &bgnd, TQPainter *p, TQRect const &r, bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const; void drawGradient(const TQColor &top, const TQColor &bot, TQPainter *p, const TQRect &r, bool horiz=true) const; void drawSbSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, bool slider=false) const; @@ -215,8 +217,10 @@ class QtCurveStyle : public BASE_STYLE return tqGray(col.rgb()) < 100 ? TQColor(255, 255, 255) : TQColor(0, 0, 0); } - void shadeColors(const TQColor &base, TQColor *vals) const; + void shadeColors(const TQColor &base, TQColor *vals) const; const TQColor * buttonColors(const TQColorGroup &cg) const; + const TQColor * popupMenuCols(const TQColorGroup &cg) const; + const TQColor & popupMenuCol(const TQColorGroup &cg, int shade=ORIGINAL_SHADE) const; const TQColor * checkRadioColors(const TQColorGroup &cg, SFlags flags) const; const TQColor * sliderColors(/*const TQColorGroup &cg, */SFlags flags) const; const TQColor * backgroundColors(const TQColor &c) const; @@ -224,30 +228,31 @@ class QtCurveStyle : public BASE_STYLE { return backgroundColors(cg.background()); } const TQColor * borderColors(SFlags flags, const TQColor *use) const; const TQColor * getSidebarButtons() const; - void setMenuColors(const TQColorGroup &cg); + void setMenuColors(const TQColorGroup &cg); + void setMenuTextColors(TQWidget *widget, bool isMenuBar) const; const TQColor * menuColors(const TQColorGroup &cg, bool active) const; - void setDecorationColors(bool init=false); + void setDecorationColors(bool init=false); const TQColor * getMdiColors(const TQColorGroup &cg, bool active) const; #ifdef SET_MDI_WINDOW_BUTTON_POSITIONS void readMdiPositions() const; #endif - bool redrawHoverWidget(const TQPoint &pos); + bool redrawHoverWidget(const TQPoint &pos); const TQColor & getFill(SFlags flags, const TQColor *use, bool cr=false, bool darker=false) const; const TQColor & getListViewFill(SFlags flags, const TQColor *use) const; const TQColor & getTabFill(bool current, bool highlight, const TQColor *use) const; - const TQColor & menuStripeCol() const; + const TQColor & menuStripeCol(const TQColorGroup &cg) const; const TQColor & checkRadioCol(SFlags flags, const TQColorGroup &cg) const; TQColor shade(const TQColor &a, float k) const; - void shade(const color &ca, color *cb, double k) const; - void drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const; + void shade(const color &ca, color *cb, double k) const; + void drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const; TQPixmap * getPixelPixmap(const TQColor col) const; TQPixmap * getPixmap(const TQColor col, EPixmap pix, double shade=1.0) const; TQPixmap * createStripePixmap(const TQColor &col, bool forWindow) const; - void setSbType(); - bool isFormWidget(const TQWidget *w) const { return itsKhtmlWidgets.contains(w); } - void resetHover(); - bool isWindowDragWidget(TQObject *o, const TQPoint &pos=TQPoint()); - void adjustScrollbarRects(bool &itsFormMode, bool &horiz, bool &useThreeButtonScrollBar, TQRect &subline, TQRect &addline, TQRect &subpage, TQRect &addpage, TQRect &slider, TQRect &first, TQRect &last, TQRect &subline2, TQRect &sbRect, Options& opts, const TQWidget* widget) const; + void setSbType(); + bool isFormWidget(const TQWidget *w) const { return itsKhtmlWidgets.contains(w); } + void resetHover(); + bool isWindowDragWidget(TQObject *o, const TQPoint &pos=TQPoint()); + void adjustScrollbarRects(bool &itsFormMode, bool &horiz, bool &useThreeButtonScrollBar, TQRect &subline, TQRect &addline, TQRect &subpage, TQRect &addpage, TQRect &slider, TQRect &first, TQRect &last, TQRect &subline2, TQRect &sbRect, Options& opts, const TQWidget* widget) const; private slots: @@ -260,10 +265,11 @@ class QtCurveStyle : public BASE_STYLE private: mutable Options opts; - TQColor itsHighlightCols[TOTAL_SHADES+1], + TQColor itsHighlightCols[TOTAL_SHADES+1], itsBackgroundCols[TOTAL_SHADES+1], itsMenubarCols[TOTAL_SHADES+1], itsFocusCols[TOTAL_SHADES+1], + *itsPopupMenuCols, *itsSliderCols, *itsDefBtnCols, *itsMouseOverCols, @@ -272,7 +278,6 @@ class QtCurveStyle : public BASE_STYLE *itsSortedLvColors, *itsProgressCols, itsButtonCols[TOTAL_SHADES+1], - itsLighterPopupMenuBgndCol, itsCheckRadioCol; mutable TQColor *itsSidebarButtonsCols; mutable TQColor *itsActiveMdiColors; @@ -301,6 +306,7 @@ class QtCurveStyle : public BASE_STYLE mutable TQValueList<int> itsMdiButtons[2]; // 0=left, 1=right TQWidget *itsDragWidget; bool itsDragWidgetHadMouseTracking; + ShortcutHandler *itsShortcutHandler; }; #endif diff --git a/style/qtcurve.themerc b/style/qtcurve.themerc index f3e53fc..10c90b5 100644 --- a/style/qtcurve.themerc +++ b/style/qtcurve.themerc @@ -1,6 +1,9 @@ [Misc] Name=QtCurve + Comment=Highly configurable style + ConfigPage=tdestyle_qtcurve_config + [KDE] WidgetStyle=QtCurve diff --git a/style/shortcuthandler.cpp b/style/shortcuthandler.cpp new file mode 100644 index 0000000..b880a89 --- /dev/null +++ b/style/shortcuthandler.cpp @@ -0,0 +1,188 @@ +/* + QtCurve (C) Craig Drummond, 2007 - 2010 craig.p.drummond@gmail.com + + ---- + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "shortcuthandler.h" +#include <tqpopupmenu.h> +#include <tqapplication.h> +#include <tqobjectlist.h> +#include <tqmainwindow.h> +#include <tqdialog.h> +#include <tqstyle.h> + +ShortcutHandler::ShortcutHandler(TQObject *parent) + : TQObject(parent) + , itsAltDown(false) +{ +} + +ShortcutHandler::~ShortcutHandler() +{ +} + +bool ShortcutHandler::hasSeenAlt(const TQWidget *widget) const +{ + if(widget && !widget->isEnabled()) + return false; + + if(::tqqt_cast<const TQPopupMenu *>(widget)) + return itsOpenMenus.count() && itsOpenMenus.last()==widget; + else + return itsOpenMenus.isEmpty() && itsSeenAlt.contains((TQWidget *)(widget->topLevelWidget())); +/* return false; + { + const TQWidget *w=widget; + + while(w) + { + if(itsSeenAlt.contains((TQWidget *)w)) + return true; + w=w->parentWidget(); + } + } + if(itsHandlePopupsOnly) + return false; + widget = widget->topLevelWidget(); + return itsSeenAlt.contains((TQWidget *)widget);*/ +} + +bool ShortcutHandler::showShortcut(const TQWidget *widget) const +{ + return itsAltDown && hasSeenAlt(widget); +} + +void ShortcutHandler::widgetDestroyed(TQObject *o) +{ + itsUpdated.remove(static_cast<TQWidget *>(o)); + itsOpenMenus.remove(static_cast<TQWidget *>(o)); +} + +void ShortcutHandler::updateWidget(TQWidget *w) +{ + if(!itsUpdated.contains(w)) + { + connect(w, SIGNAL(destroyed(TQObject *)), this, SLOT(widgetDestroyed(TQObject *))); + itsUpdated.append(w); + w->repaint(TRUE); + } +} + +void ShortcutHandler::setSeenAlt(TQWidget *w) +{ + if(!itsSeenAlt.contains(w)) + itsSeenAlt.append(w); +} + +bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e) +{ + if (!o->isWidgetType()) + return TQObject::eventFilter(o, e); + + TQWidget *widget = ::tqqt_cast<TQWidget*>(o); + switch(e->type()) + { + case TQEvent::KeyPress: + if (Key_Alt==((TQKeyEvent*)e)->key()) + { + itsAltDown = true; + + if(::tqqt_cast<TQPopupMenu *>(widget)) + { + setSeenAlt(widget); + updateWidget(widget); + if(widget->parentWidget() && widget->parentWidget()->topLevelWidget()) + itsSeenAlt.append(widget->parentWidget()->topLevelWidget()); + } + else + { + widget = widget->topLevelWidget(); + setSeenAlt(widget); + + // Alt has been pressed - find all widgets that care + TQObjectList *l = widget->queryList("TQWidget"); + TQObjectListIt it( *l ); + TQWidget *w; + while ((w = (TQWidget *)it.current()) != 0) + { + ++it; + if (!(w->isTopLevel() || !w->isVisible())) // || w->style().styleHint(QStyle::SH_UnderlineAccelerator, w))) + updateWidget(w); + } + delete l; + } + } + break; + case TQEvent::WindowDeactivate: + case TQEvent::KeyRelease: + if (TQEvent::WindowDeactivate==e->type() || Key_Alt==static_cast<TQKeyEvent*>(e)->key()) + { + itsAltDown = false; + TQValueList<TQWidget *>::const_iterator it(itsUpdated.begin()), + end(itsUpdated.end()); + + for (; it!=end; ++it) + (*it)->repaint(TRUE); + if(!itsUpdated.contains(widget)) + widget->repaint(TRUE); + itsSeenAlt.clear(); + itsUpdated.clear(); + } + break; + case TQEvent::Show: + if(::tqqt_cast<TQPopupMenu *>(widget)) + { + TQWidget *prev=itsOpenMenus.count() ? itsOpenMenus.last() : 0L; + itsOpenMenus.append(widget); + if(itsAltDown && prev) + prev->repaint(TRUE); + connect(widget, SIGNAL(destroyed(TQObject *)), this, SLOT(widgetDestroyed(TQObject *))); + } + break; + case TQEvent::Hide: + if(::tqqt_cast<TQPopupMenu *>(widget)) + { + itsSeenAlt.remove(widget); + itsUpdated.remove(widget); + itsOpenMenus.remove(widget); + if(itsAltDown) + { + if(itsOpenMenus.count()) + itsOpenMenus.last()->repaint(TRUE); + else if(widget->parentWidget() && widget->parentWidget()->topLevelWidget()) + widget->parentWidget()->topLevelWidget()->repaint(TRUE); + } + } + break; + case TQEvent::Close: + // Reset widget when closing + itsSeenAlt.remove(widget); + itsUpdated.remove(widget); + itsSeenAlt.remove(widget->topLevelWidget()); + itsOpenMenus.remove(widget); + if(itsAltDown && itsOpenMenus.count()) + itsOpenMenus.last()->repaint(TRUE); + break; + break; + default: + break; + } + return TQObject::eventFilter(o, e); +} + +#include "shortcuthandler.moc" diff --git a/style/shortcuthandler.h b/style/shortcuthandler.h new file mode 100644 index 0000000..4eaa665 --- /dev/null +++ b/style/shortcuthandler.h @@ -0,0 +1,62 @@ +#ifndef __SHORTCUT_HANDLER_H__ +#define __SHORTCUT_HANDLER_H__ + +/* + QtCurve (C) Craig Drummond, 2007 - 2010 craig.p.drummond@gmail.com + + ---- + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqevent.h> + +class TQWidget; + +class ShortcutHandler : public TQObject +{ + Q_OBJECT + + public: + + explicit ShortcutHandler(TQObject *parent = 0); + virtual ~ShortcutHandler(); + + bool hasSeenAlt(const TQWidget *widget) const; + bool isAltDown() const { return itsAltDown; } + bool showShortcut(const TQWidget *widget) const; + + private slots: + + void widgetDestroyed(TQObject *o); + + protected: + + void updateWidget(TQWidget *w); + void setSeenAlt(TQWidget *w); + bool eventFilter(TQObject *watched, TQEvent *event); + + private: + + bool itsAltDown; + TQValueList<TQWidget *> itsSeenAlt, + itsUpdated, + itsOpenMenus; + +}; + +#endif
\ No newline at end of file diff --git a/translations/desktop_files/qtcurve-desktops.pot b/translations/desktop_files/qtcurve-desktops.pot new file mode 100644 index 0000000..7cab3d6 --- /dev/null +++ b/translations/desktop_files/qtcurve-desktops.pot @@ -0,0 +1,27 @@ +# SOME DESCRIPTIVE TITLE. +# This file is put in the public domain. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-02-02 09:40+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Name +#: style/qtcurve.themerc:2 colors/QtCurve.kcsrc:2 +msgid "QtCurve" +msgstr "" + +#. Comment +#: style/qtcurve.themerc:4 +msgid "Highly configurable style" +msgstr "" diff --git a/translations/messages/qtcurve/de.po b/translations/messages/qtcurve/de.po new file mode 100644 index 0000000..48edbba --- /dev/null +++ b/translations/messages/qtcurve/de.po @@ -0,0 +1,1217 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2022-09-14 18:33+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Instead of a literal translation, add your name to the end of the list (separated by a comma). +msgid "" +"_: NAME OF TRANSLATORS\n" +"Your names" +msgstr "" + +#. Instead of a literal translation, add your email to the end of the list (separated by a comma). +msgid "" +"_: EMAIL OF TRANSLATORS\n" +"Your emails" +msgstr "" + +#: config/exportthemedialog.cpp:34 +msgid "Export Theme" +msgstr "" + +#: config/exportthemedialog.cpp:40 +msgid "Name:" +msgstr "" + +#: config/exportthemedialog.cpp:41 +msgid "Comment:" +msgstr "" + +#: config/exportthemedialog.cpp:42 +msgid "Destination folder:" +msgstr "" + +#: config/exportthemedialog.cpp:44 +msgid "QtCurve based theme" +msgstr "" + +#: config/exportthemedialog.cpp:64 +msgid "Name is empty!" +msgstr "" + +#: config/exportthemedialog.cpp:86 +#, c-format +msgid "" +"Succesfully created:\n" +"%1" +msgstr "" + +#: config/exportthemedialog.cpp:89 +#, c-format +msgid "Failed to create file: %1" +msgstr "" + +#: config/qtcurveconfig.cpp:148 +msgid "Select Password Character" +msgstr "" + +#: config/qtcurveconfig.cpp:360 config/qtcurveconfigbase.ui:690 +#, no-c-format +msgid "Background" +msgstr "" + +#: config/qtcurveconfig.cpp:364 +msgid "Button" +msgstr "" + +#: config/qtcurveconfig.cpp:367 +msgid "Text" +msgstr "" + +#: config/qtcurveconfig.cpp:371 config/qtcurveconfig.cpp:418 +#: config/qtcurveconfig.cpp:471 config/qtcurveconfig.cpp:559 +msgid "None" +msgstr "" + +#: config/qtcurveconfig.cpp:375 +msgid "Custom:" +msgstr "" + +#: config/qtcurveconfig.cpp:376 +msgid "Selected background" +msgstr "" + +#: config/qtcurveconfig.cpp:379 +msgid "Blended selected background" +msgstr "" + +#: config/qtcurveconfig.cpp:380 +msgid "Menu background" +msgstr "" + +#: config/qtcurveconfig.cpp:380 config/qtcurveconfig.cpp:437 +msgid "Darken" +msgstr "" + +#: config/qtcurveconfig.cpp:384 +msgid "Titlebar border" +msgstr "" + +#: config/qtcurveconfig.cpp:390 config/qtcurveconfig.cpp:1252 +#, c-format +msgid "Custom gradient %1" +msgstr "" + +#: config/qtcurveconfig.cpp:392 config/qtcurveconfigbase.ui:706 +#, no-c-format +msgid "Flat" +msgstr "" + +#: config/qtcurveconfig.cpp:393 +msgid "Raised" +msgstr "" + +#: config/qtcurveconfig.cpp:394 +msgid "Dull glass" +msgstr "" + +#: config/qtcurveconfig.cpp:395 +msgid "Shiny glass" +msgstr "" + +#: config/qtcurveconfig.cpp:396 +msgid "Agua" +msgstr "" + +#: config/qtcurveconfig.cpp:397 +msgid "Soft gradient" +msgstr "" + +#: config/qtcurveconfig.cpp:398 +msgid "Standard gradient" +msgstr "" + +#: config/qtcurveconfig.cpp:399 +msgid "Harsh gradient" +msgstr "" + +#: config/qtcurveconfig.cpp:400 +msgid "Inverted gradient" +msgstr "" + +#: config/qtcurveconfig.cpp:401 +msgid "Dark inverted gradient" +msgstr "" + +#: config/qtcurveconfig.cpp:404 +msgid "Split gradient" +msgstr "" + +#: config/qtcurveconfig.cpp:407 +msgid "Bevelled" +msgstr "" + +#: config/qtcurveconfig.cpp:409 +msgid "Fade out (popup menuitems)" +msgstr "" + +#: config/qtcurveconfig.cpp:411 +msgid "Striped" +msgstr "" + +#: config/qtcurveconfig.cpp:419 +msgid "Sunken lines" +msgstr "" + +#: config/qtcurveconfig.cpp:420 +msgid "Flat lines" +msgstr "" + +#: config/qtcurveconfig.cpp:421 +msgid "Dots" +msgstr "" + +#: config/qtcurveconfig.cpp:424 +msgid "Single dot (KDE4 & Gtk2 Only)" +msgstr "" + +#: config/qtcurveconfig.cpp:426 +msgid "Dashes" +msgstr "" + +#: config/qtcurveconfig.cpp:432 +msgid "Corner indicator" +msgstr "" + +#: config/qtcurveconfig.cpp:433 +msgid "Font color thin border" +msgstr "" + +#: config/qtcurveconfig.cpp:434 +msgid "Selected background thick border" +msgstr "" + +#: config/qtcurveconfig.cpp:435 +msgid "Selected background tinting" +msgstr "" + +#: config/qtcurveconfig.cpp:436 +msgid "A slight glow" +msgstr "" + +#: config/qtcurveconfig.cpp:438 +msgid "Use selected background color" +msgstr "" + +#: config/qtcurveconfig.cpp:439 +msgid "No indicator" +msgstr "" + +#: config/qtcurveconfig.cpp:444 +msgid "TDE" +msgstr "" + +#: config/qtcurveconfig.cpp:445 +msgid "MS Windows" +msgstr "" + +#: config/qtcurveconfig.cpp:446 +msgid "Platinum" +msgstr "" + +#: config/qtcurveconfig.cpp:447 +msgid "NeXT" +msgstr "" + +#: config/qtcurveconfig.cpp:448 +msgid "No buttons" +msgstr "" + +#: config/qtcurveconfig.cpp:453 +msgid "Square" +msgstr "" + +#: config/qtcurveconfig.cpp:454 +msgid "Slightly rounded" +msgstr "" + +#: config/qtcurveconfig.cpp:455 +msgid "Fully rounded" +msgstr "" + +#: config/qtcurveconfig.cpp:456 +msgid "Extra rounded (KDE4 & Gtk2)" +msgstr "" + +#: config/qtcurveconfig.cpp:457 +msgid "Max rounded (KDE4 & Gtk2)" +msgstr "" + +#: config/qtcurveconfig.cpp:462 +msgid "No coloration" +msgstr "" + +#: config/qtcurveconfig.cpp:463 +msgid "Color border" +msgstr "" + +#: config/qtcurveconfig.cpp:464 +msgid "Thick color border" +msgstr "" + +#: config/qtcurveconfig.cpp:465 +msgid "Plastik style" +msgstr "" + +#: config/qtcurveconfig.cpp:466 +msgid "Glow" +msgstr "" + +#: config/qtcurveconfig.cpp:472 +msgid "Light" +msgstr "" + +#: config/qtcurveconfig.cpp:473 +msgid "Dark" +msgstr "" + +#: config/qtcurveconfig.cpp:474 +msgid "Light (all sides)" +msgstr "" + +#: config/qtcurveconfig.cpp:475 +msgid "Dark (all sides)" +msgstr "" + +#: config/qtcurveconfig.cpp:480 config/qtcurveconfig.cpp:495 +#: config/qtcurveconfig.cpp:503 +msgid "Plain" +msgstr "" + +#: config/qtcurveconfig.cpp:481 +msgid "Etched" +msgstr "" + +#: config/qtcurveconfig.cpp:482 +msgid "Shadowed" +msgstr "" + +#: config/qtcurveconfig.cpp:487 +msgid "Simple" +msgstr "" + +#: config/qtcurveconfig.cpp:488 +msgid "Use HSL color space" +msgstr "" + +#: config/qtcurveconfig.cpp:489 +msgid "Use HSV color space" +msgstr "" + +#: config/qtcurveconfig.cpp:490 +msgid "Use HCY color space" +msgstr "" + +#: config/qtcurveconfig.cpp:496 +msgid "Stripes" +msgstr "" + +#: config/qtcurveconfig.cpp:497 +msgid "Diagonal stripes" +msgstr "" + +#: config/qtcurveconfig.cpp:498 +msgid "Faded stripes" +msgstr "" + +#: config/qtcurveconfig.cpp:504 +msgid "Round" +msgstr "" + +#: config/qtcurveconfig.cpp:505 +msgid "Plain - rotated" +msgstr "" + +#: config/qtcurveconfig.cpp:506 +msgid "Round - rotated" +msgstr "" + +#: config/qtcurveconfig.cpp:507 +msgid "Triangular" +msgstr "" + +#: config/qtcurveconfig.cpp:508 +msgid "Circular" +msgstr "" + +#: config/qtcurveconfig.cpp:513 +msgid "Base color" +msgstr "" + +#: config/qtcurveconfig.cpp:514 +msgid "Background color" +msgstr "" + +#: config/qtcurveconfig.cpp:515 +msgid "Darkened background color" +msgstr "" + +#: config/qtcurveconfig.cpp:520 +msgid "Standard (dotted)" +msgstr "" + +#: config/qtcurveconfig.cpp:521 +msgid "Highlight color" +msgstr "" + +#: config/qtcurveconfig.cpp:522 +msgid "Highlight color (full size)" +msgstr "" + +#: config/qtcurveconfig.cpp:523 +msgid "Highlight color, full, and fill (Gtk2 & KDE4 only)" +msgstr "" + +#: config/qtcurveconfig.cpp:524 +msgid "Line drawn with highlight color" +msgstr "" + +#: config/qtcurveconfig.cpp:529 config/qtcurveconfigbase.ui:871 +#, no-c-format +msgid "No border" +msgstr "" + +#: config/qtcurveconfig.cpp:530 +msgid "Light border" +msgstr "" + +#: config/qtcurveconfig.cpp:531 +msgid "3D border (light only)" +msgstr "" + +#: config/qtcurveconfig.cpp:532 +msgid "3D border (dark and light)" +msgstr "" + +#: config/qtcurveconfig.cpp:533 +msgid "Shine" +msgstr "" + +#: config/qtcurveconfig.cpp:539 +msgid "Center (between controls)" +msgstr "" + +#: config/qtcurveconfig.cpp:540 +msgid "Center (full width)" +msgstr "" + +#: config/qtcurveconfig.cpp:546 +msgid "Highlight on top" +msgstr "" + +#: config/qtcurveconfig.cpp:547 +msgid "Highlight on bottom" +msgstr "" + +#: config/qtcurveconfig.cpp:548 +msgid "Add a slight glow" +msgstr "" + +#: config/qtcurveconfig.cpp:553 +msgid "Top to bottom" +msgstr "" + +#: config/qtcurveconfig.cpp:554 +msgid "Left to right" +msgstr "" + +#: config/qtcurveconfig.cpp:560 +msgid "New style (TDE and Gtk2 similar)" +msgstr "" + +#: config/qtcurveconfig.cpp:561 +msgid "Old style (TDE and Gtk2 different)" +msgstr "" + +#: config/qtcurveconfig.cpp:638 +msgid " pixels" +msgstr "" + +#: config/qtcurveconfig.cpp:781 +msgid "Predefined Style" +msgstr "" + +#: config/qtcurveconfig.cpp:783 +msgid "Import..." +msgstr "" + +#: config/qtcurveconfig.cpp:784 +msgid "Export..." +msgstr "" + +#: config/qtcurveconfig.cpp:787 +msgid "Export Theme..." +msgstr "" + +#: config/qtcurveconfig.cpp:1022 +msgid "General" +msgstr "" + +#: config/qtcurveconfig.cpp:1023 +msgid "Combos" +msgstr "" + +#: config/qtcurveconfig.cpp:1024 +msgid "Spin Buttons" +msgstr "" + +#: config/qtcurveconfig.cpp:1025 +msgid "Splitters" +msgstr "" + +#: config/qtcurveconfig.cpp:1026 +msgid "Sliders and Scrollbars" +msgstr "" + +#: config/qtcurveconfig.cpp:1027 +msgid "Progressbars" +msgstr "" + +#: config/qtcurveconfig.cpp:1028 +msgid "Default Button" +msgstr "" + +#: config/qtcurveconfig.cpp:1029 +msgid "Mouse-over" +msgstr "" + +#: config/qtcurveconfig.cpp:1030 +msgid "Listviews" +msgstr "" + +#: config/qtcurveconfig.cpp:1031 +msgid "Scrollviews" +msgstr "" + +#: config/qtcurveconfig.cpp:1032 +msgid "Tabs" +msgstr "" + +#: config/qtcurveconfig.cpp:1033 +msgid "Checks and Radios" +msgstr "" + +#: config/qtcurveconfig.cpp:1034 +msgid "Windows" +msgstr "" + +#: config/qtcurveconfig.cpp:1035 +msgid "Menus and Toolbars" +msgstr "" + +#: config/qtcurveconfig.cpp:1036 +msgid "Dock windows" +msgstr "" + +#: config/qtcurveconfig.cpp:1037 +msgid "Advanced Settings" +msgstr "" + +#: config/qtcurveconfig.cpp:1038 +msgid "Custom Gradients" +msgstr "" + +#: config/qtcurveconfig.cpp:1039 +msgid "Custom Shades" +msgstr "" + +#: config/qtcurveconfig.cpp:1267 +msgid "Update" +msgstr "" + +#: config/qtcurveconfig.cpp:1378 config/qtcurveconfig.cpp:1389 +msgid "QtCurve Settings Files" +msgstr "" + +#: config/qtcurveconfig.cpp:1380 +msgid "QtCurve TDE Theme Files" +msgstr "" + +#: config/qtcurveconfig.cpp:1405 +#, c-format +msgid "" +"Could not write to file:\n" +"%1" +msgstr "" + +#: config/qtcurveconfigbase.ui:16 +#, no-c-format +msgid "Form1" +msgstr "" + +#: config/qtcurveconfigbase.ui:38 +#, no-c-format +msgid "title" +msgstr "" + +#: config/qtcurveconfigbase.ui:47 +#, no-c-format +msgid "Category" +msgstr "" + +#: config/qtcurveconfigbase.ui:102 +#, no-c-format +msgid "" +"The setting here affects the general appearance - and will be applied to " +"buttons, combo boxes, and spin buttons." +msgstr "" + +#: config/qtcurveconfigbase.ui:110 config/qtcurveconfigbase.ui:553 +#: config/qtcurveconfigbase.ui:1681 +#, no-c-format +msgid "Appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:135 +#, no-c-format +msgid "Focus rectangle:" +msgstr "" + +#: config/qtcurveconfigbase.ui:143 +#, no-c-format +msgid "Button effect:" +msgstr "" + +#: config/qtcurveconfigbase.ui:156 +#, no-c-format +msgid "Darker borders" +msgstr "" + +#: config/qtcurveconfigbase.ui:164 +#, no-c-format +msgid "Standard buttons for sidebars" +msgstr "" + +#: config/qtcurveconfigbase.ui:167 +#, no-c-format +msgid "" +"Select this to have the sidebar buttons in konqueror, kate, kaffeine, " +"ktorrent, drawn as per normal buttons - otherwise they will be drawn in a " +"more flat style." +msgstr "" + +#: config/qtcurveconfigbase.ui:180 +#, no-c-format +msgid "Roundedness:" +msgstr "" + +#: config/qtcurveconfigbase.ui:188 +#, no-c-format +msgid "'V' style arrows" +msgstr "" + +#: config/qtcurveconfigbase.ui:224 +#, no-c-format +msgid "Frameless groupboxes," +msgstr "" + +#: config/qtcurveconfigbase.ui:240 +#, no-c-format +msgid "draw line after title (KDE4 && Gtk2)" +msgstr "" + +#: config/qtcurveconfigbase.ui:250 +#, no-c-format +msgid "Draw statusbar frames" +msgstr "" + +#: config/qtcurveconfigbase.ui:263 +#, no-c-format +msgid "Sunken appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:271 +#, no-c-format +msgid "Draw fading lines (KDE4 && Gtk2)" +msgstr "" + +#: config/qtcurveconfigbase.ui:279 +#, no-c-format +msgid "Thinner buttons when etched/shadowed" +msgstr "" + +#: config/qtcurveconfigbase.ui:304 +#, no-c-format +msgid "Etch entries and scrollviews when button effect set to etched/shadowed." +msgstr "" + +#: config/qtcurveconfigbase.ui:325 +#, no-c-format +msgid "Draw splitter" +msgstr "" + +#: config/qtcurveconfigbase.ui:328 +#, no-c-format +msgid "" +"This option controls whether a line is drawn near non-editable combo box " +"arrows." +msgstr "" + +#: config/qtcurveconfigbase.ui:336 +#, no-c-format +msgid "Draw arrow of editable combos within edit field" +msgstr "" + +#: config/qtcurveconfigbase.ui:378 +#, no-c-format +msgid "Button shade:" +msgstr "" + +#: config/qtcurveconfigbase.ui:399 +#, no-c-format +msgid "Gtk style comboboxes (KDE4)" +msgstr "" + +#: config/qtcurveconfigbase.ui:402 +#, no-c-format +msgid "" +"In Gtk, the list that is attached to a combo-box appears in the same style " +"as a popup-menu. KDE4 has the ability to mimic this look." +msgstr "" + +#: config/qtcurveconfigbase.ui:410 +#, no-c-format +msgid "Double arrows for Gtk style comboboxes" +msgstr "" + +#: config/qtcurveconfigbase.ui:431 +#, no-c-format +msgid "Combine both buttons" +msgstr "" + +#: config/qtcurveconfigbase.ui:439 +#, no-c-format +msgid "Draw arrows within edit field" +msgstr "" + +#: config/qtcurveconfigbase.ui:477 +#, no-c-format +msgid "Markings:" +msgstr "" + +#: config/qtcurveconfigbase.ui:502 config/qtcurveconfigbase.ui:990 +#: config/qtcurveconfigbase.ui:1266 config/qtcurveconfigbase.ui:1331 +#: config/qtcurveconfigbase.ui:1463 config/qtcurveconfigbase.ui:1886 +#: config/qtcurveconfigbase.ui:2280 config/qtcurveconfigbase.ui:2291 +#, no-c-format +msgid "%" +msgstr "" + +#: config/qtcurveconfigbase.ui:532 config/qtcurveconfigbase.ui:1471 +#, no-c-format +msgid "Background mouse-over highlight:" +msgstr "" + +#: config/qtcurveconfigbase.ui:561 config/qtcurveconfigbase.ui:982 +#: config/qtcurveconfigbase.ui:1389 config/qtcurveconfigbase.ui:1748 +#, no-c-format +msgid "Coloration:" +msgstr "" + +#: config/qtcurveconfigbase.ui:577 +#, no-c-format +msgid "This color setting affects both scrollbar sliders, and other sliders." +msgstr "" + +#: config/qtcurveconfigbase.ui:610 config/qtcurveconfigbase.ui:698 +#, no-c-format +msgid "" +"This appearance setting affects both scrollbar sliders, and other sliders." +msgstr "" + +#: config/qtcurveconfigbase.ui:658 +#, no-c-format +msgid "Style:" +msgstr "" + +#: config/qtcurveconfigbase.ui:666 +#, no-c-format +msgid "Slider thumbs:" +msgstr "" + +#: config/qtcurveconfigbase.ui:674 +#, no-c-format +msgid "Slider width:" +msgstr "" + +#: config/qtcurveconfigbase.ui:682 +#, no-c-format +msgid "Fill used part of groove:" +msgstr "" + +#: config/qtcurveconfigbase.ui:714 +#, no-c-format +msgid "" +"This setting only affects standard sliders - i.e. not scrollbar sliders. " +"'Triangular' is a very similar style to plastik's sliders." +msgstr "" + +#: config/qtcurveconfigbase.ui:722 +#, no-c-format +msgid "Groove appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:730 +#, no-c-format +msgid "Thin scrollbar groove" +msgstr "" + +#: config/qtcurveconfigbase.ui:738 +#, no-c-format +msgid "Scrollbar buttons:" +msgstr "" + +#: config/qtcurveconfigbase.ui:754 +#, no-c-format +msgid "" +"This controls the position, and number, of buttons on a scrollbar.\n" +"\n" +"TDE - 1 button at the top/left, and two at the bottom/right\n" +"Windows - 1 botton at each end\n" +"Platinum - no buttons at the top/left, two at bottom/right\n" +"Next - two buttons at the top/left, none at bottom/right\n" +"None - no buttons, only the slider" +msgstr "" + +#: config/qtcurveconfigbase.ui:781 +#, no-c-format +msgid "Color only on mouse-over" +msgstr "" + +#: config/qtcurveconfigbase.ui:812 +#, no-c-format +msgid "Animated" +msgstr "" + +#: config/qtcurveconfigbase.ui:837 +#, no-c-format +msgid "Groove:" +msgstr "" + +#: config/qtcurveconfigbase.ui:845 +#, no-c-format +msgid "Bar:" +msgstr "" + +#: config/qtcurveconfigbase.ui:874 +#, no-c-format +msgid "" +"Enable this option to remove the 1 pixel border around the filled element." +msgstr "" + +#: config/qtcurveconfigbase.ui:908 +#, no-c-format +msgid "Indicate with:" +msgstr "" + +#: config/qtcurveconfigbase.ui:916 +#, no-c-format +msgid "Embolden text" +msgstr "" + +#: config/qtcurveconfigbase.ui:971 +#, no-c-format +msgid "Highlight by:" +msgstr "" + +#: config/qtcurveconfigbase.ui:974 +#, no-c-format +msgid "" +"This controls the % that widgets will be highlighted by when the mouse " +"hovers over them" +msgstr "" + +#: config/qtcurveconfigbase.ui:1058 +#, no-c-format +msgid "Button color" +msgstr "" + +#: config/qtcurveconfigbase.ui:1066 +#, no-c-format +msgid "Header appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1079 +#, no-c-format +msgid "Shade header of sorted column:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1103 +#, no-c-format +msgid "Selection appearance (KDE4 && Gtk2):" +msgstr "" + +#: config/qtcurveconfigbase.ui:1133 +#, no-c-format +msgid "Force alternate colors" +msgstr "" + +#: config/qtcurveconfigbase.ui:1141 +#, no-c-format +msgid "Lines between items:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1154 +#, no-c-format +msgid "Square selection" +msgstr "" + +#: config/qtcurveconfigbase.ui:1175 +#, no-c-format +msgid "Scrollbars on the outside" +msgstr "" + +#: config/qtcurveconfigbase.ui:1183 +#, no-c-format +msgid "Highlight on focus (TDE)" +msgstr "" + +#: config/qtcurveconfigbase.ui:1191 +#, no-c-format +msgid "" +"Always draw with a square frame - regardless of the general round setting." +msgstr "" + +#: config/qtcurveconfigbase.ui:1229 +#, no-c-format +msgid "Active tab appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1237 +#, no-c-format +msgid "Inactive tab appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1255 +#, no-c-format +msgid "Highlight" +msgstr "" + +#: config/qtcurveconfigbase.ui:1258 +#, no-c-format +msgid "This will cause a coloured stripe to be drawn over the current tab." +msgstr "" + +#: config/qtcurveconfigbase.ui:1269 +#, no-c-format +msgid "Tint by " +msgstr "" + +#: config/qtcurveconfigbase.ui:1277 +#, no-c-format +msgid "Mouse-over:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1290 +#, no-c-format +msgid "Round all tabs" +msgstr "" + +#: config/qtcurveconfigbase.ui:1298 +#, no-c-format +msgid "Draw a light border around tab widget" +msgstr "" + +#: config/qtcurveconfigbase.ui:1306 +#, no-c-format +msgid "Draw inner border of inactive tabs" +msgstr "" + +#: config/qtcurveconfigbase.ui:1339 +#, no-c-format +msgid "Alter background by:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1347 +#, no-c-format +msgid "Invert shade of bottom tabs" +msgstr "" + +#: config/qtcurveconfigbase.ui:1397 +#, no-c-format +msgid "'X' style checkmarks" +msgstr "" + +#: config/qtcurveconfigbase.ui:1439 +#, no-c-format +msgid "Button like" +msgstr "" + +#: config/qtcurveconfigbase.ui:1447 +#, no-c-format +msgid "Small radio 'dot'" +msgstr "" + +#: config/qtcurveconfigbase.ui:1455 +#, no-c-format +msgid "Color when selected" +msgstr "" + +#: config/qtcurveconfigbase.ui:1509 +#, no-c-format +msgid "Button Appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1527 config/qtcurveconfigbase.ui:1535 +#, no-c-format +msgid "Titlebar Appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1548 +#, no-c-format +msgid "Text alignment:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1561 +#, no-c-format +msgid "Color titlebar only (KDE4)" +msgstr "" + +#: config/qtcurveconfigbase.ui:1586 +#, no-c-format +msgid "Light border (KDE4)" +msgstr "" + +#: config/qtcurveconfigbase.ui:1607 +#, no-c-format +msgid "Handles:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1615 +#, no-c-format +msgid "Border:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1667 +#, no-c-format +msgid "Toolbars" +msgstr "" + +#: config/qtcurveconfigbase.ui:1694 +#, no-c-format +msgid "Separators:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1726 +#, no-c-format +msgid "Menus" +msgstr "" + +#: config/qtcurveconfigbase.ui:1740 +#, no-c-format +msgid "Apply coloration to active window only" +msgstr "" + +#: config/qtcurveconfigbase.ui:1756 +#, no-c-format +msgid "Menubar appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1764 +#, no-c-format +msgid "Menuitem appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1772 +#, no-c-format +msgid "Use 'highlight' color for active menuitems" +msgstr "" + +#: config/qtcurveconfigbase.ui:1780 +#, no-c-format +msgid "Stripe (TDE):" +msgstr "" + +#: config/qtcurveconfigbase.ui:1788 +#, no-c-format +msgid "Border popupmenus" +msgstr "" + +#: config/qtcurveconfigbase.ui:1796 +#, no-c-format +msgid "Sub-menu delay:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1812 +#, no-c-format +msgid "Color menubar items on mouse-over" +msgstr "" + +#: config/qtcurveconfigbase.ui:1820 +#, no-c-format +msgid "Custom text colors (active/normal):" +msgstr "" + +#: config/qtcurveconfigbase.ui:1865 +#, no-c-format +msgid "Thinner menu items" +msgstr "" + +#: config/qtcurveconfigbase.ui:1873 +#, no-c-format +msgid "Popup-menu background:" +msgstr "" + +#: config/qtcurveconfigbase.ui:1922 +#, no-c-format +msgid "Border menuitems" +msgstr "" + +#: config/qtcurveconfigbase.ui:1930 +#, no-c-format +msgid "Draw icons" +msgstr "" + +#: config/qtcurveconfigbase.ui:1938 +#, no-c-format +msgid "Round selected menubar items on top only" +msgstr "" + +#: config/qtcurveconfigbase.ui:1954 +#, no-c-format +msgid "Enable mouse-over for menubar items" +msgstr "" + +#: config/qtcurveconfigbase.ui:1977 +#, no-c-format +msgid "Titlebar appearance:" +msgstr "" + +#: config/qtcurveconfigbase.ui:2037 +#, no-c-format +msgid "'Fix' parentless dialogs" +msgstr "" + +#: config/qtcurveconfigbase.ui:2040 +#, no-c-format +msgid "" +"<h2><font color=\"#ff0000\">Warning: Experimental!</font></h1><p><p>Some " +"applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have " +"no 'parent'. This causes the dialog to recieve an entry in the taskbar, and " +"allows the dialog to be minimised independantly of the main application " +"window.</p>\n" +"\n" +"<p>If you enable this option, QtCurve will try to 'fix' this by assigning " +"the dialogs a parent.</p>\n" +"\n" +"<p><b>Note:</b> This may brake some applications, as it wiill alter the " +"behaviour of dialogs in a way the application has not intended. Therefore, " +"please use with care.</p>" +msgstr "" + +#: config/qtcurveconfigbase.ui:2052 +#, no-c-format +msgid "Map TDE icons (Gtk2)" +msgstr "" + +#: config/qtcurveconfigbase.ui:2060 +#, no-c-format +msgid "Gtk button order" +msgstr "" + +#: config/qtcurveconfigbase.ui:2085 +#, no-c-format +msgid "Character to use for password entries:" +msgstr "" + +#: config/qtcurveconfigbase.ui:2109 +#, no-c-format +msgid "Don't make 'auto-default' buttons larger (KDE4)" +msgstr "" + +#: config/qtcurveconfigbase.ui:2135 +#, no-c-format +msgid "Settings" +msgstr "" + +#: config/qtcurveconfigbase.ui:2149 +#, no-c-format +msgid "Position (%)" +msgstr "" + +#: config/qtcurveconfigbase.ui:2160 +#, no-c-format +msgid "Value (%)" +msgstr "" + +#: config/qtcurveconfigbase.ui:2186 +#, no-c-format +msgid "Gradient Stop" +msgstr "" + +#: config/qtcurveconfigbase.ui:2253 +#, no-c-format +msgid "Value:" +msgstr "" + +#: config/qtcurveconfigbase.ui:2269 +#, no-c-format +msgid "Position:" +msgstr "" + +#: config/qtcurveconfigbase.ui:2326 +#, no-c-format +msgid "" +"<i><b>NOTE: </b><br>\n" +"\n" +"<u>Position</u> has a range of 0% to 100% - 0% being top/left, and 100% " +"being bottom/right.<br>\n" +"\n" +"<u>Value</u> has a range of 0% to 200%. A value of 120% implies lightening " +"by 20%, and a value of 80% implies darkening by 20%</i>" +msgstr "" + +#: config/qtcurveconfigbase.ui:2343 +#, no-c-format +msgid "Preview" +msgstr "" + +#: config/qtcurveconfigbase.ui:2409 +#, no-c-format +msgid "Use Custom Values" +msgstr "" + +#: config/qtcurveconfigbase.ui:2526 +#, no-c-format +msgid "" +"<i>QtCurve uses various hard-coded shading values to draw elements such as " +"button frames, the background for pressed buttons, etc. The following is a " +"brief overview of how each shade is used - use this as a guide only, as " +"shades are used for various things.<br>\n" +"\n" +"1 Is used for the light part of 3d elements - such as the border of tab " +"widgets.<br>\n" +"2 Is used for the lighter shade of striped progressbars.<br>\n" +"3 Is used for the dark part of 3d elements - such as the border of tab " +"widgets.<br>\n" +"4 Is used for the shaded border of checks and radios, toolbar borders (when " +"set to dark), the dark part of sunken/raised slider handles, etc.<br>\n" +"5 Is used for the background of pressed widgets, and the border of toolbars " +"(when not dark).<br>\n" +"6 Is used as the border of most widgets.</i>" +msgstr "" + +#: config/qtcurveconfigbase.ui:2554 +#, no-c-format +msgid "Shading routine:" +msgstr "" diff --git a/po/qtcurve.pot b/translations/messages/qtcurve/qtcurve.pot index 9b75129..e6d5173 100644 --- a/po/qtcurve.pot +++ b/translations/messages/qtcurve/qtcurve.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2019-01-13 19:19+0100\n" +"POT-Creation-Date: 2022-09-14 20:34+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -13,13 +13,15 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: _translatorinfo:1 +#. Instead of a literal translation, add your name to the end of the list (separated by a comma). +#, ignore-inconsistent msgid "" "_: NAME OF TRANSLATORS\n" "Your names" msgstr "" -#: _translatorinfo:2 +#. Instead of a literal translation, add your email to the end of the list (separated by a comma). +#, ignore-inconsistent msgid "" "_: EMAIL OF TRANSLATORS\n" "Your emails" @@ -65,7 +67,7 @@ msgstr "" msgid "Select Password Character" msgstr "" -#: config/qtcurveconfig.cpp:360 config/qtcurveconfigbase.ui:696 +#: config/qtcurveconfig.cpp:360 config/qtcurveconfigbase.ui:690 #, no-c-format msgid "Background" msgstr "" @@ -112,7 +114,7 @@ msgstr "" msgid "Custom gradient %1" msgstr "" -#: config/qtcurveconfig.cpp:392 config/qtcurveconfigbase.ui:712 +#: config/qtcurveconfig.cpp:392 config/qtcurveconfigbase.ui:706 #, no-c-format msgid "Flat" msgstr "" @@ -386,7 +388,7 @@ msgstr "" msgid "Line drawn with highlight color" msgstr "" -#: config/qtcurveconfig.cpp:529 config/qtcurveconfigbase.ui:877 +#: config/qtcurveconfig.cpp:529 config/qtcurveconfigbase.ui:871 #, no-c-format msgid "No border" msgstr "" @@ -539,7 +541,15 @@ msgstr "" msgid "Update" msgstr "" -#: config/qtcurveconfig.cpp:1403 +#: config/qtcurveconfig.cpp:1378 config/qtcurveconfig.cpp:1389 +msgid "QtCurve Settings Files" +msgstr "" + +#: config/qtcurveconfig.cpp:1380 +msgid "QtCurve TDE Theme Files" +msgstr "" + +#: config/qtcurveconfig.cpp:1405 #, c-format msgid "" "Could not write to file:\n" @@ -568,9 +578,8 @@ msgid "" "buttons, combo boxes, and spin buttons." msgstr "" -#: config/qtcurveconfigbase.ui:110 -#: config/qtcurveconfigbase.ui:559 -#: config/qtcurveconfigbase.ui:1687 +#: config/qtcurveconfigbase.ui:110 config/qtcurveconfigbase.ui:553 +#: config/qtcurveconfigbase.ui:1681 #, no-c-format msgid "Appearance:" msgstr "" @@ -638,151 +647,143 @@ msgstr "" msgid "Draw fading lines (KDE4 && Gtk2)" msgstr "" -#: config/qtcurveconfigbase.ui:282 +#: config/qtcurveconfigbase.ui:279 #, no-c-format msgid "Thinner buttons when etched/shadowed" msgstr "" -#: config/qtcurveconfigbase.ui:310 +#: config/qtcurveconfigbase.ui:304 #, no-c-format msgid "Etch entries and scrollviews when button effect set to etched/shadowed." msgstr "" -#: config/qtcurveconfigbase.ui:331 +#: config/qtcurveconfigbase.ui:325 #, no-c-format msgid "Draw splitter" msgstr "" -#: config/qtcurveconfigbase.ui:334 +#: config/qtcurveconfigbase.ui:328 #, no-c-format msgid "" "This option controls whether a line is drawn near non-editable combo box " "arrows." msgstr "" -#: config/qtcurveconfigbase.ui:342 +#: config/qtcurveconfigbase.ui:336 #, no-c-format msgid "Draw arrow of editable combos within edit field" msgstr "" -#: config/qtcurveconfigbase.ui:384 +#: config/qtcurveconfigbase.ui:378 #, no-c-format msgid "Button shade:" msgstr "" -#: config/qtcurveconfigbase.ui:405 +#: config/qtcurveconfigbase.ui:399 #, no-c-format msgid "Gtk style comboboxes (KDE4)" msgstr "" -#: config/qtcurveconfigbase.ui:408 +#: config/qtcurveconfigbase.ui:402 #, no-c-format msgid "" "In Gtk, the list that is attached to a combo-box appears in the same style " "as a popup-menu. KDE4 has the ability to mimic this look." msgstr "" -#: config/qtcurveconfigbase.ui:416 +#: config/qtcurveconfigbase.ui:410 #, no-c-format msgid "Double arrows for Gtk style comboboxes" msgstr "" -#: config/qtcurveconfigbase.ui:437 +#: config/qtcurveconfigbase.ui:431 #, no-c-format msgid "Combine both buttons" msgstr "" -#: config/qtcurveconfigbase.ui:445 +#: config/qtcurveconfigbase.ui:439 #, no-c-format msgid "Draw arrows within edit field" msgstr "" -#: config/qtcurveconfigbase.ui:483 +#: config/qtcurveconfigbase.ui:477 #, no-c-format msgid "Markings:" msgstr "" -#: config/qtcurveconfigbase.ui:508 -#: config/qtcurveconfigbase.ui:996 -#: config/qtcurveconfigbase.ui:1272 -#: config/qtcurveconfigbase.ui:1337 -#: config/qtcurveconfigbase.ui:1469 -#: config/qtcurveconfigbase.ui:1892 -#: config/qtcurveconfigbase.ui:2286 -#: config/qtcurveconfigbase.ui:2297 +#: config/qtcurveconfigbase.ui:502 config/qtcurveconfigbase.ui:990 +#: config/qtcurveconfigbase.ui:1266 config/qtcurveconfigbase.ui:1331 +#: config/qtcurveconfigbase.ui:1463 config/qtcurveconfigbase.ui:1886 +#: config/qtcurveconfigbase.ui:2280 config/qtcurveconfigbase.ui:2291 #, no-c-format msgid "%" msgstr "" -#: config/qtcurveconfigbase.ui:538 -#: config/qtcurveconfigbase.ui:1477 +#: config/qtcurveconfigbase.ui:532 config/qtcurveconfigbase.ui:1471 #, no-c-format msgid "Background mouse-over highlight:" msgstr "" -#: config/qtcurveconfigbase.ui:567 -#: config/qtcurveconfigbase.ui:988 -#: config/qtcurveconfigbase.ui:1395 -#: config/qtcurveconfigbase.ui:1754 +#: config/qtcurveconfigbase.ui:561 config/qtcurveconfigbase.ui:982 +#: config/qtcurveconfigbase.ui:1389 config/qtcurveconfigbase.ui:1748 #, no-c-format msgid "Coloration:" msgstr "" -#: config/qtcurveconfigbase.ui:583 +#: config/qtcurveconfigbase.ui:577 #, no-c-format msgid "This color setting affects both scrollbar sliders, and other sliders." msgstr "" -#: config/qtcurveconfigbase.ui:616 -#: config/qtcurveconfigbase.ui:704 +#: config/qtcurveconfigbase.ui:610 config/qtcurveconfigbase.ui:698 #, no-c-format msgid "" "This appearance setting affects both scrollbar sliders, and other sliders." msgstr "" -#: config/qtcurveconfigbase.ui:664 +#: config/qtcurveconfigbase.ui:658 #, no-c-format msgid "Style:" msgstr "" -#: config/qtcurveconfigbase.ui:672 +#: config/qtcurveconfigbase.ui:666 #, no-c-format msgid "Slider thumbs:" msgstr "" -#: config/qtcurveconfigbase.ui:680 +#: config/qtcurveconfigbase.ui:674 #, no-c-format msgid "Slider width:" msgstr "" -#: config/qtcurveconfigbase.ui:688 +#: config/qtcurveconfigbase.ui:682 #, no-c-format msgid "Fill used part of groove:" msgstr "" -#: config/qtcurveconfigbase.ui:720 +#: config/qtcurveconfigbase.ui:714 #, no-c-format msgid "" "This setting only affects standard sliders - i.e. not scrollbar sliders. " "'Triangular' is a very similar style to plastik's sliders." msgstr "" -#: config/qtcurveconfigbase.ui:728 +#: config/qtcurveconfigbase.ui:722 #, no-c-format msgid "Groove appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:736 +#: config/qtcurveconfigbase.ui:730 #, no-c-format msgid "Thin scrollbar groove" msgstr "" -#: config/qtcurveconfigbase.ui:744 +#: config/qtcurveconfigbase.ui:738 #, no-c-format msgid "Scrollbar buttons:" msgstr "" -#: config/qtcurveconfigbase.ui:760 +#: config/qtcurveconfigbase.ui:754 #, no-c-format msgid "" "This controls the position, and number, of buttons on a scrollbar.\n" @@ -794,317 +795,316 @@ msgid "" "None - no buttons, only the slider" msgstr "" -#: config/qtcurveconfigbase.ui:787 +#: config/qtcurveconfigbase.ui:781 #, no-c-format msgid "Color only on mouse-over" msgstr "" -#: config/qtcurveconfigbase.ui:818 +#: config/qtcurveconfigbase.ui:812 #, no-c-format msgid "Animated" msgstr "" -#: config/qtcurveconfigbase.ui:843 +#: config/qtcurveconfigbase.ui:837 #, no-c-format msgid "Groove:" msgstr "" -#: config/qtcurveconfigbase.ui:851 +#: config/qtcurveconfigbase.ui:845 #, no-c-format msgid "Bar:" msgstr "" -#: config/qtcurveconfigbase.ui:880 +#: config/qtcurveconfigbase.ui:874 #, no-c-format msgid "" "Enable this option to remove the 1 pixel border around the filled element." msgstr "" -#: config/qtcurveconfigbase.ui:914 +#: config/qtcurveconfigbase.ui:908 #, no-c-format msgid "Indicate with:" msgstr "" -#: config/qtcurveconfigbase.ui:922 +#: config/qtcurveconfigbase.ui:916 #, no-c-format msgid "Embolden text" msgstr "" -#: config/qtcurveconfigbase.ui:977 +#: config/qtcurveconfigbase.ui:971 #, no-c-format msgid "Highlight by:" msgstr "" -#: config/qtcurveconfigbase.ui:980 +#: config/qtcurveconfigbase.ui:974 #, no-c-format msgid "" "This controls the % that widgets will be highlighted by when the mouse " "hovers over them" msgstr "" -#: config/qtcurveconfigbase.ui:1064 +#: config/qtcurveconfigbase.ui:1058 #, no-c-format msgid "Button color" msgstr "" -#: config/qtcurveconfigbase.ui:1072 +#: config/qtcurveconfigbase.ui:1066 #, no-c-format msgid "Header appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:1085 +#: config/qtcurveconfigbase.ui:1079 #, no-c-format msgid "Shade header of sorted column:" msgstr "" -#: config/qtcurveconfigbase.ui:1109 +#: config/qtcurveconfigbase.ui:1103 #, no-c-format msgid "Selection appearance (KDE4 && Gtk2):" msgstr "" -#: config/qtcurveconfigbase.ui:1139 +#: config/qtcurveconfigbase.ui:1133 #, no-c-format msgid "Force alternate colors" msgstr "" -#: config/qtcurveconfigbase.ui:1147 +#: config/qtcurveconfigbase.ui:1141 #, no-c-format msgid "Lines between items:" msgstr "" -#: config/qtcurveconfigbase.ui:1160 +#: config/qtcurveconfigbase.ui:1154 #, no-c-format msgid "Square selection" msgstr "" -#: config/qtcurveconfigbase.ui:1181 +#: config/qtcurveconfigbase.ui:1175 #, no-c-format msgid "Scrollbars on the outside" msgstr "" -#: config/qtcurveconfigbase.ui:1189 +#: config/qtcurveconfigbase.ui:1183 #, no-c-format msgid "Highlight on focus (TDE)" msgstr "" -#: config/qtcurveconfigbase.ui:1197 +#: config/qtcurveconfigbase.ui:1191 #, no-c-format msgid "" "Always draw with a square frame - regardless of the general round setting." msgstr "" -#: config/qtcurveconfigbase.ui:1235 +#: config/qtcurveconfigbase.ui:1229 #, no-c-format msgid "Active tab appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:1243 +#: config/qtcurveconfigbase.ui:1237 #, no-c-format msgid "Inactive tab appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:1261 +#: config/qtcurveconfigbase.ui:1255 #, no-c-format msgid "Highlight" msgstr "" -#: config/qtcurveconfigbase.ui:1264 +#: config/qtcurveconfigbase.ui:1258 #, no-c-format msgid "This will cause a coloured stripe to be drawn over the current tab." msgstr "" -#: config/qtcurveconfigbase.ui:1275 +#: config/qtcurveconfigbase.ui:1269 #, no-c-format msgid "Tint by " msgstr "" -#: config/qtcurveconfigbase.ui:1283 +#: config/qtcurveconfigbase.ui:1277 #, no-c-format msgid "Mouse-over:" msgstr "" -#: config/qtcurveconfigbase.ui:1296 +#: config/qtcurveconfigbase.ui:1290 #, no-c-format msgid "Round all tabs" msgstr "" -#: config/qtcurveconfigbase.ui:1304 +#: config/qtcurveconfigbase.ui:1298 #, no-c-format msgid "Draw a light border around tab widget" msgstr "" -#: config/qtcurveconfigbase.ui:1312 +#: config/qtcurveconfigbase.ui:1306 #, no-c-format msgid "Draw inner border of inactive tabs" msgstr "" -#: config/qtcurveconfigbase.ui:1345 +#: config/qtcurveconfigbase.ui:1339 #, no-c-format msgid "Alter background by:" msgstr "" -#: config/qtcurveconfigbase.ui:1353 +#: config/qtcurveconfigbase.ui:1347 #, no-c-format msgid "Invert shade of bottom tabs" msgstr "" -#: config/qtcurveconfigbase.ui:1403 +#: config/qtcurveconfigbase.ui:1397 #, no-c-format msgid "'X' style checkmarks" msgstr "" -#: config/qtcurveconfigbase.ui:1445 +#: config/qtcurveconfigbase.ui:1439 #, no-c-format msgid "Button like" msgstr "" -#: config/qtcurveconfigbase.ui:1453 +#: config/qtcurveconfigbase.ui:1447 #, no-c-format msgid "Small radio 'dot'" msgstr "" -#: config/qtcurveconfigbase.ui:1461 +#: config/qtcurveconfigbase.ui:1455 #, no-c-format msgid "Color when selected" msgstr "" -#: config/qtcurveconfigbase.ui:1515 +#: config/qtcurveconfigbase.ui:1509 #, no-c-format msgid "Button Appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:1533 -#: config/qtcurveconfigbase.ui:1541 +#: config/qtcurveconfigbase.ui:1527 config/qtcurveconfigbase.ui:1535 #, no-c-format msgid "Titlebar Appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:1554 +#: config/qtcurveconfigbase.ui:1548 #, no-c-format msgid "Text alignment:" msgstr "" -#: config/qtcurveconfigbase.ui:1567 +#: config/qtcurveconfigbase.ui:1561 #, no-c-format msgid "Color titlebar only (KDE4)" msgstr "" -#: config/qtcurveconfigbase.ui:1592 +#: config/qtcurveconfigbase.ui:1586 #, no-c-format msgid "Light border (KDE4)" msgstr "" -#: config/qtcurveconfigbase.ui:1613 +#: config/qtcurveconfigbase.ui:1607 #, no-c-format msgid "Handles:" msgstr "" -#: config/qtcurveconfigbase.ui:1621 +#: config/qtcurveconfigbase.ui:1615 #, no-c-format msgid "Border:" msgstr "" -#: config/qtcurveconfigbase.ui:1673 +#: config/qtcurveconfigbase.ui:1667 #, no-c-format msgid "Toolbars" msgstr "" -#: config/qtcurveconfigbase.ui:1700 +#: config/qtcurveconfigbase.ui:1694 #, no-c-format msgid "Separators:" msgstr "" -#: config/qtcurveconfigbase.ui:1732 +#: config/qtcurveconfigbase.ui:1726 #, no-c-format msgid "Menus" msgstr "" -#: config/qtcurveconfigbase.ui:1746 +#: config/qtcurveconfigbase.ui:1740 #, no-c-format msgid "Apply coloration to active window only" msgstr "" -#: config/qtcurveconfigbase.ui:1762 +#: config/qtcurveconfigbase.ui:1756 #, no-c-format msgid "Menubar appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:1770 +#: config/qtcurveconfigbase.ui:1764 #, no-c-format msgid "Menuitem appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:1778 +#: config/qtcurveconfigbase.ui:1772 #, no-c-format msgid "Use 'highlight' color for active menuitems" msgstr "" -#: config/qtcurveconfigbase.ui:1786 +#: config/qtcurveconfigbase.ui:1780 #, no-c-format msgid "Stripe (TDE):" msgstr "" -#: config/qtcurveconfigbase.ui:1794 +#: config/qtcurveconfigbase.ui:1788 #, no-c-format msgid "Border popupmenus" msgstr "" -#: config/qtcurveconfigbase.ui:1802 +#: config/qtcurveconfigbase.ui:1796 #, no-c-format msgid "Sub-menu delay:" msgstr "" -#: config/qtcurveconfigbase.ui:1818 +#: config/qtcurveconfigbase.ui:1812 #, no-c-format msgid "Color menubar items on mouse-over" msgstr "" -#: config/qtcurveconfigbase.ui:1826 +#: config/qtcurveconfigbase.ui:1820 #, no-c-format msgid "Custom text colors (active/normal):" msgstr "" -#: config/qtcurveconfigbase.ui:1871 +#: config/qtcurveconfigbase.ui:1865 #, no-c-format msgid "Thinner menu items" msgstr "" -#: config/qtcurveconfigbase.ui:1879 +#: config/qtcurveconfigbase.ui:1873 #, no-c-format msgid "Popup-menu background:" msgstr "" -#: config/qtcurveconfigbase.ui:1928 +#: config/qtcurveconfigbase.ui:1922 #, no-c-format msgid "Border menuitems" msgstr "" -#: config/qtcurveconfigbase.ui:1936 +#: config/qtcurveconfigbase.ui:1930 #, no-c-format msgid "Draw icons" msgstr "" -#: config/qtcurveconfigbase.ui:1944 +#: config/qtcurveconfigbase.ui:1938 #, no-c-format msgid "Round selected menubar items on top only" msgstr "" -#: config/qtcurveconfigbase.ui:1960 +#: config/qtcurveconfigbase.ui:1954 #, no-c-format msgid "Enable mouse-over for menubar items" msgstr "" -#: config/qtcurveconfigbase.ui:1983 +#: config/qtcurveconfigbase.ui:1977 #, no-c-format msgid "Titlebar appearance:" msgstr "" -#: config/qtcurveconfigbase.ui:2043 +#: config/qtcurveconfigbase.ui:2037 #, no-c-format msgid "'Fix' parentless dialogs" msgstr "" -#: config/qtcurveconfigbase.ui:2046 +#: config/qtcurveconfigbase.ui:2040 #, no-c-format msgid "" "<h2><font color=\"#ff0000\">Warning: Experimental!</font></h1><p><p>Some " @@ -1121,57 +1121,57 @@ msgid "" "please use with care.</p>" msgstr "" -#: config/qtcurveconfigbase.ui:2058 +#: config/qtcurveconfigbase.ui:2052 #, no-c-format msgid "Map TDE icons (Gtk2)" msgstr "" -#: config/qtcurveconfigbase.ui:2066 +#: config/qtcurveconfigbase.ui:2060 #, no-c-format msgid "Gtk button order" msgstr "" -#: config/qtcurveconfigbase.ui:2091 +#: config/qtcurveconfigbase.ui:2085 #, no-c-format msgid "Character to use for password entries:" msgstr "" -#: config/qtcurveconfigbase.ui:2115 +#: config/qtcurveconfigbase.ui:2109 #, no-c-format msgid "Don't make 'auto-default' buttons larger (KDE4)" msgstr "" -#: config/qtcurveconfigbase.ui:2141 +#: config/qtcurveconfigbase.ui:2135 #, no-c-format msgid "Settings" msgstr "" -#: config/qtcurveconfigbase.ui:2155 +#: config/qtcurveconfigbase.ui:2149 #, no-c-format msgid "Position (%)" msgstr "" -#: config/qtcurveconfigbase.ui:2166 +#: config/qtcurveconfigbase.ui:2160 #, no-c-format msgid "Value (%)" msgstr "" -#: config/qtcurveconfigbase.ui:2192 +#: config/qtcurveconfigbase.ui:2186 #, no-c-format msgid "Gradient Stop" msgstr "" -#: config/qtcurveconfigbase.ui:2259 +#: config/qtcurveconfigbase.ui:2253 #, no-c-format msgid "Value:" msgstr "" -#: config/qtcurveconfigbase.ui:2275 +#: config/qtcurveconfigbase.ui:2269 #, no-c-format msgid "Position:" msgstr "" -#: config/qtcurveconfigbase.ui:2332 +#: config/qtcurveconfigbase.ui:2326 #, no-c-format msgid "" "<i><b>NOTE: </b><br>\n" @@ -1183,17 +1183,17 @@ msgid "" "by 20%, and a value of 80% implies darkening by 20%</i>" msgstr "" -#: config/qtcurveconfigbase.ui:2349 +#: config/qtcurveconfigbase.ui:2343 #, no-c-format msgid "Preview" msgstr "" -#: config/qtcurveconfigbase.ui:2415 +#: config/qtcurveconfigbase.ui:2409 #, no-c-format msgid "Use Custom Values" msgstr "" -#: config/qtcurveconfigbase.ui:2532 +#: config/qtcurveconfigbase.ui:2526 #, no-c-format msgid "" "<i>QtCurve uses various hard-coded shading values to draw elements such as " @@ -1213,7 +1213,7 @@ msgid "" "6 Is used as the border of most widgets.</i>" msgstr "" -#: config/qtcurveconfigbase.ui:2560 +#: config/qtcurveconfigbase.ui:2554 #, no-c-format msgid "Shading routine:" msgstr "" diff --git a/po/tr.po b/translations/messages/qtcurve/tr.po index 9f76757..d8ff486 100644 --- a/po/tr.po +++ b/translations/messages/qtcurve/tr.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: trinity-qtcurve\n" "Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?" "group_id=50231&atid=459007\n" -"POT-Creation-Date: 2019-01-13 19:19+0100\n" +"POT-Creation-Date: 2022-09-14 20:34+0000\n" "PO-Revision-Date: 2009-07-04 01:44+0300\n" "Last-Translator: Necmettin Begiter <necmettin.begiter@gmail.com>\n" "Language-Team: Turkish <kde-i18n-doc@kde.org>\n" @@ -18,13 +18,13 @@ msgstr "" "X-Generator: Lokalize 0.3\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: _translatorinfo:1 +#. Instead of a literal translation, add your name to the end of the list (separated by a comma). msgid "" "_: NAME OF TRANSLATORS\n" "Your names" msgstr "Necmettin Begiter" -#: _translatorinfo:2 +#. Instead of a literal translation, add your email to the end of the list (separated by a comma). msgid "" "_: EMAIL OF TRANSLATORS\n" "Your emails" @@ -72,7 +72,7 @@ msgstr "Dosya oluşturulamadı: %1" msgid "Select Password Character" msgstr "Parola Karakterini Seç" -#: config/qtcurveconfig.cpp:360 config/qtcurveconfigbase.ui:696 +#: config/qtcurveconfig.cpp:360 config/qtcurveconfigbase.ui:690 #, no-c-format msgid "Background" msgstr "Arkaplan" @@ -120,7 +120,7 @@ msgstr "Kenarlar renklendirilmiş" msgid "Custom gradient %1" msgstr "Özel eğimli %1" -#: config/qtcurveconfig.cpp:392 config/qtcurveconfigbase.ui:712 +#: config/qtcurveconfig.cpp:392 config/qtcurveconfigbase.ui:706 #, no-c-format msgid "Flat" msgstr "Düz" @@ -400,7 +400,7 @@ msgstr "Vurgu rengi, dolu, ve doldur (sadece Gtk2 ve KDE4)" msgid "Line drawn with highlight color" msgstr "Vurgu rengiyle çizilmiş çizgi" -#: config/qtcurveconfig.cpp:529 config/qtcurveconfigbase.ui:877 +#: config/qtcurveconfig.cpp:529 config/qtcurveconfigbase.ui:871 #, no-c-format msgid "No border" msgstr "Kenarlık yok" @@ -555,7 +555,16 @@ msgstr "Özel Gölgeler" msgid "Update" msgstr "Güncelle" -#: config/qtcurveconfig.cpp:1403 +#: config/qtcurveconfig.cpp:1378 config/qtcurveconfig.cpp:1389 +msgid "QtCurve Settings Files" +msgstr "" + +#: config/qtcurveconfig.cpp:1380 +#, fuzzy +msgid "QtCurve TDE Theme Files" +msgstr "QtCurve tabanlı tema" + +#: config/qtcurveconfig.cpp:1405 #, c-format msgid "" "Could not write to file:\n" @@ -588,8 +597,8 @@ msgstr "" "Buradaki ayar genel görünümü etkiler ve düğmelere, birleşik kutulara ve " "çevirme düğmelerine uygulanır." -#: config/qtcurveconfigbase.ui:110 config/qtcurveconfigbase.ui:559 -#: config/qtcurveconfigbase.ui:1687 +#: config/qtcurveconfigbase.ui:110 config/qtcurveconfigbase.ui:553 +#: config/qtcurveconfigbase.ui:1681 #, no-c-format msgid "Appearance:" msgstr "Görünüm:" @@ -660,22 +669,22 @@ msgstr "Çökmüş görünüm:" msgid "Draw fading lines (KDE4 && Gtk2)" msgstr "Solan çizgiler çiz (KDE4 ve Gtk2)" -#: config/qtcurveconfigbase.ui:282 +#: config/qtcurveconfigbase.ui:279 #, no-c-format msgid "Thinner buttons when etched/shadowed" msgstr "Damgalı veya gölgeli iken daha ince düğmeler" -#: config/qtcurveconfigbase.ui:310 +#: config/qtcurveconfigbase.ui:304 #, fuzzy, no-c-format msgid "Etch entries and scrollviews when button effect set to etched/shadowed." msgstr "Düğme efekti damgalı veya gölgeli olduğunda damgalı çiz." -#: config/qtcurveconfigbase.ui:331 +#: config/qtcurveconfigbase.ui:325 #, no-c-format msgid "Draw splitter" msgstr "Ayraç çiz" -#: config/qtcurveconfigbase.ui:334 +#: config/qtcurveconfigbase.ui:328 #, no-c-format msgid "" "This option controls whether a line is drawn near non-editable combo box " @@ -684,22 +693,22 @@ msgstr "" "Bu seçenek değiştirilebilir olmayan birleşik kutu oklarının yakınında bir " "çizgi çizilip çizilmeyeceğini belirler." -#: config/qtcurveconfigbase.ui:342 +#: config/qtcurveconfigbase.ui:336 #, no-c-format msgid "Draw arrow of editable combos within edit field" msgstr "Değiştirme alanı içinde değiştirilebilir birleşiklerin oklarını çiz" -#: config/qtcurveconfigbase.ui:384 +#: config/qtcurveconfigbase.ui:378 #, no-c-format msgid "Button shade:" msgstr "Düğme gölgesi:" -#: config/qtcurveconfigbase.ui:405 +#: config/qtcurveconfigbase.ui:399 #, no-c-format msgid "Gtk style comboboxes (KDE4)" msgstr "Gtk biçemi birleşik kutular (KDE4)" -#: config/qtcurveconfigbase.ui:408 +#: config/qtcurveconfigbase.ui:402 #, no-c-format msgid "" "In Gtk, the list that is attached to a combo-box appears in the same style " @@ -708,79 +717,79 @@ msgstr "" "Gtk'de birleşik bir kutuya eklenen liste açılır menü ile aynı biçimde " "görünür. KDE4 bu davranışı taklit edebilir." -#: config/qtcurveconfigbase.ui:416 +#: config/qtcurveconfigbase.ui:410 #, fuzzy, no-c-format msgid "Double arrows for Gtk style comboboxes" msgstr "Gtk biçemi birleşik kutular (KDE4)" -#: config/qtcurveconfigbase.ui:437 +#: config/qtcurveconfigbase.ui:431 #, no-c-format msgid "Combine both buttons" msgstr "İki düğmeyi birleştir" -#: config/qtcurveconfigbase.ui:445 +#: config/qtcurveconfigbase.ui:439 #, no-c-format msgid "Draw arrows within edit field" msgstr "Değiştirme alanında okları çiz" -#: config/qtcurveconfigbase.ui:483 +#: config/qtcurveconfigbase.ui:477 #, no-c-format msgid "Markings:" msgstr "İşaretler:" -#: config/qtcurveconfigbase.ui:508 config/qtcurveconfigbase.ui:996 -#: config/qtcurveconfigbase.ui:1272 config/qtcurveconfigbase.ui:1337 -#: config/qtcurveconfigbase.ui:1469 config/qtcurveconfigbase.ui:1892 -#: config/qtcurveconfigbase.ui:2286 config/qtcurveconfigbase.ui:2297 +#: config/qtcurveconfigbase.ui:502 config/qtcurveconfigbase.ui:990 +#: config/qtcurveconfigbase.ui:1266 config/qtcurveconfigbase.ui:1331 +#: config/qtcurveconfigbase.ui:1463 config/qtcurveconfigbase.ui:1886 +#: config/qtcurveconfigbase.ui:2280 config/qtcurveconfigbase.ui:2291 #, no-c-format msgid "%" msgstr "%" -#: config/qtcurveconfigbase.ui:538 config/qtcurveconfigbase.ui:1477 +#: config/qtcurveconfigbase.ui:532 config/qtcurveconfigbase.ui:1471 #, fuzzy, no-c-format msgid "Background mouse-over highlight:" msgstr "Metin arkaplanını vurgula" -#: config/qtcurveconfigbase.ui:567 config/qtcurveconfigbase.ui:988 -#: config/qtcurveconfigbase.ui:1395 config/qtcurveconfigbase.ui:1754 +#: config/qtcurveconfigbase.ui:561 config/qtcurveconfigbase.ui:982 +#: config/qtcurveconfigbase.ui:1389 config/qtcurveconfigbase.ui:1748 #, no-c-format msgid "Coloration:" msgstr "Renklendirme:" -#: config/qtcurveconfigbase.ui:583 +#: config/qtcurveconfigbase.ui:577 #, no-c-format msgid "This color setting affects both scrollbar sliders, and other sliders." msgstr "" "Bu renk ayarı hem kaydırma çubuğu sürgülerini hem diğer sürgüleri etkiler." -#: config/qtcurveconfigbase.ui:616 config/qtcurveconfigbase.ui:704 +#: config/qtcurveconfigbase.ui:610 config/qtcurveconfigbase.ui:698 #, no-c-format msgid "" "This appearance setting affects both scrollbar sliders, and other sliders." msgstr "" "Bu görünüm ayarı hem kaydırma çubuğu sürgülerini hem diğer sürgüleri etkiler." -#: config/qtcurveconfigbase.ui:664 +#: config/qtcurveconfigbase.ui:658 #, no-c-format msgid "Style:" msgstr "Biçem:" -#: config/qtcurveconfigbase.ui:672 +#: config/qtcurveconfigbase.ui:666 #, no-c-format msgid "Slider thumbs:" msgstr "Sürgü minyatürleri:" -#: config/qtcurveconfigbase.ui:680 +#: config/qtcurveconfigbase.ui:674 #, no-c-format msgid "Slider width:" msgstr "Sürgü genişliği:" -#: config/qtcurveconfigbase.ui:688 +#: config/qtcurveconfigbase.ui:682 #, no-c-format msgid "Fill used part of groove:" msgstr "Kanalın kullanılan kısmını doldur:" -#: config/qtcurveconfigbase.ui:720 +#: config/qtcurveconfigbase.ui:714 #, no-c-format msgid "" "This setting only affects standard sliders - i.e. not scrollbar sliders. " @@ -789,22 +798,22 @@ msgstr "" "Bu ayar sadece standart sürgüleri etkiler, kaydırma çubuğu sürgülerini " "değiştirmez. 'Üç köşeli' plastik'in sürgülerine çok benzer bir biçemdir." -#: config/qtcurveconfigbase.ui:728 +#: config/qtcurveconfigbase.ui:722 #, no-c-format msgid "Groove appearance:" msgstr "Kanal görünümü:" -#: config/qtcurveconfigbase.ui:736 +#: config/qtcurveconfigbase.ui:730 #, no-c-format msgid "Thin scrollbar groove" msgstr "İnce kaydırma çubuğu kanalı" -#: config/qtcurveconfigbase.ui:744 +#: config/qtcurveconfigbase.ui:738 #, no-c-format msgid "Scrollbar buttons:" msgstr "Kaydırma çubuğu düğmeleri:" -#: config/qtcurveconfigbase.ui:760 +#: config/qtcurveconfigbase.ui:754 #, no-c-format msgid "" "This controls the position, and number, of buttons on a scrollbar.\n" @@ -823,27 +832,27 @@ msgstr "" "Next - sadece sol üstte iki düğme\n" "Yok - düğme yok, sadece sürgü" -#: config/qtcurveconfigbase.ui:787 +#: config/qtcurveconfigbase.ui:781 #, no-c-format msgid "Color only on mouse-over" msgstr "Sadece fare altındayken renklendir" -#: config/qtcurveconfigbase.ui:818 +#: config/qtcurveconfigbase.ui:812 #, no-c-format msgid "Animated" msgstr "Hareketli" -#: config/qtcurveconfigbase.ui:843 +#: config/qtcurveconfigbase.ui:837 #, no-c-format msgid "Groove:" msgstr "Kanal:" -#: config/qtcurveconfigbase.ui:851 +#: config/qtcurveconfigbase.ui:845 #, no-c-format msgid "Bar:" msgstr "Çubuk:" -#: config/qtcurveconfigbase.ui:880 +#: config/qtcurveconfigbase.ui:874 #, no-c-format msgid "" "Enable this option to remove the 1 pixel border around the filled element." @@ -851,22 +860,22 @@ msgstr "" "Doldurulan öğenin etrafındaki bir piksellik kenarlığı kaldırmak için bu " "seçeneği açın." -#: config/qtcurveconfigbase.ui:914 +#: config/qtcurveconfigbase.ui:908 #, no-c-format msgid "Indicate with:" msgstr "Belirteç:" -#: config/qtcurveconfigbase.ui:922 +#: config/qtcurveconfigbase.ui:916 #, no-c-format msgid "Embolden text" msgstr "Metni kalınlaştır" -#: config/qtcurveconfigbase.ui:977 +#: config/qtcurveconfigbase.ui:971 #, no-c-format msgid "Highlight by:" msgstr "Vurgulama biçimi:" -#: config/qtcurveconfigbase.ui:980 +#: config/qtcurveconfigbase.ui:974 #, no-c-format msgid "" "This controls the % that widgets will be highlighted by when the mouse " @@ -875,270 +884,270 @@ msgstr "" "Bu ayar fare üzerlerine geldiğinde gereçlerin yüzde kaç oranda " "vurgulanacağını belirler." -#: config/qtcurveconfigbase.ui:1064 +#: config/qtcurveconfigbase.ui:1058 #, no-c-format msgid "Button color" msgstr "Düğme rengi" -#: config/qtcurveconfigbase.ui:1072 +#: config/qtcurveconfigbase.ui:1066 #, no-c-format msgid "Header appearance:" msgstr "Başlık görünümü:" -#: config/qtcurveconfigbase.ui:1085 +#: config/qtcurveconfigbase.ui:1079 #, no-c-format msgid "Shade header of sorted column:" msgstr "" -#: config/qtcurveconfigbase.ui:1109 +#: config/qtcurveconfigbase.ui:1103 #, no-c-format msgid "Selection appearance (KDE4 && Gtk2):" msgstr "Seçim görünümü (KDE4 ve Gtk2):" -#: config/qtcurveconfigbase.ui:1139 +#: config/qtcurveconfigbase.ui:1133 #, no-c-format msgid "Force alternate colors" msgstr "" -#: config/qtcurveconfigbase.ui:1147 +#: config/qtcurveconfigbase.ui:1141 #, no-c-format msgid "Lines between items:" msgstr "Öğeler arasındaki çizgiler:" -#: config/qtcurveconfigbase.ui:1160 +#: config/qtcurveconfigbase.ui:1154 #, no-c-format msgid "Square selection" msgstr "" -#: config/qtcurveconfigbase.ui:1181 +#: config/qtcurveconfigbase.ui:1175 #, no-c-format msgid "Scrollbars on the outside" msgstr "Kaydırma çubukları dışarıda" -#: config/qtcurveconfigbase.ui:1189 +#: config/qtcurveconfigbase.ui:1183 #, no-c-format msgid "Highlight on focus (TDE)" msgstr "Odaklanınca vurgula (TDE)" -#: config/qtcurveconfigbase.ui:1197 +#: config/qtcurveconfigbase.ui:1191 #, no-c-format msgid "" "Always draw with a square frame - regardless of the general round setting." msgstr "" "Gelen yuvarlatma ayarını dikkate alma, her zaman köşeli bir çerçeve kullan." -#: config/qtcurveconfigbase.ui:1235 +#: config/qtcurveconfigbase.ui:1229 #, no-c-format msgid "Active tab appearance:" msgstr "Etkin sekme görünümü:" -#: config/qtcurveconfigbase.ui:1243 +#: config/qtcurveconfigbase.ui:1237 #, no-c-format msgid "Inactive tab appearance:" msgstr "Etkin olmayan sekme görünümü:" -#: config/qtcurveconfigbase.ui:1261 +#: config/qtcurveconfigbase.ui:1255 #, no-c-format msgid "Highlight" msgstr "Vurgula" -#: config/qtcurveconfigbase.ui:1264 +#: config/qtcurveconfigbase.ui:1258 #, no-c-format msgid "This will cause a coloured stripe to be drawn over the current tab." msgstr "" "Bu seçenek etkin sekmenin üst kısmına renkli bir şerit çizilmesini sağlar." -#: config/qtcurveconfigbase.ui:1275 +#: config/qtcurveconfigbase.ui:1269 #, no-c-format msgid "Tint by " msgstr "" -#: config/qtcurveconfigbase.ui:1283 +#: config/qtcurveconfigbase.ui:1277 #, no-c-format msgid "Mouse-over:" msgstr "Fare altında:" -#: config/qtcurveconfigbase.ui:1296 +#: config/qtcurveconfigbase.ui:1290 #, no-c-format msgid "Round all tabs" msgstr "Tüm sekmeleri yuvarlat" -#: config/qtcurveconfigbase.ui:1304 +#: config/qtcurveconfigbase.ui:1298 #, no-c-format msgid "Draw a light border around tab widget" msgstr "Sekme gerecinin etrafına açık renk bir kenarlık çiz" -#: config/qtcurveconfigbase.ui:1312 +#: config/qtcurveconfigbase.ui:1306 #, no-c-format msgid "Draw inner border of inactive tabs" msgstr "" -#: config/qtcurveconfigbase.ui:1345 +#: config/qtcurveconfigbase.ui:1339 #, fuzzy, no-c-format msgid "Alter background by:" msgstr "Seçili arkaplan" -#: config/qtcurveconfigbase.ui:1353 +#: config/qtcurveconfigbase.ui:1347 #, no-c-format msgid "Invert shade of bottom tabs" msgstr "" -#: config/qtcurveconfigbase.ui:1403 +#: config/qtcurveconfigbase.ui:1397 #, no-c-format msgid "'X' style checkmarks" msgstr "'X' biçemli işaretler" -#: config/qtcurveconfigbase.ui:1445 +#: config/qtcurveconfigbase.ui:1439 #, no-c-format msgid "Button like" msgstr "Düğme gibi" -#: config/qtcurveconfigbase.ui:1453 +#: config/qtcurveconfigbase.ui:1447 #, no-c-format msgid "Small radio 'dot'" msgstr "" -#: config/qtcurveconfigbase.ui:1461 +#: config/qtcurveconfigbase.ui:1455 #, no-c-format msgid "Color when selected" msgstr "" -#: config/qtcurveconfigbase.ui:1515 +#: config/qtcurveconfigbase.ui:1509 #, no-c-format msgid "Button Appearance:" msgstr "Düğme Görünümü:" -#: config/qtcurveconfigbase.ui:1533 config/qtcurveconfigbase.ui:1541 +#: config/qtcurveconfigbase.ui:1527 config/qtcurveconfigbase.ui:1535 #, no-c-format msgid "Titlebar Appearance:" msgstr "Başlık Çubuğu Görünümü:" -#: config/qtcurveconfigbase.ui:1554 +#: config/qtcurveconfigbase.ui:1548 #, no-c-format msgid "Text alignment:" msgstr "Metin hizalama:" -#: config/qtcurveconfigbase.ui:1567 +#: config/qtcurveconfigbase.ui:1561 #, no-c-format msgid "Color titlebar only (KDE4)" msgstr "Sadece başlık çubuğu renkli (KDE4)" -#: config/qtcurveconfigbase.ui:1592 +#: config/qtcurveconfigbase.ui:1586 #, no-c-format msgid "Light border (KDE4)" msgstr "Açık renk kenarlık (KDE4)" -#: config/qtcurveconfigbase.ui:1613 +#: config/qtcurveconfigbase.ui:1607 #, no-c-format msgid "Handles:" msgstr "Tutamaçlar:" -#: config/qtcurveconfigbase.ui:1621 +#: config/qtcurveconfigbase.ui:1615 #, no-c-format msgid "Border:" msgstr "Kenarlık:" -#: config/qtcurveconfigbase.ui:1673 +#: config/qtcurveconfigbase.ui:1667 #, no-c-format msgid "Toolbars" msgstr "Araç çubukları" -#: config/qtcurveconfigbase.ui:1700 +#: config/qtcurveconfigbase.ui:1694 #, no-c-format msgid "Separators:" msgstr "Ayraçlar:" -#: config/qtcurveconfigbase.ui:1732 +#: config/qtcurveconfigbase.ui:1726 #, no-c-format msgid "Menus" msgstr "Menüler" -#: config/qtcurveconfigbase.ui:1746 +#: config/qtcurveconfigbase.ui:1740 #, no-c-format msgid "Apply coloration to active window only" msgstr "Renklendirmeyi sadece etkin pencereye uygula" -#: config/qtcurveconfigbase.ui:1762 +#: config/qtcurveconfigbase.ui:1756 #, no-c-format msgid "Menubar appearance:" msgstr "Menü çubuğu görünümü:" -#: config/qtcurveconfigbase.ui:1770 +#: config/qtcurveconfigbase.ui:1764 #, no-c-format msgid "Menuitem appearance:" msgstr "Menü öğesi görünümü:" -#: config/qtcurveconfigbase.ui:1778 +#: config/qtcurveconfigbase.ui:1772 #, no-c-format msgid "Use 'highlight' color for active menuitems" msgstr "Etkin menü öğelerine 'vurgu' rengi uygula" -#: config/qtcurveconfigbase.ui:1786 +#: config/qtcurveconfigbase.ui:1780 #, no-c-format msgid "Stripe (TDE):" msgstr "Şerit (TDE):" -#: config/qtcurveconfigbase.ui:1794 +#: config/qtcurveconfigbase.ui:1788 #, no-c-format msgid "Border popupmenus" msgstr "Açılır menülere kenarlık ekle" -#: config/qtcurveconfigbase.ui:1802 +#: config/qtcurveconfigbase.ui:1796 #, no-c-format msgid "Sub-menu delay:" msgstr "Alt menü gecikmesi:" -#: config/qtcurveconfigbase.ui:1818 +#: config/qtcurveconfigbase.ui:1812 #, no-c-format msgid "Color menubar items on mouse-over" msgstr "Fare altında menü çubuğu öğelerini renklendir" -#: config/qtcurveconfigbase.ui:1826 +#: config/qtcurveconfigbase.ui:1820 #, no-c-format msgid "Custom text colors (active/normal):" msgstr "Özel metin renkleri (etkin-normal):" -#: config/qtcurveconfigbase.ui:1871 +#: config/qtcurveconfigbase.ui:1865 #, no-c-format msgid "Thinner menu items" msgstr "Daha ince menü öğeleri" -#: config/qtcurveconfigbase.ui:1879 +#: config/qtcurveconfigbase.ui:1873 #, no-c-format msgid "Popup-menu background:" msgstr "Açılır menü arkaplanı:" -#: config/qtcurveconfigbase.ui:1928 +#: config/qtcurveconfigbase.ui:1922 #, no-c-format msgid "Border menuitems" msgstr "Menü öğelerine kenarlık çiz" -#: config/qtcurveconfigbase.ui:1936 +#: config/qtcurveconfigbase.ui:1930 #, no-c-format msgid "Draw icons" msgstr "" -#: config/qtcurveconfigbase.ui:1944 +#: config/qtcurveconfigbase.ui:1938 #, no-c-format msgid "Round selected menubar items on top only" msgstr "Sadece en üst menü çubuğu öğelerini yuvarlat" -#: config/qtcurveconfigbase.ui:1960 +#: config/qtcurveconfigbase.ui:1954 #, no-c-format msgid "Enable mouse-over for menubar items" msgstr "Menü çubuğu öğelerine 'fare altında' efekti uygula" -#: config/qtcurveconfigbase.ui:1983 +#: config/qtcurveconfigbase.ui:1977 #, fuzzy, no-c-format msgid "Titlebar appearance:" msgstr "Başlık Çubuğu Görünümü:" -#: config/qtcurveconfigbase.ui:2043 +#: config/qtcurveconfigbase.ui:2037 #, no-c-format msgid "'Fix' parentless dialogs" msgstr "Yetim diyalogları 'tamir et'" -#: config/qtcurveconfigbase.ui:2046 +#: config/qtcurveconfigbase.ui:2040 #, no-c-format msgid "" "<h2><font color=\"#ff0000\">Warning: Experimental!</font></h1><p><p>Some " @@ -1167,57 +1176,57 @@ msgstr "" "ayarlanan şeklin dışına çıkardığı için bazı uygulamaların düzgün çalışmasını " "engelleyebilir. O nedenle, dikkatli kullanmanızı tavsiye ederiz.</p>" -#: config/qtcurveconfigbase.ui:2058 +#: config/qtcurveconfigbase.ui:2052 #, no-c-format msgid "Map TDE icons (Gtk2)" msgstr "TDE simgelerine eşle (Gtk2)" -#: config/qtcurveconfigbase.ui:2066 +#: config/qtcurveconfigbase.ui:2060 #, no-c-format msgid "Gtk button order" msgstr "Gtk düğme sırası" -#: config/qtcurveconfigbase.ui:2091 +#: config/qtcurveconfigbase.ui:2085 #, no-c-format msgid "Character to use for password entries:" msgstr "Parola girişlerinde kullanılacak karakter:" -#: config/qtcurveconfigbase.ui:2115 +#: config/qtcurveconfigbase.ui:2109 #, no-c-format msgid "Don't make 'auto-default' buttons larger (KDE4)" msgstr "" -#: config/qtcurveconfigbase.ui:2141 +#: config/qtcurveconfigbase.ui:2135 #, no-c-format msgid "Settings" msgstr "Ayarlar" -#: config/qtcurveconfigbase.ui:2155 +#: config/qtcurveconfigbase.ui:2149 #, no-c-format msgid "Position (%)" msgstr "Konum (%)" -#: config/qtcurveconfigbase.ui:2166 +#: config/qtcurveconfigbase.ui:2160 #, no-c-format msgid "Value (%)" msgstr "Değer (%)" -#: config/qtcurveconfigbase.ui:2192 +#: config/qtcurveconfigbase.ui:2186 #, no-c-format msgid "Gradient Stop" msgstr "Eğim Durağı" -#: config/qtcurveconfigbase.ui:2259 +#: config/qtcurveconfigbase.ui:2253 #, no-c-format msgid "Value:" msgstr "Değer:" -#: config/qtcurveconfigbase.ui:2275 +#: config/qtcurveconfigbase.ui:2269 #, no-c-format msgid "Position:" msgstr "Konum:" -#: config/qtcurveconfigbase.ui:2332 +#: config/qtcurveconfigbase.ui:2326 #, no-c-format msgid "" "<i><b>NOTE: </b><br>\n" @@ -1237,17 +1246,17 @@ msgstr "" "açık bir renk anlamına gelir, % 80 ise % 20 oranında daha koyu bir rengi " "temsil eder.</i>" -#: config/qtcurveconfigbase.ui:2349 +#: config/qtcurveconfigbase.ui:2343 #, no-c-format msgid "Preview" msgstr "Önizleme" -#: config/qtcurveconfigbase.ui:2415 +#: config/qtcurveconfigbase.ui:2409 #, no-c-format msgid "Use Custom Values" msgstr "Özel Değerler Kullan" -#: config/qtcurveconfigbase.ui:2532 +#: config/qtcurveconfigbase.ui:2526 #, no-c-format msgid "" "<i>QtCurve uses various hard-coded shading values to draw elements such as " @@ -1281,7 +1290,7 @@ msgstr "" "çerçeveleri için kullanılır.<br>\n" "6 Çoğu gerecin kenarlığı olarak kullanılır.</i>" -#: config/qtcurveconfigbase.ui:2560 +#: config/qtcurveconfigbase.ui:2554 #, no-c-format msgid "Shading routine:" msgstr "Gölgeleme yordamı:" |