Browse Source

Update qtcurve to latest upstream version


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-style-qtcurve@1182805 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tpearson 8 years ago
parent
commit
b23b8edce7

+ 1
- 0
AUTHORS View File

@@ -0,0 +1 @@
1
+Craig Drummond <craig.p.drummond@gmail.com>

+ 71
- 11
CMakeLists.txt View File

@@ -6,24 +6,53 @@ set(CPACK_GENERATOR "DEB;RPM;TGZ")
6 6
 set(DEBIAN_PACKAGE_DESCRIPTION "QtCurve for Qt3/KDE3")
7 7
 set(DEBIAN_PACKAGE_SECTION "kde")
8 8
 set(CPACK_SOURCE_GENERATOR "TBZ2")
9
-set(CPACK_PACKAGE_VERSION_MAJOR "0")
10
-set(CPACK_PACKAGE_VERSION_MINOR "55")
9
+set(CPACK_PACKAGE_VERSION_MAJOR "1")
10
+set(CPACK_PACKAGE_VERSION_MINOR "6")
11 11
 set(CPACK_PACKAGE_VERSION_PATCH "2")
12
-set(CPACK_PACKAGE_CONTACT "Craig Drummond <Craig.Drummond@lycos.co.uk>")
12
+set(CPACK_PACKAGE_CONTACT "Craig Drummond <craig.p.drummond@gmail.com>")
13 13
 set(QTCURVE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
14 14
 set(QTCURVE_VERSION_FULL "${QTCURVE_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")
15 15
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}")
16 16
 set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}")
17 17
 include(CPack)
18 18
 
19
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
19
+if(COMMAND cmake_policy)
20
+    cmake_policy(SET CMP0003 NEW)
21
+endif(COMMAND cmake_policy)
20 22
 
21
-find_package(KDE3 REQUIRED)
22
-include(KDE3Macros)
23
+if (QTC_BUILD_CONFIG_MODULE)
24
+    if (NOT QTC_QT_ONLY)
25
+        find_package(KDE3)
26
+        if (NOT KDE3_FOUND)
27
+            set(QTC_QT_ONLY true)
28
+            message("INFO: KDE3 not found! Compiling for Qt only! (Not building the config module)")
29
+        endif (NOT KDE3_FOUND)
30
+    endif (NOT QTC_QT_ONLY)
31
+else (QTC_BUILD_CONFIG_MODULE)
32
+    set(QTC_QT_ONLY true)
33
+endif (QTC_BUILD_CONFIG_MODULE)
23 34
 
35
+if (NOT QTC_QT_ONLY)
36
+    include(KDE3Macros)
37
+else (NOT QTC_QT_ONLY)
38
+    set(QT_MT_REQUIRED TRUE)
39
+    find_package(Qt3 REQUIRED)
40
+    set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
41
+    include(QtCurveQt3)
42
+    if (QT_PLUGINS_DIR MATCHES NOTFOUND)
43
+        message(SEND_ERROR "ERROR: Failed to detemine Qt3 plugins folder. Please pass -DQT_PLUGINS_DIR=<folder> to cmake")
44
+    endif (QT_PLUGINS_DIR MATCHES NOTFOUND)
45
+endif (NOT QTC_QT_ONLY)
46
+
47
+if (NOT QTC_QT_ONLY)
24 48
 exec_program(kde-config
25
-             ARGS --prefix
49
+             ARGS --prefix --expandvars
26 50
              OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX)
51
+endif (NOT QTC_QT_ONLY)
52
+
53
+exec_program(kde-config
54
+             ARGS --install locale --expandvars
55
+             OUTPUT_VARIABLE KDE3_LOCALE_PREFIX)
27 56
 
28 57
 file(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
29 58
 
@@ -47,11 +76,42 @@ if(NOT KDE4PREFIX)
47 76
 endif(NOT KDE4PREFIX)
48 77
 
49 78
 configure_file (config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
50
-add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS})
51
-include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDES})
79
+if (NOT QTC_QT_ONLY)
80
+    add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS})
81
+    include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDES})
82
+else (NOT QTC_QT_ONLY)
83
+    add_definitions(${QT_DEFINITIONS})
84
+    include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
85
+endif (NOT QTC_QT_ONLY)
52 86
 
53 87
 set(DATA_INSTALL_DIR ${KDE3PREFIX}/share/apps)
88
+
89
+if(QTC_DEFAULT_TO_KDE3)
90
+    message("INFO: Defaulting to reading KDE3 settings if KDE_SESSION_VERSION is not set")
91
+else(QTC_DEFAULT_TO_KDE3)
92
+    message("INFO: Defaulting to reading KDE4 settings if KDE_SESSION_VERSION is not set")
93
+endif(QTC_DEFAULT_TO_KDE3)
94
+
54 95
 add_subdirectory(style)
55
-add_subdirectory(config)
56
-add_subdirectory(themes)
96
+if (NOT QTC_QT_ONLY)
97
+    if (QTC_BUILD_CONFIG_MODULE)
98
+        message("**************************************************************\n"
99
+                "Warning: The KDE3 config module is deprecated, and is no longer\n"
100
+                "         actively maintained. This module NO LONGER COMPILES!\n"
101
+                "         It is recommended to use the KDE4 version instead.\n"
102
+                "**************************************************************\n")
103
+        add_subdirectory(config)
104
+        add_subdirectory(po)
105
+    endif (QTC_BUILD_CONFIG_MODULE)
106
+    add_subdirectory(themes)
107
+    add_subdirectory(colors)
108
+endif (NOT QTC_QT_ONLY)
57 109
 
110
+if (QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT)
111
+    message("**************************************************************\n"
112
+            "Warning: You have enabled support for the 'fix parentless dialogs'\n"
113
+            "         option. This is known to BREAK some applications. Please\n"
114
+            "         DO NOT report errors to application authors when you have\n"
115
+            "         this enabled. Please reconsider DISABLING this option.\n"
116
+            "**************************************************************\n")
117
+endif (QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT)

+ 2
- 2
COPYING View File

@@ -2,7 +2,7 @@
2 2
 		       Version 2, June 1991
3 3
 
4 4
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
-     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
5
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
6 6
  Everyone is permitted to copy and distribute verbatim copies
7 7
  of this license document, but changing it is not allowed.
8 8
 
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
305 305
 
306 306
     You should have received a copy of the GNU General Public License
307 307
     along with this program; if not, write to the Free Software
308
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
308
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
309 309
 
310 310
 
311 311
 Also add information on how to contact you by electronic and paper mail.

+ 598
- 12
ChangeLog View File

@@ -1,3 +1,589 @@
1
+1.6.2
2
+-----
3
+1. Disable the support for 'fix parent-less dialog' option - this causes too many
4
+   issues with applications to be worth the fuss. If you really want this enabled,
5
+   use the -DQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT=true cmake option.
6
+
7
+1.6.1
8
+-----
9
+1. Use same radius for all corners of progressbar.
10
+
11
+1.6.0
12
+-----
13
+1. Add 'glow' focus option - this is now the default.
14
+2. Fix potential crash in rgbToHsv
15
+3. Enable glow/shadow/etch for square and slight round settings.
16
+4. Draw coloured mouse over for 'checked' toggle buttons.
17
+5. Use Highlight colour for default button glow.
18
+6. Default sub-menu popup delay to 225 - matches Gtk2 standard default.
19
+7. Fix glow-mouse over for radio buttons.
20
+
21
+1.5.0
22
+-----
23
+1. Add option to set progressbar colour.
24
+2. Add options to have squared sliders and/or scrollbar sliders even when
25
+   general setting set to round.
26
+
27
+1.4.1
28
+-----
29
+1. Fix config dialog compilation.
30
+
31
+1.4.0
32
+-----
33
+1. Add striped window and menu background options.
34
+2. Added options to not square frames and tab frames.
35
+3. Add option to drag windows by menubar.
36
+4. Blend menubar and window titlebar gradients if:
37
+         menubar, titlebar, and inactive titlebar gradients match AND
38
+         not blending titlebar gradient AND
39
+         using window titlebar colour for menubar AND
40
+         extending window drag into menubar
41
+5. Default titlebar colours to window colours - matches KDE4 default.
42
+6. Fix drawing of scrollbar background.
43
+
44
+1.3.1
45
+-----
46
+1. Fix compilation of config module. Please note that this module is deprecated,
47
+   and might be out-of sync with the maintained KDE4 version.
48
+2. Fix compile when style support is enabled.
49
+
50
+1.3.0
51
+-----
52
+1. Add option to use kwin titlebar colours as menubar shade.
53
+2. Fix(?) compilation of config module.
54
+3. Dont use KStandardDirs to create config folder.
55
+4. Use 'kde' to disable parent-less dialog fix for all KDE applications.
56
+
57
+1.2.0
58
+-----
59
+1. Draw etch effect on radios if using a button effect, and not using button-like
60
+   check/radios.
61
+2. If drawing square non-gtk style scrollviews, use a dark/light borders.
62
+3. If drawing square scrollviews, set frame width to 1 if using thin scrollbar
63
+   groove.
64
+4. Add options to draw square progress and entry fields when rounding.
65
+5. Add option to control whether progressbars have a border on all sides, or just
66
+   top/bottom.
67
+6. Add option to colour default buttons using highlight colour.
68
+7. Expand selected check/radio colour option so as to be able to specify colour.
69
+8. Allow to draw focus highlight for square scrollviews.
70
+
71
+1.1.1
72
+-----
73
+1. #include config.h before using QTC_QT_ONLY
74
+
75
+1.1.0
76
+-----
77
+1. Add option to not embolden progressbar text.
78
+2. Add option to allow coloured mouse over for toolbar buttons.
79
+3. Config module is deprecated, and no longer updated - use KDE4 config module
80
+   to change settings. If KDE3 version is required, pass -DQTC_BUILD_CONFIG_MODULE=true
81
+   to cmake.
82
+
83
+1.0.1
84
+-----
85
+1. Apply cygwin patches from Yaakov S - use MODULE istead of SHARED.
86
+
87
+1.0.0
88
+-----
89
+ 1. Added option to colour selected check/radios.
90
+ 2. Added option to use a smaller dot for radios.
91
+ 3. Made check/radio and splitter highlight options a configurable % - i.e.
92
+    not based on standard hightlight %
93
+ 4. When highlighting check/radio/splitter background, use the selection gradient.
94
+ 5. Added new splitter/handle/thumb style: single dot.
95
+ 6. Default check/radio/splitter/expander highlight set to 3%
96
+ 7. Don't do coloured mouse over for buttons of editable combos, spin buttons,
97
+    or scrollbar buttons.
98
+ 8. Don't do regular coloured mouse over of sliders when these are set to be
99
+    coloured on mouse over.
100
+ 9. Allow to specify strength when colouring selected tab.
101
+10. Remove support for QtCurve styles (these appear as unique KDE styles in the
102
+    main KDE style selection dialog). Re-enable support by passing
103
+    -DQTC_STYLE_SUPPORT=true to cmake.
104
+11. Slightly lighter shade used for coloured mouse over of arrows.
105
+12. Add option to specify appearance of dock-widget titlebars.
106
+13. When saving settings to $XDG_CONFIG_HOME/qtcurve/stylerc, remove the older
107
+    $XDG_CONFIG_HOME/qtcurvestylerc, and $XDG_CONFIG_HOME/qtcurve.gtk-icons if they
108
+    exist.
109
+14. Use split gradient for dock-widget titlebars.
110
+15. Reduce number of supplied presets.
111
+16. Allow to compile style against just Qt3 - tarball includes a simplified copy
112
+    of KStyle. Need to pass -DQTC_QT_ONLY=true to cmake. NOTE: May also need to set QTDIR
113
+    *before* calling cmake.
114
+17. If KDE3 development files not found, then automatically set -DQTC_QT_ONLY=true
115
+    
116
+0.69.1
117
+------
118
+1. Remove line beneath dock widget titles.
119
+
120
+0.69.0
121
+------
122
+1. Add option to control whether bottom tabs should have their gradient
123
+   shades inverted.
124
+2. Config files now stored under $XDG_CONFIG_HOME/qtcurve (e.g. ~/.config/qtcurve)
125
+3. Fix some issue with 'flat' appearance.
126
+4. Fix shaded listview headers sometime being uninitialised.
127
+
128
+0.68.1
129
+------
130
+1. Fix reading, and saving, of 'dark inverted gradient' setting.
131
+
132
+0.68.0
133
+------
134
+1. New options:
135
+    Control whether icons are displayed in menus
136
+    Force alternate colours in listviews
137
+
138
+0.67.3
139
+------
140
+1. Fix saving of menubar item 'colour on mouse over' setting.
141
+2. Offset sunken slider thumbs to improve appearance.
142
+
143
+0.67.2
144
+------
145
+1. Only do mouse over for entries if combos and spin widgets are unified.
146
+2. If not etching/shadowing, when mouse over set to 'glow' use 'thick coloured'
147
+3. If not etching/shadowing, decrease thinner scrollbar groove.
148
+4. Fix shaded button on combos when not etching/shadowing.
149
+5. Remove hard-coding of light border in progressbars - use gradient setting.
150
+
151
+0.67.1
152
+------
153
+1. Disable combobox mouse over for OpenOffice.
154
+
155
+0.67.0
156
+------
157
+1. Add option to draw insider border of inactive tabs.
158
+2. Add option to colour the sorted listview header.
159
+3. Disable spin button when at min/max - matches Gtk2.
160
+4. Disable scrollbar buttons when at min/max - to match spin buttons.
161
+5. Place non-V arrows of unified spin widgets closer together.
162
+6. Fix shadows on radio buttons.
163
+
164
+0.66.0
165
+------
166
+ 1. Add a new 'Dark Inverted Gradient' and use this as the default gradient
167
+    for menu stripes.
168
+ 2. New 'Agua' style gradient - looks better under KDE4 and Gtk2.
169
+ 3. Add option to lighten/darken the background of tabs.
170
+ 4. Make inactive tabs more consistent with active tabs.
171
+ 5. Remove sunken scroll views config item, and replace with option to control
172
+    if entries and scroll views should be etched (sunken).
173
+ 6. Modify defaults:
174
+        Scrollbars outside of scrollview (Gtk/oxygen style)
175
+        Thin scrollbar groove.
176
+ 7. Use KDE_SESSION_VERSION to determine which KDE prefix (KDE3, or KDE4) to
177
+    seach first for qtc_xxx.themerc files.
178
+ 8. Update Klearlooks to be more consistent with Clearlooks (lighten tab background,
179
+    use highlight strip on active tab, dont colour active tab)
180
+ 9. Use default KDE4 settings to determine colour of text for disabled items.
181
+10. When calling kde-config/kde4-config pipe stderr to /dev/null
182
+
183
+0.65.4
184
+------
185
+1. Use 'MS Windows' and not 'Windows' for scrollbar type - to aid
186
+   translations.
187
+2. Fix installation location of translation files.
188
+
189
+0.65.3
190
+------
191
+1. When not using button-like check/radio boxes, use view text as the
192
+   indicator colour.
193
+2. Fix slight tab glitches when using glow tab mouse over and square
194
+   tabs.
195
+3. Fix usage of custom menu text colours.
196
+4. Fix custom menu stripe colour.
197
+5. In config dialog - for gradient directions, use "Top to bottom" instead of
198
+   "Horizontal" and "Left to right" instead of "Vertical"
199
+6. Add support for translations of config dialogs.
200
+    Turkish translation by Necmettin Begiter
201
+
202
+0.65.2
203
+------
204
+1. Add option to draw list view lines in pre 0.65 style.
205
+
206
+0.65.1
207
+------
208
+1. Use a border width of 1 if gradienting popupmenus.
209
+2. When using darkened menu stripe use popupmenu background colour as the
210
+   base colour.
211
+3. Fix gradient menus when not using lighter popup menu backgrounds.
212
+4. Dont fill background of PE_PanelLineEdit
213
+5. When readining kicker's settings, and window colours, use the correct KDE home.
214
+6. Fix blank menus in Amarok when using gradient menu background.
215
+
216
+0.65.0
217
+------
218
+ 1. Add options to draw editable combos, and spin widgets, as edit fields with
219
+    embedded arrows - oxygen style.
220
+ 2. Add option to draw a light border around tab widgets, as opposed to 3d look.
221
+ 3. Added ability to specify scrollbar width (11 -> 31, default 15)
222
+ 4. Base slider dimensions off of scrollbar width, unless using triangular slider.
223
+ 5. Add option to have thinner buttons.
224
+ 6. Add option to specify gradient for background of popupmenus.
225
+ 7. Enable mouse-over for entry fields.
226
+ 8. For mouse-over and focus, use same colour for top and bottom inner parts
227
+    of entry fields.
228
+ 9. When using full focus with coloured mouse over, then mouse over takes
229
+    precedence.
230
+10. Alter default settings:
231
+        Place arrows of spin buttons, and editable combos, in the edit field.
232
+        Draw a light border around tab widget.
233
+        Thinner buttons.
234
+        Use soft gradient for active tab.
235
+        Use glow style highlight for tab mouse-over (this introduces gaps between tabs).
236
+11. Modified how button, and combo, heights are calculated - no longer set a
237
+    minimum height.
238
+12. Fix some re-draw errors with thin scrollbar grooves.
239
+13. Default to reading KDE4 settings if KDE_SESSION_VERSION is not set.
240
+    Pass -DQTC_DEFAULT_TO_KDE3=true to cmake to force this to default to KDE3.
241
+14. Call kde-config / kde4-config to ascertain users KDEHOME.
242
+15. Fix slight redraw error with glow style mouse over tabs.
243
+16. Remove box from listview arrows when configured to drawn listview lines.
244
+
245
+0.64.2
246
+------
247
+1. When using shaded combo buttons, use button colours for border.
248
+
249
+0.64.1
250
+------
251
+1. When using shaded combo buttons, use the combo splitter setting to
252
+   determine if there should be a border between the shaded and unshaded parts.
253
+2. Fix background of some QTextEdits.
254
+
255
+0.64.0
256
+------
257
+ 1. Add option to not draw border around popupmenus.
258
+ 2. Add option to unify spinbuttons.
259
+ 3. Add option to set sub-menu delay (default 100ms)
260
+ 4. Use equal top/bottom padding on popupmenu separators.
261
+ 5. Add option to colour arrow part of combobox.
262
+ 6. Draw resize grip as a darkend triangle.
263
+ 7. Add a 'thick coloured border' mouse over type.
264
+ 8. Allow to darken sliders.
265
+ 9. Add new default button indicator - darken.
266
+10. Fix mispainted spin widget entry field.
267
+11. Fix reading of KDE4 palette.
268
+12. Fix setting of check/radio shade.
269
+13. Fix storing of custom menu stripe colour.
270
+14. In config dialog, place '%'symbol on the right for the "popup menu background"
271
+    setting.
272
+15. Fix kaffeine's slider benig completely filled at start of song.
273
+16. Fix LineEdit in qtconfig.
274
+17. Under KDE4 (KDE_SESSION_VERSION>=4), default hover/focus colours to the
275
+    KDE4 defaults.
276
+
277
+0.63.0
278
+------
279
+ 1. Add '3dfull' to gradient border options. This forces the
280
+    dark, as well as the light, portion to be drawn.
281
+ 2. Use a lighter shade for the dark portion of gradient border.
282
+ 3. Flat dot for radio buttons.
283
+ 4. Option to use button colour for listview headers.
284
+ 5. Use KDE4 colours for focus and mouse-over.
285
+ 6. Removal of background focus option.
286
+ 7. Softer colouration of selected tab.
287
+ 8. Tab mouse over options; top (as before), below, or glow.
288
+ 9. Modified defaults:
289
+     Tab mouse-over highlight drawn at the bottom
290
+     Plain slider style
291
+     Align titlebars text in center
292
+10. Add appearance setting for background of flat scrollbar buttons.
293
+11. Add HCY colour space.
294
+12. Use tint and mix colour routines from KDE4's KColourUtils.
295
+13. Remove QtCurve's 'inactiveHighlight' option, and use KDE4s setting
296
+    instead.
297
+14. Add option to specify appearance setting of filler part of sliders.
298
+15. Increase number of custom gradients - now matches number of gradient
299
+    config items.
300
+16. When using glow style mouse over, use mouse over colour for arrows.
301
+17. Option to use a thinner groove for scrollbars (only when using flat, or no, buttons).
302
+18. Option to only colour sliders on mouse over.
303
+19. Option to round all tabs.
304
+20. Add option to specify menu stripe colour.
305
+21. Update gradient preview when change colour space.
306
+22. Remove 'Custom sunken gradient' setting, as this was not
307
+    actually used.
308
+23. Better handling of 'full centered' titlebar texts when
309
+    window size is small.
310
+24. Fix scrolbar sliders appearing rounded when round=none, sliders
311
+    are shaded, and flat scrollbar buttons.
312
+25. Fix faded menuitems when not rounding.
313
+26. Make popup menu titles more KDE4-like.
314
+27. Fix use of base colour in disabled listviews. (Fixes bug introduced in 0.62.0)
315
+
316
+0.62.7
317
+------
318
+1. Show 'extra' as the default round setting in the config UI, as this is
319
+   actually the default. Note, that KDE3 does not support this and will use
320
+   'full' instead.
321
+
322
+0.62.6
323
+------
324
+1. Allow ability to specify if titlebar center alignment is for the full window
325
+   width, or just the text area.
326
+   
327
+0.62.5
328
+------
329
+1. Use gradient for filled slider - unless appearance is flat/raised.
330
+2. Remove menubar item size adjust code when toolbar borders are set - not
331
+   needed for KDE3, as it has padding anyway.
332
+3. Don't highlight slider groove on mouse-over.
333
+4. Fix coloured bottom tabs.
334
+5. Fix faded menuitems when not lightening popupmenus.
335
+
336
+0.62.4
337
+------
338
+1. When drawing filled slider groove, use fill colour for border as well.
339
+2. Better positioning of V arrows on secondary scrollbar buttons.
340
+
341
+0.62.3
342
+------
343
+1. Fix misdrawing of filled slider groove when slider is at 0.
344
+2. Use correct appearance setting for slider groove.
345
+3. Fix potentional palette issues if Qt3 and KDE3 have difference palettes.
346
+4. Override QStyle::drawItem to remove etched disabled text, as opposed to
347
+   just setting GUIStyle styleHint. This fixes the 'click on menubaritem' to
348
+   close menu issue.
349
+5. When menubars have a border, adjust the menubar items accordingly.
350
+6. When filling the used part of a slider groove, use the slider colour 
351
+   if set, otherwise use the highlight colour.
352
+
353
+0.62.2
354
+------
355
+1. Fix crash when coloured mouse over is set to none, and focus is set to full.
356
+2. Make focus full like KDE4/Gtk2
357
+3. Fix some issues gradient issues (tabs and menuitems).
358
+
359
+0.62.1
360
+------
361
+1. Use highlight colour for unselected focused view items.
362
+2. Fix saving/reading of custom shades.
363
+3. Fix striped progress.
364
+4. Fix background of disabled spin widgets.
365
+
366
+0.62.0
367
+------
368
+ 1. Reduce gradient code complexity - makes predefined gradients
369
+    work in the same vein as custom gradients.
370
+ 2. Add scrollbar/slider groove and 'sunken' appearance options.
371
+ 3. Added new soft and harsh gradients.
372
+ 4. Change defaults:
373
+        Soft gradient
374
+        Fade menuitems
375
+        Don't use highlight for menu.
376
+        Default highlight set to 3%
377
+        Toolbar separators set to sunken
378
+        Flat menubar appearance
379
+        Button like check/radios
380
+        Supply, and use, predefined custom shades
381
+        Plain progress
382
+        Don't highlight active tab
383
+        Sunken scrollviews
384
+        Sunken appearance set to soft
385
+        Line focus
386
+        Set custom appearances for titlebars
387
+ 5. Allow all bar flat and raised tabs to bol coloured.
388
+ 6. Only save appearance settings if different from default.
389
+ 7. If a gradient does not define the values for positions 0 and 100, then add these.
390
+ 8. Better colouring of selected tab.
391
+ 9. Added new focus options - full and line.
392
+10. Add new round options - extra and max.
393
+11. Don't etch disabled items.
394
+12. Use text colour for focus indicator in tree/list/etc views.
395
+13. When specifying custom gradients, add the pssibility to have no
396
+    internal border - options are now none, light, 3d
397
+14. Only apply plastik style mouse-over scrollbars and sliders when
398
+    plastik is set as the mouse-over style.
399
+15. Add option to specify titlebar text alignment.
400
+16. When setting palette, also set link and link visited colours.
401
+
402
+0.61.4
403
+------
404
+1. Fix gradient of faded menuitems when not using lighter background.
405
+2. Disable usage of group box lines - has too many issues.
406
+
407
+0.61.3
408
+------
409
+1. Fix settings for sliderThumbs, handles, toolbarSeparators, and splitters.
410
+2. Disable 'group box line' for ksysguard.
411
+
412
+0.61.2
413
+------
414
+1. Fix setting of options if no qtcurvestylerc is found!
415
+2. Fix border of tabs.
416
+
417
+0.61.1
418
+------
419
+1. Fix setting of default style. Fixes odd behaviour of config dialog!
420
+2. Fix position of dark part of sunken lines.
421
+3. Improve KDE dock widget titles.
422
+4. Read in custom gradients and shades from any system config file.
423
+
424
+0.61
425
+----
426
+1. Only draw coloured border for moused-over items if they are enabled!
427
+2. Add option to draw line after frameless groupbox title.
428
+3. Dont darken background of dock widget titlebars, just draw a line underneath.
429
+4. Add 'none' to toolbar handles and splitters style.
430
+5. Change defaults:
431
+        Button effect: Shadow
432
+        Mouse over: Glow
433
+        Default button indicator: Glow
434
+        V arrows
435
+        Flat toolbars
436
+        Use highlight colour for focus
437
+        Flat scrollbar buttons
438
+        No combo line
439
+        Sunken toolbar handles
440
+        Only lighten popupmenus by 2%
441
+        Flat active tab
442
+        Don't shade sliders
443
+        Don't darken menubars
444
+        Use darkened background for progressbars
445
+6. Allow to darken popup menu background.
446
+
447
+0.60
448
+----
449
+ 1. Add more safety checks for destruction of hover widgets.
450
+ 2. New focus rect options - standard, highlight, background.
451
+ 3. Add the ability to specify popup menu light factor.
452
+ 4. Add option to use darkened background colour for menuitem selection.
453
+ 5. Add 'fade' to menuitem appearance.
454
+ 6. Option to have flat scrollbar buttons.
455
+ 7. New slider styles - plain rotated, and round rotated.
456
+ 8. Increase size of busy progressbar.
457
+ 9. Draw border around filled progress.
458
+10. Option to have button-like checks/radios.
459
+11. Use base for light part of lineedit border, and background for scrollview.
460
+12. Nicer 'V' arrows.
461
+13. Add option to specify appearance of inactive titlebars.
462
+14. Round internal corners of plain coloured mouse over effect.
463
+15. Remove reading of Qt3 palette - this 'hack' only worked for pure Qt apps.
464
+
465
+0.59.5
466
+------
467
+1. In config dialog, rename the 'Fill' progressbar option to 'No border',
468
+   and place it on the 'Bar' line.
469
+
470
+0.59.4
471
+------
472
+1. Left align dock widget titles - more KDE4 like. (Right align for RTL)
473
+2. Dont activate menubar when Alt key is pressed alone - matches Gtk.
474
+
475
+0.59.3
476
+------
477
+1. Fix background drawng of sliders on toolbars (such as in Kaffeine), when
478
+   coloured mouse over is disabled and highlight factor is set to 1.0.
479
+
480
+0.59.2
481
+------
482
+1. Also check in share/kde4/apps/kstyle/themes for qtc_*.themerc files.
483
+
484
+0.59.1
485
+------
486
+1. Fix appearance of shiny glass defult buttons.
487
+2. Give glass default buttons a light border.
488
+
489
+0.59
490
+----
491
+ 1. When drawing gray focus rect, draw only slightly rounded.
492
+ 2. Etch/shadow effect now applied to widget sides as well as
493
+    top/bottom.
494
+ 3. Add etching to checks, radios, slider grooves, and progressbars.
495
+ 4. Option to have progress fill groove - default to true.
496
+ 5. Option to display non-editable combo splitter - defaults to true.
497
+ 6. Dont do coloured mouse over for mdi buttons, dock widget buttons,
498
+    or toolbar buttons.
499
+ 7. Better coloured mouse over for checks and radios.
500
+ 8. Don't use background colour for non-coloured mouse over of
501
+    check/radios if highlighting text backgroud.
502
+ 9. When colouring menubars, correctly draw menubar text colour
503
+    of inactive windows.
504
+10. Fix potential crash when using pixmap cache.
505
+11. Fix tab coloured mouse-over when not rounded.
506
+12. Implement size grip.
507
+13. New mouse over effect - glow. Only applicable if etching or shadowing.
508
+14. New default button indicator - glow. Only applicable if etching
509
+    or shadowing.
510
+15. Allow up to 10 custom defined gradients.
511
+16. Allow custom shades to be specified.
512
+17. Add option to specify active tab appearance.
513
+18. Don't do coloured mouse-overs for sunken buttons.
514
+19. Apply 'border menuitems' only to popup menus.
515
+20. If lightening popup menus, and not bordering menuitems, then remove 1
516
+    pix border arund popup menus.
517
+21. Change default to not border menuitems.
518
+22. Re-arrange config GUI.
519
+23. Remove some frames from kate.
520
+24. Scrolview options: allow sunken, highlight, and square.
521
+25. Option to specify progressbar groove appearance.
522
+
523
+0.58
524
+----
525
+1. Add a config option for menu stripe appearance - defaults to gradient.
526
+2. Add a config option for selection appearance - defaults to flat. KDE4 (Qt4.4) & Gtk2 only.
527
+3. Use background colour for disabled scrollbar buttons.
528
+4. Remove some frames from systemsettings.
529
+5. Don't draw menu separators through stripe.
530
+6. Draw menu stripe on the right for RTL languages.
531
+7. Supply a QtCurve colours file.
532
+8. Lighter menustripe when not lightening menus.
533
+9. Lighter menu separators.
534
+
535
+0.57.1
536
+------
537
+1. Fix for frameless groupboxes krusader's config dialog.
538
+2. Draw QDockWindowResize handles like QSplitters.
539
+3. Make dock windows more KDE4 like.
540
+4. Don't draw frames around kicker buttons.
541
+5. Fix kicker menu stripe.
542
+
543
+0.57
544
+----
545
+1. Modify defaults:
546
+     Turn off shade menubar only of active window
547
+     Set default button indicator to tint
548
+2. Re-added option to highlight background of check/radio text on mouseover.
549
+
550
+0.56.3
551
+------
552
+1. Don't set sliders to flat just because appearance is flat.
553
+
554
+0.56.2
555
+------
556
+1. Use case-insesitive string compares when checking Qt and KDE config files.
557
+2. Fix for (sometimes) ever-boldening frameless groupbox titles.
558
+3. Don't colour non-maxed sliders of disabled scrollviews.
559
+
560
+0.56.1
561
+------
562
+1. Fix crash when using corner default button indicator and no coloured
563
+   mouse over.
564
+
565
+0.56
566
+----
567
+1. Change default settings:
568
+        Dont animate progressbars
569
+        Frameless groupboxes
570
+        Gradient KDE4 window titlebars
571
+2. Correctly position corner indicator.
572
+3. Use mouse over colours for corner indicator.
573
+4. Add option to control window titlebar appearance - default to
574
+   gradient.
575
+5. Read in KWin's pallete, and use to colour MDI windows.
576
+6. Draw own icons for titlebar buttons - more KDE4 like.
577
+7. Option to tint the default button colour.
578
+8. Option to draw a stripe on the left hand side of popupmenus.
579
+9. Only mark default button if it is enabled.
580
+
581
+0.55.3
582
+------
583
+1. Style "Ideal::Button"s on "Ideal::ButtonBar"s as per KMultiTabBar tabs.
584
+   (Makes KTorrent's tab buttons look like Kate's sidebar buttons)
585
+2. Read KDE4's contrast setting if running under KDE4.
586
+
1 587
 0.55.2
2 588
 ------
3 589
 1. Add ability to import qtc_*.themerc settings into config dialog.
@@ -23,7 +609,7 @@
23 609
  6. Optional diagonal progressbar sripes.
24 610
  7. Use alternating dark/light for dashed toolbar handles.
25 611
  8. New 'split' style gradient.
26
- 9. Option to specift slider style: plain, round (only when appearance=round),
612
+ 9. Option to specify slider style: plain, round (only when appearance=round),
27 613
     and triangular (plastik-ish)
28 614
 10. Modify default style: flat splitter lines, flat slider thumbs, no
29 615
     toolbar separators, triangular slider, diagonal progressbar stripes.
@@ -113,7 +699,7 @@
113 699
     light colour schemes.
114 700
  9. Dont draw sunken panel around checked menuitems.
115 701
 10. Fix karm (and others?) statusbar icon.
116
-11. Fix for radio buttons in apps where QApplication::NormalColor!=QApplication::colorSpec()
702
+11. Fix for radio buttons in apps where QApplication::NormalColour!=QApplication::colourSpec()
117 703
     (e.g. designer)
118 704
 
119 705
 0.50
@@ -221,7 +807,7 @@
221 807
                             follows general appearance.
222 808
         Tab appearance - set from general appearace.
223 809
         Draw dock window titles - never.
224
-        Colored sidebar buttons - always.
810
+        Coloured sidebar buttons - always.
225 811
  3. Changed appearance of check/radios - now filled with base
226 812
     colour.
227 813
  4. Etch look for button, combos, line edits, and spin boxes.
@@ -294,7 +880,7 @@
294 880
 0.45
295 881
 ----
296 882
 1. Option to control whether highlighted items should use
297
-   the highlight color in inactive windows.
883
+   the highlight colour in inactive windows.
298 884
 2. Option to control whether menubars should be shaded in
299 885
    inactive windows.
300 886
 3. Fix loading / selection of options.
@@ -334,7 +920,7 @@
334 920
     next, or none.
335 921
  9. Slightly better radios in khtml.
336 922
 10. Slightly smaller buttons.
337
-11. Option to have colored side-bar buttons - e.g. the buttons on the
923
+11. Option to have coloured side-bar buttons - e.g. the buttons on the
338 924
     edge of kate's windows.
339 925
 12. Improvement to Opera's MDI buttons in menubar area. Not
340 926
     perfect, but better.
@@ -343,7 +929,7 @@
343 929
 
344 930
 0.43.2
345 931
 ------
346
-1. Fix the config dialog to notice changes in menu text color settings.
932
+1. Fix the config dialog to notice changes in menu text colour settings.
347 933
 2. Dont draw menubar text twice!
348 934
 
349 935
 0.43.1
@@ -359,7 +945,7 @@
359 945
  5. Really fix KDE 3.5.5 taskbar flicker...
360 946
  6. Slight improvement to combobox when right-to-left
361 947
  7. Seperate specification of scollbar slider, and range slider, settings.
362
- 8. Option to specify menubar text colors.
948
+ 8. Option to specify menubar text colours.
363 949
  9. New 'flat' appearance.
364 950
 10. Options to use a coloured border for mouse-over.
365 951
 11. Nicer looking check and radio buttons - using pixmaps.
@@ -508,7 +1094,7 @@
508 1094
  7. KDE: Use dots also for general handles - more consistent.
509 1095
  8. KDE: Theme dock window handles - i.e. no more text.
510 1096
  9. KDE: Fix/hack look of MDI window buttons.
511
-10. GTK2: Hackish fix for firefox and KDE's "apply colors to non-KDE apps" 
1097
+10. GTK2: Hackish fix for firefox and KDE's "apply colours to non-KDE apps"
512 1098
           setting.
513 1099
 11. GTK: Fix for tear of menu background.
514 1100
 
@@ -569,7 +1155,7 @@
569 1155
  6. ALL: New gradient style: bevelled - gradient top/bot, and plain in the
570 1156
          middle. Affects listview headers, buttons, and combos.
571 1157
  7. ALL: Allow setting of listview appearance.
572
- 8. ALL: Allow setting of listview header color - background, button, or
1158
+ 8. ALL: Allow setting of listview header colour - background, button, or
573 1159
         custom.
574 1160
  9. ALL: Option to only round top of selected menubar items.
575 1161
 10. ALL: New toolbar handle style: dashes
@@ -605,8 +1191,8 @@
605 1191
          wont happen in Gtk2 apps until they are restarted.
606 1192
 4. GTK: Dont draw dividers in listview headers, unless header is >10 pixels
607 1193
 5. ALL: Gradient non-selected tabs as well as selected.
608
-6. GTK2: Also look in "hicolor" for icons. Search order will be:
609
-             <chosen theme>, crystalsvg, hicolor
1194
+6. GTK2: Also look in "hicolour" for icons. Search order will be:
1195
+             <chosen theme>, crystalsvg, hicolour
610 1196
 7. GTK2: Map gt-add and gtk-remove stock icons
611 1197
 
612 1198
 0.30
@@ -691,7 +1277,7 @@
691 1277
 11. ALL: Fix for tab-bar highlight when using light selection colours.
692 1278
 12. KDE: Fix for non-bordered gradient radio buttons.
693 1279
 13. GTK: More KDE like menu sizing.
694
-14. KDE: Fix/hack for OO.o2.x menubars. If the selected menu color is toodark,
1280
+14. KDE: Fix/hack for OO.o2.x menubars. If the selected menu colour is toodark,
695 1281
          then lighten. This is required as OO.o always draws the menu text
696 1282
          dark! It seems to have a check for plastik style though, and then
697 1283
          it draws selected popup menu items white.

+ 33
- 3
README View File

@@ -8,6 +8,27 @@ To build and install:
8 8
 4. make
9 9
 5. make install
10 10
 
11
+The following options may be supplied to cmake:
12
+
13
+    -DQTC_QT_ONLY=true
14
+        Build style as a pure Qt3 style. NOTE: May also need to set QTDIR *before*
15
+        calling cmake.
16
+        This is the default as from QtCurve 1.0.0
17
+
18
+    -DQTC_BUILD_CONFIG_MODULE=true
19
+        Build KDE3 config module. NOTE: This is no longer maintained.
20
+
21
+    -DQTC_DEFAULT_TO_KDE3=true
22
+       If the KDE_SESSION_VERSION is not set, then assume we are running
23
+       under KDE3. If this cmake option is not set, then KDE4 is assumed.
24
+
25
+    -DQTC_STYLE_SUPPORT=true
26
+       Support QtCurve style files. These are stored as
27
+       <kde prefix>/share/apps/kstyle/themes/qtc_<stylename>.themerc
28
+
29
+    -DQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT=true
30
+        Enable support for the 'fixParentlessDialogs' config option. NOTE: This is
31
+        known to break some applications - hence is disabled by default!
11 32
 
12 33
 Themes
13 34
 ------
@@ -36,10 +57,20 @@ or copy to <kde install prefix>/share/apps/kstyle/themes/ (usually
36 57
 
37 58
 When KDE's style panel is restarted, your new theme should appear in the list.
38 59
 
60
+NOTE: As of QtCurve 1.0.0 style support has been disabled by default, and you will
61
+need to explicitly enable it via QTC_STYLE_SUPPORT
62
+
63
+Testing
64
+-------
65
+As of v1.2.1, QtCurve can be forced to read its settings from an alternate config
66
+file via the QTCURVE_CONFIG_FILE environment variable. This is only really useful
67
+for testing alternate config settings without changing the users current settings.
68
+Usage:
69
+
70
+    QTCURVE_CONFIG_FILE=~/testfile kcalc
39 71
 
40 72
 Creating Distribution Packages
41 73
 ------------------------------
42
-
43 74
 CMake (as of v2.4.x) does not support building rpm or deb packages, and a simple
44 75
 checkinstall will not work. CMake 2.6 should support rpm and deb packages, but until
45 76
 then I have supplied a simple shell script to build a package with checkinstall.
@@ -52,7 +83,6 @@ To use this:
52 83
 
53 84
 pixmaps.h
54 85
 ---------
55
-
56 86
 To regenerate this, run the following:
57 87
 
58
-    qembed radio_frame.png radio_light.png radio_on.png check_on.png slider.png slider_light.png slider_v.png slider_light_v.png check_x_on.png > pixmaps.h
88
+    qembed radio_frame.png radio_inner.png radio_light.png radio_on.png radio_on_small.png check_on.png slider.png slider_light.png check_x_on.png dot.png > pixmaps.h

+ 27
- 0
cmake/QtCurveQt3.cmake View File

@@ -0,0 +1,27 @@
1
+FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
2
+FIND_PATH(QT_PLUGINS_DIR imageformats
3
+  $ENV{QTDIR}/plugins
4
+  ${GLOB_PATHS_BIN}
5
+  /usr/local/qt/plugins
6
+  /usr/lib/qt/plugins
7
+  /usr/lib/qt3/plugins
8
+  /usr/share/qt3/plugins
9
+  )
10
+
11
+MACRO(QTCURVE_QT_WRAP_CPP outfiles )
12
+  # get include dirs
13
+  GET_DIRECTORY_PROPERTY(moc_includes_tmp INCLUDE_DIRECTORIES)
14
+  SET(moc_includes)
15
+
16
+  FOREACH(it ${ARGN})
17
+    GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
18
+    GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
19
+    SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfilename}.moc)
20
+    ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
21
+        COMMAND ${QT_MOC_EXECUTABLE}
22
+        ARGS -o ${outfile} ${infile}
23
+        DEPENDS ${infile})
24
+    SET(${outfiles} ${${outfiles}} ${outfile})
25
+  ENDFOREACH(it)
26
+
27
+ENDMACRO(QTCURVE_QT_WRAP_CPP)

+ 1
- 0
colors/CMakeLists.txt View File

@@ -0,0 +1 @@
1
+install(FILES QtCurve.kcsrc DESTINATION ${DATA_INSTALL_DIR}/kdisplay/color-schemes)

+ 27
- 0
colors/QtCurve.kcsrc View File

@@ -0,0 +1,27 @@
1
+[Color Scheme]
2
+Name=QtCurve
3
+activeBackground=169,195,228
4
+activeBlend=169,195,228
5
+activeForeground=255,255,255
6
+activeTitleBtnBg=220,220,220
7
+alternateBackground=240,240,240
8
+background=239,236,231
9
+buttonBackground=239,236,231
10
+buttonForeground=0,0,0
11
+contrast=7
12
+foreground=0,0,0
13
+frame=238,238,230
14
+handle=238,238,230
15
+inactiveBackground=244,244,244
16
+inactiveBlend=244,244,244
17
+inactiveForeground=20,19,18
18
+inactiveFrame=238,238,230
19
+inactiveHandle=238,238,230
20
+inactiveTitleBtnBg=220,220,220
21
+linkColor=0,0,192
22
+selectBackground=69,126,224
23
+selectForeground=255,255,255
24
+shadeSortColumn=true
25
+visitedLinkColor=128,0,128
26
+windowBackground=224,232,238
27
+windowForeground=0,0,0

+ 305
- 0
common/colorutils.c View File

@@ -0,0 +1,305 @@
1
+/*
2
+ This file is taken from kcolorspaces.cpp and kcolorutils.cpp from kdelibs
3
+The code has been modified to work with QColor (Qt3 &Qt4) and GdkColor
4
+*/
5
+
6
+/* This file is part of the KDE project
7
+ * Copyright (C) 2007 Matthew Woehlke <mw_triad@users.sourceforge.net>
8
+ * Copyright (C) 2007 Olaf Schmidt <ojschmidt@kde.org>
9
+ *
10
+ * This library is free software; you can redistribute it and/or
11
+ * modify it under the terms of the GNU Library General Public
12
+ * License as published by the Free Software Foundation; either
13
+ * version 2 of the License, or (at your option) any later version.
14
+ *
15
+ * This library is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
+ * Library General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Library General Public License
21
+ * along with this library; see the file COPYING.LIB.  If not, write to
22
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23
+ * Boston, MA 02110-1301, USA.
24
+ */
25
+
26
+#include <math.h>
27
+
28
+#ifdef __cplusplus
29
+#if defined QT_VERSION && (QT_VERSION >= 0x040000)
30
+#define FLOAT_COLOR(VAL, COL) (VAL).COL##F()
31
+#define TO_COLOR(R, G, B) QColor::fromRgbF(R, G, B)
32
+#else
33
+#define FLOAT_COLOR(VAL, COL) ((double)(((VAL).COL()*1.0)/255.0))
34
+#define TO_COLOR(R, G, B) QColor(limit(R*255.0), limit(G*255.0), limit(B*255.0))
35
+#endif
36
+#else
37
+#define inline
38
+#define FLOAT_COLOR(VAL, COL) ((double)(((VAL).COL*1.0)/65535.0))
39
+static GdkColor qtcGdkColor(double r, double g, double b)
40
+{
41
+    GdkColor col;
42
+
43
+    col.red=limit(r*65535);
44
+    col.green=limit(g*65535);
45
+    col.blue=limit(b*65535);
46
+
47
+    return col;
48
+}
49
+
50
+#define TO_COLOR(R, G, B) qtcGdkColor(R, G, B)
51
+#endif
52
+
53
+static inline double ColorUtils_normalize(double a)
54
+{
55
+    return (a < 1.0 ? (a > 0.0 ? a : 0.0) : 1.0);
56
+}
57
+
58
+static inline double ColorUtils_wrap(double a)
59
+{
60
+    static double d = 1.0;
61
+    double r = fmod(a, d);
62
+    return (r < 0.0 ? d + r : (r > 0.0 ? r : 0.0));
63
+}
64
+
65
+#define HCY_REC 709 // use 709 for now
66
+#if   HCY_REC == 601
67
+static const double yc[3] = { 0.299, 0.587, 0.114 };
68
+#elif HCY_REC == 709
69
+static const double yc[3] = {0.2126, 0.7152, 0.0722};
70
+#else // use Qt values
71
+static const double yc[3] = { 0.34375, 0.5, 0.15625 };
72
+#endif
73
+
74
+static inline double ColorUtils_HCY_gamma(double n)
75
+{
76
+    return pow(ColorUtils_normalize(n), 2.2);
77
+}
78
+
79
+static inline double ColorUtils_HCY_igamma(double n)
80
+{
81
+    return pow(ColorUtils_normalize(n), 1.0/2.2);
82
+}
83
+
84
+static inline double ColorUtils_HCY_lumag(double r, double g, double b)
85
+{
86
+    return r*yc[0] + g*yc[1] + b*yc[2];
87
+}
88
+
89
+typedef struct
90
+{
91
+    double h, c, y;
92
+} ColorUtils_HCY;
93
+
94
+// static ColorUtils_HCY ColorUtils_HCY_fromValues(double h_, double c_, double y_/*, double a_*/)
95
+// {
96
+//     h = h_;
97
+//     c = c_;
98
+//     y = y_;
99
+// //    a = a_;
100
+// }
101
+
102
+static ColorUtils_HCY ColorUtils_HCY_fromColor(const color *color)
103
+{
104
+    ColorUtils_HCY hcy;
105
+    double r = ColorUtils_HCY_gamma(FLOAT_COLOR(*color, red));
106
+    double g = ColorUtils_HCY_gamma(FLOAT_COLOR(*color, green));
107
+    double b = ColorUtils_HCY_gamma(FLOAT_COLOR(*color, blue));
108
+//     a = color.alphaF();
109
+
110
+    // luma component
111
+    hcy.y = ColorUtils_HCY_lumag(r, g, b);
112
+
113
+    // hue component
114
+    double p = MAX(MAX(r, g), b);
115
+    double n = MIN(MIN(r, g), b);
116
+    double d = 6.0 * (p - n);
117
+    if (n == p)
118
+        hcy.h = 0.0;
119
+    else if (r == p)
120
+        hcy.h = ((g - b) / d);
121
+    else if (g == p)
122
+        hcy.h = ((b - r) / d) + (1.0 / 3.0);
123
+    else
124
+        hcy.h = ((r - g) / d) + (2.0 / 3.0);
125
+
126
+    // chroma component
127
+    if (0.0 == hcy.y || 1.0 == hcy.y)
128
+        hcy.c = 0.0;
129
+    else
130
+        hcy.c = MAX( (hcy.y - n) / hcy.y, (p - hcy.y) / (1 - hcy.y) );
131
+    return hcy;
132
+}
133
+
134
+static color ColorUtils_HCY_toColor(ColorUtils_HCY *hcy)
135
+{
136
+    // start with sane component values
137
+    double _h = ColorUtils_wrap(hcy->h);
138
+    double _c = ColorUtils_normalize(hcy->c);
139
+    double _y = ColorUtils_normalize(hcy->y);
140
+
141
+    // calculate some needed variables
142
+    double _hs = _h * 6.0, th, tm;
143
+    if (_hs < 1.0) {
144
+        th = _hs;
145
+        tm = yc[0] + yc[1] * th;
146
+    }
147
+    else if (_hs < 2.0) {
148
+        th = 2.0 - _hs;
149
+        tm = yc[1] + yc[0] * th;
150
+    }
151
+    else if (_hs < 3.0) {
152
+        th = _hs - 2.0;
153
+        tm = yc[1] + yc[2] * th;
154
+    }
155
+    else if (_hs < 4.0) {
156
+        th = 4.0 - _hs;
157
+        tm = yc[2] + yc[1] * th;
158
+    }
159
+    else if (_hs < 5.0) {
160
+        th = _hs - 4.0;
161
+        tm = yc[2] + yc[0] * th;
162
+    }
163
+    else {
164
+        th = 6.0 - _hs;
165
+        tm = yc[0] + yc[2] * th;
166
+    }
167
+
168
+    // calculate RGB channels in sorted order
169
+    double tn, to, tp;
170
+    if (tm >= _y) {
171
+        tp = _y + _y * _c * (1.0 - tm) / tm;
172
+        to = _y + _y * _c * (th - tm) / tm;
173
+        tn = _y - (_y * _c);
174
+    }
175
+    else {
176
+        tp = _y + (1.0 - _y) * _c;
177
+        to = _y + (1.0 - _y) * _c * (th - tm) / (1.0 - tm);
178
+        tn = _y - (1.0 - _y) * _c * tm / (1.0 - tm);
179
+    }
180
+
181
+    // return RGB channels in appropriate order
182
+    if (_hs < 1.0)
183
+        return TO_COLOR(ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tn));
184
+    else if (_hs < 2.0)
185
+        return TO_COLOR(ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(tn));
186
+    else if (_hs < 3.0)
187
+        return TO_COLOR(ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(to));
188
+    else if (_hs < 4.0)
189
+        return TO_COLOR(ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tp));
190
+    else if (_hs < 5.0)
191
+        return TO_COLOR(ColorUtils_HCY_igamma(to), ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(tp));
192
+    else
193
+        return TO_COLOR(ColorUtils_HCY_igamma(tp), ColorUtils_HCY_igamma(tn), ColorUtils_HCY_igamma(to));
194
+}
195
+
196
+// #ifndef __cplusplus
197
+static inline double ColorUtils_HCY_luma(const color *color)
198
+{
199
+    return ColorUtils_HCY_lumag(ColorUtils_HCY_gamma(FLOAT_COLOR(*color, red)),
200
+                                ColorUtils_HCY_gamma(FLOAT_COLOR(*color, green)),
201
+                                ColorUtils_HCY_gamma(FLOAT_COLOR(*color, blue)));
202
+}
203
+
204
+static inline double ColorUtils_mixQreal(double a, double b, double bias)
205
+{
206
+    return a + (b - a) * bias;
207
+}
208
+
209
+static inline double ColorUtils_luma(const color *color)
210
+{
211
+    return ColorUtils_HCY_luma(color);
212
+}
213
+
214
+static double ColorUtils_contrastRatio(const color *c1, const color *c2)
215
+{
216
+    double y1 = ColorUtils_luma(c1), y2 = ColorUtils_luma(c2);
217
+    if (y1 > y2)
218
+        return (y1 + 0.05) / (y2 + 0.05);
219
+    else
220
+        return (y2 + 0.05) / (y1 + 0.05);
221
+}
222
+
223
+static color ColorUtils_lighten(const color *color, double ky, double kc)
224
+{
225
+    ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
226
+
227
+    c.y = 1.0 - ColorUtils_normalize((1.0 - c.y) * (1.0 - ky));
228
+    c.c = 1.0 - ColorUtils_normalize((1.0 - c.c) * kc);
229
+    return ColorUtils_HCY_toColor(&c);
230
+}
231
+
232
+static color ColorUtils_darken(const color *color, double ky, double kc)
233
+{
234
+    ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
235
+    c.y = ColorUtils_normalize(c.y * (1.0 - ky));
236
+    c.c = ColorUtils_normalize(c.c * kc);
237
+    return ColorUtils_HCY_toColor(&c);
238
+}
239
+
240
+static color ColorUtils_shade(const color *color, double ky, double kc)
241
+{
242
+    ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
243
+    c.y = ColorUtils_normalize(c.y + ky);
244
+    c.c = ColorUtils_normalize(c.c + kc);
245
+    return ColorUtils_HCY_toColor(&c);
246
+}
247
+
248
+static color ColorUtils_mix(const color *c1, const color *c2, double bias);
249
+
250
+static color ColorUtils_tintHelper(const color *base, const color *col, double amount)
251
+{
252
+    color          mixed=ColorUtils_mix(base, col, pow(amount, 0.3));
253
+    ColorUtils_HCY c=ColorUtils_HCY_fromColor(&mixed);
254
+    c.y = ColorUtils_mixQreal(ColorUtils_luma(base), c.y, amount);
255
+
256
+    return ColorUtils_HCY_toColor(&c);
257
+}
258
+
259
+static color ColorUtils_tint(const color *base, const color *col, double amount)
260
+{
261
+    if (amount <= 0.0) return *base;
262
+    if (amount >= 1.0) return *col;
263
+    if (isnan(amount)) return *base;
264
+
265
+    double ri = ColorUtils_contrastRatio(base, col);
266
+    double rg = 1.0 + ((ri + 1.0) * amount * amount * amount);
267
+    double u = 1.0, l = 0.0;
268
+    color result;
269
+    int i;
270
+    for (i = 12 ; i ; --i) {
271
+        double a = 0.5 * (l+u);
272
+        result = ColorUtils_tintHelper(base, col, a);
273
+        double ra = ColorUtils_contrastRatio(base, &result);
274
+        if (ra > rg)
275
+            u = a;
276
+        else
277
+            l = a;
278
+    }
279
+    return result;
280
+}
281
+
282
+static color ColorUtils_mix(const color *c1, const color *c2, double bias)
283
+{
284
+    if (bias <= 0.0) return *c1;
285
+    if (bias >= 1.0) return *c2;
286
+    if (isnan(bias)) return *c1;
287
+
288
+    {
289
+    double r = ColorUtils_mixQreal(FLOAT_COLOR(*c1, red),   FLOAT_COLOR(*c2, red),    bias);
290
+    double g = ColorUtils_mixQreal(FLOAT_COLOR(*c1, green), FLOAT_COLOR(*c2, green), bias);
291
+    double b = ColorUtils_mixQreal(FLOAT_COLOR(*c1, blue),  FLOAT_COLOR(*c2, blue),  bias);
292
+    /*double a = ColorUtils_mixQreal(FLOAT_COLOR(*c1, alpha),   FLOAT_COLOR(*c2, alpha),   bias);*/
293
+
294
+    return TO_COLOR(r, g, b);
295
+    }
296
+}
297
+
298
+// #endif
299
+/* Added!!! */
300
+// static color ColorUtils_shade_qtc(const color *color, double k)
301
+// {
302
+//     ColorUtils_HCY c=ColorUtils_HCY_fromColor(color);
303
+//     c.y = ColorUtils_normalize(c.y * (k>1.0 ? (k*1.1) : (k<1.0 ? (k*0.9) : k)));
304
+//     return ColorUtils_HCY_toColor(&c);
305
+// }

+ 1409
- 317
common/common.h
File diff suppressed because it is too large
View File


+ 2439
- 317
common/config_file.c
File diff suppressed because it is too large
View File


BIN
common/dot.png View File


BIN
common/radio_inner.png View File


BIN
common/radio_on.png View File


BIN
common/radio_on_small.png View File


+ 6
- 0
config.h.cmake View File

@@ -4,4 +4,10 @@
4 4
 #define VERSION     "@QTCURVE_VERSION_FULL@"
5 5
 #define KDE3PREFIX  "@KDE3PREFIX@"
6 6
 #define KDE4PREFIX  "@KDE4PREFIX@"
7
+
8
+#cmakedefine QTC_QT_ONLY
9
+#cmakedefine QTC_DEFAULT_TO_KDE3
10
+#cmakedefine QTC_STYLE_SUPPORT
11
+#cmakedefine QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
12
+
7 13
 #endif

+ 7
- 2
config/CMakeLists.txt View File

@@ -1,7 +1,12 @@
1
-set(kstyle_qtcurve_config_PART_SRCS qtcurveconfig.cpp exportthemedialog.cpp)
1
+if (QTC_STYLE_SUPPORT)
2
+    set(kstyle_qtcurve_config_PART_SRCS qtcurveconfig.cpp exportthemedialog.cpp)
3
+else (QTC_STYLE_SUPPORT)
4
+    set(kstyle_qtcurve_config_PART_SRCS qtcurveconfig.cpp)
5
+endif (QTC_STYLE_SUPPORT)
6
+
2 7
 include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/common ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR})
3 8
 kde3_add_ui_files(kstyle_qtcurve_config_PART_SRCS qtcurveconfigbase.ui)
4 9
 kde3_add_kpart(kstyle_qtcurve_config ${kstyle_qtcurve_config_PART_SRCS})
5 10
 kde3_automoc(${kstyle_qtcurve_config_PART_SRCS})
6
-target_link_libraries(kstyle_qtcurve_config ${KDE3_KDEUI_LIBS} ${KDE3_KIO_LIBS} ${KDE3_KDECORE_LIBS} ${QT_QTGUI_LIBRARY})
11
+target_link_libraries(kstyle_qtcurve_config ${QT_AND_KDECORE_LIBS} kio kdeui)
7 12
 install(TARGETS kstyle_qtcurve_config DESTINATION ${KDE3_LIB_DIR}/kde3)

+ 3
- 3
config/exportthemedialog.cpp View File

@@ -1,5 +1,5 @@
1 1
 /*
2
-  QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk
2
+  QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
3 3
 
4 4
   ----
5 5
 
@@ -64,7 +64,7 @@ void CExportThemeDialog::slotOk()
64 64
         KMessageBox::error(this, i18n("Name is empty!"));
65 65
     else
66 66
     {
67
-        QString fileName(themeUrl->url()+"/"QTC_THEME_PREFIX+name+".themerc");
67
+        QString fileName(themeUrl->url()+"/"THEME_PREFIX+name+".themerc");
68 68
 
69 69
         KConfig cfg(fileName, false, false);
70 70
         bool    rv(!cfg.isReadOnly());
@@ -75,7 +75,7 @@ void CExportThemeDialog::slotOk()
75 75
             cfg.writeEntry("Name", themeName->text().stripWhiteSpace());
76 76
             cfg.writeEntry("Comment", themeComment->text());
77 77
             cfg.setGroup("KDE");
78
-            cfg.writeEntry("WidgetStyle", QTC_THEME_PREFIX+name);
78
+            cfg.writeEntry("WidgetStyle", THEME_PREFIX+name);
79 79
 
80 80
             rv=writeConfig(&cfg, opts, opts, true);
81 81
         }

+ 2
- 2
config/exportthemedialog.h View File

@@ -2,7 +2,7 @@
2 2
 #define __EXPORT_THEME_DIALOG_H__
3 3
 
4 4
 /*
5
-  QtCurve (C) Craig Drummond, 2007 Craig.Drummond@lycos.co.uk
5
+  QtCurve (C) Craig Drummond, 2007 - 2010 craig.p.drummond@gmail.com
6 6
 
7 7
   ----
8 8
 
@@ -22,7 +22,7 @@
22 22
 */
23 23
 
24 24
 #include <kdialogbase.h>
25
-#define QTC_CONFIG_DIALOG
25
+#define CONFIG_DIALOG
26 26
 #include "common.h"
27 27
 
28 28
 class KURLRequester;

+ 1235
- 102
config/qtcurveconfig.cpp
File diff suppressed because it is too large
View File


+ 72
- 5
config/qtcurveconfig.h View File

@@ -2,7 +2,7 @@
2 2
 #define __QTCURVECONFIG_H__
3 3
 
4 4
 /*
5
-  QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk
5
+  QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
6 6
 
7 7
   ----
8 8
 
@@ -21,15 +21,46 @@
21 21
   Boston, MA 02110-1301, USA.
22 22
 */
23 23
 
24
-#define QTC_COMMON_ONLY_COVERTERS
25
-#define QTC_CONFIG_DIALOG
24
+#define COMMON_FUNCTIONS
25
+#define CONFIG_DIALOG
26 26
 
27 27
 #include <qtcurveconfigbase.h>
28
+#include <qcombobox.h>
28 29
 #include <qmap.h>
29 30
 #include "common.h"
30 31
 
31 32
 class QPopupMenu;
33
+class QListViewItem;
34
+class KDoubleNumInput;
35
+#ifdef QTC_STYLE_SUPPORT
32 36
 class CExportThemeDialog;
37
+#endif
38
+class CStackItem;
39
+class QtCurveConfig;
40
+
41
+class CGradientPreview : public QWidget
42
+{
43
+    Q_OBJECT
44
+
45
+    public:
46
+
47
+    CGradientPreview(QtCurveConfig *c, QWidget *p);
48
+
49
+    QSize sizeHint() const;
50
+    QSize minimumSizeHint() const;
51
+    void paintEvent(QPaintEvent *);
52
+    void setGrad(const GradientStopCont &s);
53
+
54
+    public slots:
55
+
56
+    void setColor(const QColor &col);
57
+
58
+    private:
59
+
60
+    QtCurveConfig    *cfg;
61
+    QColor           color;
62
+    GradientStopCont stops;
63
+};
33 64
 
34 65
 class QtCurveConfig : public QtCurveConfigBase
35 66
 {
@@ -40,6 +71,8 @@ class QtCurveConfig : public QtCurveConfigBase
40 71
     QtCurveConfig(QWidget *parent);
41 72
     virtual ~QtCurveConfig();
42 73
 
74
+    EShading currentShading() const { return (EShading)shading->currentItem(); }
75
+
43 76
     signals:
44 77
 
45 78
     void changed(bool);
@@ -57,25 +90,53 @@ class QtCurveConfig : public QtCurveConfigBase
57 90
 
58 91
     void setStyle(int s);
59 92
     void updateChanged();
93
+    void focusChanged();
94
+    void roundChanged();
60 95
     void importStyle();
61 96
     void exportStyle();
62 97
     void exportTheme();
63 98
     void emboldenToggled();
64
-    void dbiChanged();
99
+    void defBtnIndicatorChanged();
100
+    void buttonEffectChanged();
101
+    void coloredMouseOverChanged();
65 102
     void shadeSlidersChanged();
66 103
     void shadeMenubarsChanged();
67 104
     void shadeCheckRadioChanged();
68 105
     void customMenuTextColorChanged();
106
+    void menuStripeChanged();
107
+    void comboBtnChanged();
108
+    void sortedLvChanged();
69 109
     void stripedProgressChanged();
70
-    void tabAppearanceChanged();
110
+    void activeTabAppearanceChanged();
111
+    void tabMoChanged();
112
+    void shadingChanged();
71 113
     void passwordCharClicked();
114
+    void unifySpinBtnsToggled();
115
+    void unifySpinToggled();
116
+    void sliderThumbChanged();
117
+    void sliderWidthChanged();
118
+    void changeStack();
119
+    void gradChanged(int i);
120
+    void itemChanged(QListViewItem *i, int col);
121
+    void addGradStop();
122
+    void removeGradStop();
123
+    void updateGradStop();
124
+    void stopSelected();
72 125
 
73 126
     private:
74 127
 
128
+    void setupStack();
129
+    void setupGradientsTab();
130
+    void setupShadesTab();
131
+    void setupShade(KDoubleNumInput *w, int shade);
132
+    void populateShades(const Options &opts);
133
+    bool diffShades(const Options &opts);
75 134
     void setPasswordChar(int ch);
76 135
     void loadStyle(const QString &file);
77 136
     void setOptions(Options &opts);
78 137
     void setWidgetOptions(const Options &opts);
138
+    int  getSquareFlags();
139
+    int  getWindowBorderFlags();
79 140
     bool settingsChanged();
80 141
 
81 142
     private:
@@ -83,7 +144,13 @@ class QtCurveConfig : public QtCurveConfigBase
83 144
     Options            currentStyle,
84 145
                        defaultStyle;
85 146
     QMap<int, QString> styles;
147
+#ifdef QTC_STYLE_SUPPORT
86 148
     CExportThemeDialog *exportDialog;
149
+#endif
150
+    CGradientPreview   *gradPreview;
151
+    GradientCont       customGradient;
152
+    KDoubleNumInput    *shadeVals[NUM_STD_SHADES];
153
+    CStackItem         *lastCategory;
87 154
 };
88 155
 
89 156
 #endif

+ 2360
- 580
config/qtcurveconfigbase.ui
File diff suppressed because it is too large
View File


+ 25
- 0
po/CMakeLists.txt View File

@@ -0,0 +1,25 @@
1
+find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
2
+ 
3
+if(NOT GETTEXT_MSGFMT_EXECUTABLE)
4
+    message("------\n"
5
+            "NOTE: msgfmt not found. Translations will *not* be installed\n"
6
+            "------\n")
7
+else(NOT GETTEXT_MSGFMT_EXECUTABLE)
8
+    set(catalogname qtcurve)
9
+    add_custom_target(translations ALL)
10
+    file(GLOB PO_FILES *.po)
11
+    foreach(_poFile ${PO_FILES})
12
+        get_filename_component(_poFileName ${_poFile} NAME)
13
+        string(REGEX REPLACE "^${catalogname}_?" "" _langCode ${_poFileName} )
14
+        string(REGEX REPLACE "\\.po$" "" _langCode ${_langCode} )
15
+        if(_langCode)
16
+            get_filename_component(_lang ${_poFile} NAME_WE)
17
+            set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
18
+            add_custom_command(TARGET translations
19
+                    COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --check -o ${_gmoFile} ${_poFile}
20
+                    DEPENDS ${_poFile})
21
+            install(FILES ${_gmoFile} DESTINATION  ${KDE3_LOCALE_PREFIX}/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo)
22
+        endif( _langCode )
23
+    endforeach(_poFile ${PO_FILES})
24
+endif(NOT GETTEXT_MSGFMT_EXECUTABLE)
25
+

+ 48
- 0
po/generate.sh View File

@@ -0,0 +1,48 @@
1
+#!/bin/sh
2
+BASEDIR=".." # root of translatable sources
3
+PROJECT="qtcurve" # project name
4
+BUGADDR="http://sourceforge.net/tracker/?group_id=50231&atid=459007" # MSGID-Bugs
5
+WDIR=`pwd` # working dir
6
+echo "Preparing rc files"
7
+cd ${BASEDIR}
8
+# we use simple sorting to make sure the lines do not jump around too much from system to system
9
+find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
10
+xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.cpp
11
+# additional string for KAboutData
12
+echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp
13
+echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp
14
+cd ${WDIR}
15
+echo "Done preparing rc files"
16
+
17
+echo "Extracting messages"
18
+cd ${BASEDIR}
19
+# see above on sorting
20
+find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list
21
+echo "rc.cpp" >> ${WDIR}/infiles.list
22
+cd ${WDIR}
23
+xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
24
+         -kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
25
+         --msgid-bugs-address="${BUGADDR}" \
26
+        --files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; }
27
+
28
+#Fix charset...
29
+cat ${PROJECT}.pot | sed s^charset=CHARSET^charset=UTF-8^g > ${PROJECT}.pot-new
30
+mv ${PROJECT}.pot-new ${PROJECT}.pot
31
+
32
+echo "Done extracting messages"
33
+
34
+echo "Merging translations"
35
+catalogs=`find . -name '*.po'`
36
+for cat in $catalogs; do
37
+    echo $cat
38
+    msgmerge -o $cat.new $cat ${PROJECT}.pot
39
+    mv $cat.new $cat
40
+done
41
+echo "Done merging translations"
42
+
43
+echo "Cleaning up"
44
+cd ${WDIR}
45
+rm rcfiles.list
46
+rm infiles.list
47
+rm rc.cpp
48
+echo "Done"

+ 1423
- 0
po/qtcurve.pot
File diff suppressed because it is too large
View File


+ 1509
- 0
po/tr.po
File diff suppressed because it is too large
View File


+ 22
- 10
style/CMakeLists.txt View File

@@ -1,10 +1,22 @@
1
-set(qtcurve_SRCS qtcurve.cpp pixmaps.h)
2
-add_definitions(-DQT_PLUGIN)
3
-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/common)
4
-link_directories(${KDE3_LIB_DIR})
5
-kde3_automoc(${qtcurve_SRCS})
6
-add_library(qtcurve SHARED ${qtcurve_SRCS})
7
-set_target_properties(qtcurve PROPERTIES PREFIX "")
8
-target_link_libraries(qtcurve ${QT_QTGUI_LIBRARY} kdefx)
9
-install(TARGETS qtcurve LIBRARY DESTINATION ${KDE3_LIB_DIR}/kde3/plugins/styles)
10
-install(FILES qtcurve.themerc DESTINATION ${KDE3PREFIX}/share/apps/kstyle/themes)
1
+if (NOT QTC_QT_ONLY)
2
+    set(qtcurve_SRCS qtcurve.cpp pixmaps.h)
3
+    add_definitions(-DQT_PLUGIN)
4
+    include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/common)
5
+    link_directories(${KDE3_LIB_DIR})
6
+    kde3_automoc(${qtcurve_SRCS})
7
+    add_library(qtcurve MODULE ${qtcurve_SRCS})
8
+    set_target_properties(qtcurve PROPERTIES PREFIX "")
9
+    target_link_libraries(qtcurve ${QT_LIBRARIES} kdefx)
10
+    install(TARGETS qtcurve LIBRARY DESTINATION ${KDE3_LIB_DIR}/kde3/plugins/styles)
11
+    install(FILES qtcurve.themerc DESTINATION ${KDE3PREFIX}/share/apps/kstyle/themes)
12
+else (NOT QTC_QT_ONLY)
13
+    set(qtcurve_MOC_CLASSES qtcurve.h qtc_kstyle.h)
14
+    QTCURVE_QT_WRAP_CPP(qtcurve_MOC_SRCS ${qtcurve_MOC_CLASSES})
15
+    set(qtcurve_SRCS qtcurve.cpp qtc_kstyle.cpp pixmaps.h)
16
+    include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${QT_INCLUDE_DIR}  ${CMAKE_SOURCE_DIR}/common)
17
+    add_library(qtcurve MODULE ${qtcurve_SRCS} ${qtcurve_MOC_SRCS})
18
+    set_target_properties(qtcurve PROPERTIES PREFIX "")
19
+    target_link_libraries(qtcurve ${QT_LIBRARIES})
20
+    install(TARGETS qtcurve LIBRARY DESTINATION ${QT_PLUGINS_DIR}/styles)
21
+endif (NOT QTC_QT_ONLY)
22
+

+ 90
- 77
style/pixmaps.h View File

@@ -35,6 +35,30 @@ static const unsigned char radio_frame_png_data[] = {
35 35
 };
36 36
 
37 37
 /* Generated by qembed */
38
+static const unsigned int  radio_inner_png_len = 276;
39
+static const unsigned char radio_inner_png_data[] = {
40
+    0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
41
+    0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x0d,0x08,0x04,0x00,0x00,
42
+    0x00,0xd8,0xe2,0x2c,0xf7,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
43
+    0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x02,0x62,0x4b,0x47,0x44,0x00,0x00,
44
+    0xaa,0x8d,0x23,0x32,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,
45
+    0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,
46
+    0x07,0x74,0x49,0x4d,0x45,0x07,0xd8,0x0c,0x0a,0x0c,0x30,0x0e,0xa9,0x10,
47
+    0xdb,0x17,0x00,0x00,0x00,0x98,0x49,0x44,0x41,0x54,0x18,0xd3,0x85,0x8c,
48
+    0x31,0x0a,0xc2,0x40,0x10,0x45,0x1f,0x62,0x95,0x9b,0x18,0x16,0x6b,0xf1,
49
+    0x08,0xa6,0xf5,0x04,0x36,0x5a,0x59,0x6e,0x61,0x9b,0x0b,0x04,0xcc,0x01,
50
+    0x2c,0x72,0x0c,0x6b,0x3d,0x81,0x85,0x20,0x04,0x0b,0x31,0x45,0x18,0x85,
51
+    0x80,0x36,0x81,0x58,0x0c,0x92,0x65,0x40,0xfc,0xd5,0x1b,0xde,0xfc,0x0f,
52
+    0x7f,0x33,0xc4,0x23,0x74,0xbc,0xc8,0x88,0x42,0xe1,0x28,0xa9,0xd9,0x30,
53
+    0x65,0xc9,0x85,0x07,0xb3,0xbe,0x51,0xb2,0x0f,0x1e,0x73,0x6e,0xc4,0x8a,
54
+    0x9e,0xda,0xcc,0x9f,0xd8,0x2a,0x08,0xa9,0x51,0x0b,0x2a,0x85,0x8e,0xc4,
55
+    0x28,0x47,0x0b,0x03,0xe0,0xcd,0xd8,0xa8,0x11,0x8d,0x42,0xc6,0xd5,0xa8,
56
+    0x03,0x85,0x42,0xc4,0x93,0x5d,0x20,0x3c,0xc2,0xe4,0x7b,0x24,0xdc,0x39,
57
+    0xb3,0xc2,0x31,0xe7,0x88,0xb0,0x0e,0x27,0x62,0x72,0x2a,0x5a,0x84,0xa2,
58
+    0x6f,0xfc,0xcc,0x07,0xef,0xe8,0x26,0x2e,0x6f,0x29,0xb2,0x5f,0x00,0x00,
59
+    0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
60
+};
61
+
38 62
 static const unsigned int  radio_light_png_len = 236;
39 63
 static const unsigned char radio_light_png_data[] = {
40 64
     0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
@@ -56,25 +80,47 @@ static const unsigned char radio_light_png_data[] = {
56 80
     0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
57 81
 };
58 82
 
59
-static const unsigned int  radio_on_png_len = 231;
83
+static const unsigned int  radio_on_png_len = 221;
60 84
 static const unsigned char radio_on_png_data[] = {
61 85
     0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
62 86
     0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x0d,0x08,0x06,0x00,0x00,
63
-    0x00,0x72,0xeb,0xe4,0x7c,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,
64
-    0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,
65
-    0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,
66
-    0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd7,0x05,0x1d,
67
-    0x0b,0x26,0x21,0x2a,0x9e,0xfa,0x9e,0x00,0x00,0x00,0x74,0x49,0x44,0x41,
68
-    0x54,0x28,0xcf,0xd5,0xd0,0x3d,0x0e,0x82,0x50,0x10,0x04,0xe0,0x4f,0xa9,
69
-    0x68,0x39,0x84,0x3d,0xb7,0x80,0x96,0xda,0x23,0xd8,0x51,0xd8,0x7a,0x2f,
70
-    0x2f,0xc0,0x19,0x80,0xd2,0xc6,0xe6,0x9d,0xc1,0xe6,0x91,0xbc,0x6c,0x50,
71
-    0x5b,0x9d,0x64,0xb3,0x7f,0x33,0xd9,0xcc,0xf2,0x77,0xb8,0x60,0xc2,0x9c,
72
-    0x73,0x17,0x09,0xd5,0x8e,0x00,0xee,0x68,0x73,0x3d,0x60,0xc1,0xba,0x91,
73
-    0x8e,0x41,0x74,0xc6,0x13,0x63,0x98,0xdf,0xca,0xe6,0x10,0x96,0x33,0x52,
74
-    0x98,0x35,0x39,0x9f,0xde,0x5d,0x4a,0x05,0xa9,0x14,0xa4,0x4f,0x9e,0x1e,
75
-    0xe8,0x51,0xe7,0xd8,0x70,0x2d,0x3d,0xed,0xa1,0xfb,0xf6,0xbd,0x1f,0xc7,
76
-    0x0b,0x02,0x3c,0x12,0x4f,0x16,0x9a,0x81,0xa2,0x00,0x00,0x00,0x00,0x49,
77
-    0x45,0x4e,0x44,0xae,0x42,0x60,0x82
87
+    0x00,0x72,0xeb,0xe4,0x7c,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
88
+    0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,0xff,
89
+    0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,0x48,
90
+    0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,
91
+    0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd9,0x04,0x11,0x0a,
92
+    0x2d,0x0a,0x29,0xa8,0x47,0x5a,0x00,0x00,0x00,0x5d,0x49,0x44,0x41,0x54,
93
+    0x28,0xcf,0xd5,0xd0,0xb1,0x09,0x80,0x40,0x0c,0x05,0xd0,0xa7,0x56,0xb6,
94
+    0x37,0x8d,0x23,0xe8,0x44,0xae,0xe8,0x0c,0x62,0x69,0x7d,0x33,0xd8,0x9c,
95
+    0xa0,0xe1,0x0a,0x0b,0x0b,0xfd,0xf0,0x09,0x81,0xbc,0x26,0xfc,0x2e,0x23,
96
+    0x16,0xac,0x65,0x8e,0x4f,0xc0,0x5a,0xe9,0x0d,0x36,0x01,0x2d,0x48,0xc8,
97
+    0x65,0x4f,0x65,0x66,0x0c,0xe7,0x51,0x1b,0xd0,0x15,0xa8,0xe0,0x2a,0xca,
98
+    0xe1,0x20,0x05,0x0c,0xba,0x80,0x76,0x4c,0xe8,0x4b,0xcf,0xcc,0xd8,0x5e,
99
+    0xfd,0xde,0xc7,0x72,0x00,0x70,0x62,0x14,0x61,0xef,0x49,0xda,0x94,0x00,
100
+    0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
101
+};
102
+
103
+static const unsigned int  radio_on_small_png_len = 258;
104
+static const unsigned char radio_on_small_png_data[] = {
105
+    0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
106
+    0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x0d,0x08,0x06,0x00,0x00,
107
+    0x00,0x72,0xeb,0xe4,0x7c,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
108
+    0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,0xff,
109
+    0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,0x48,
110
+    0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,
111
+    0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd9,0x0a,0x14,0x0b,
112
+    0x13,0x19,0x65,0xff,0x39,0x9d,0x00,0x00,0x00,0x82,0x49,0x44,0x41,0x54,
113
+    0x28,0xcf,0xcd,0xd0,0x31,0x0a,0xc2,0x50,0x10,0x04,0xd0,0xa7,0x82,0xf0,
114
+    0x41,0x9b,0x78,0x0b,0xdb,0x9c,0xc1,0xc6,0xeb,0xa4,0xcf,0x65,0x2c,0x3c,
115
+    0x84,0x07,0x51,0x1b,0x0b,0x49,0x6b,0x0a,0x45,0x02,0x22,0x62,0xb3,0x82,
116
+    0x04,0x63,0x95,0x22,0xd3,0x0c,0x3b,0xcc,0xcc,0x2e,0xcb,0xa0,0x31,0xfa,
117
+    0xa1,0x25,0xac,0x90,0xa1,0xc6,0x0e,0xcd,0xbf,0x92,0x84,0x12,0x07,0x54,
118
+    0xd8,0xc7,0x9c,0xbe,0x4d,0x93,0x56,0x68,0x8d,0x02,0x77,0x5c,0x31,0xc3,
119
+    0x12,0x27,0x1c,0x3f,0xa6,0x71,0x2b,0xb4,0xc0,0x0b,0x8f,0xe0,0x1a,0xf3,
120
+    0x38,0x55,0x57,0xe8,0x12,0xda,0x34,0x38,0xc3,0x2d,0xc2,0x9d,0xe7,0x9d,
121
+    0xa3,0x39,0x8f,0xad,0x0d,0xb6,0xd8,0xe0,0xd9,0xeb,0xf7,0x06,0x86,0x37,
122
+    0x26,0x03,0x19,0xb1,0xe6,0xd3,0x1d,0x4f,0x00,0x00,0x00,0x00,0x49,0x45,
123
+    0x4e,0x44,0xae,0x42,0x60,0x82
78 124
 };
79 125
 
80 126
 static const unsigned int  check_on_png_len = 179;
@@ -140,67 +186,33 @@ static const unsigned char slider_light_png_data[] = {
140 186
     0x42,0x60,0x82
141 187
 };
142 188
 
143
-static const unsigned int  slider_v_png_len = 310;
144
-static const unsigned char slider_v_png_data[] = {
145
-    0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
146
-    0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x15,0x08,0x06,0x00,0x00,
147
-    0x00,0x9d,0x6e,0x64,0x8a,0x00,0x00,0x00,0x06,0x62,0x4b,0x47,0x44,0x00,
148
-    0xff,0x00,0xff,0x00,0xff,0xa0,0xbd,0xa7,0x93,0x00,0x00,0x00,0x09,0x70,
149
-    0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,
150
-    0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd7,0x06,0x19,
151
-    0x0b,0x21,0x3b,0x50,0x7f,0x78,0xa4,0x00,0x00,0x00,0xc3,0x49,0x44,0x41,
152
-    0x54,0x38,0xcb,0xed,0xd4,0x31,0x4e,0x02,0x41,0x14,0x87,0xf1,0x5f,0xa0,
153
-    0xa3,0x5f,0x3a,0xc2,0x1d,0x0c,0x21,0x48,0x24,0xf4,0x36,0x9a,0x58,0xee,
154
-    0x0d,0xa8,0xac,0xe1,0x16,0x36,0x34,0x9e,0x02,0x2e,0xc0,0x19,0x30,0x6e,
155
-    0xa2,0x26,0x54,0x34,0xc6,0x06,0x05,0xeb,0xa5,0x19,0xc8,0x92,0x2c,0x32,
156
-    0xda,0xd8,0xf0,0x35,0x33,0x99,0x79,0x5f,0x5e,0x26,0x79,0xff,0xe1,0x90,
157
-    0x04,0x53,0x3c,0x23,0x0f,0xeb,0x34,0x9c,0xef,0xa9,0x14,0xf6,0x29,0x16,
158
-    0x78,0xc7,0x08,0x5d,0x0c,0xb1,0xc4,0x5b,0xb8,0x3f,0x20,0xc5,0x2b,0xfa,
159
-    0xca,0xe9,0x62,0x5e,0x14,0x13,0x6c,0xd0,0xf3,0x33,0x1d,0x7c,0x22,0xa9,
160
-    0x62,0x80,0x0f,0x3c,0x9c,0x90,0x96,0x68,0xa0,0x29,0x3c,0xf6,0x4e,0x1c,
161
-    0xd7,0xa1,0x5e,0x8e,0xcb,0x48,0xe9,0x02,0x79,0xc5,0x1f,0x38,0x4b,0xff,
162
-    0x22,0x65,0xa8,0x47,0xd6,0xd7,0x91,0x55,0x51,0xc3,0x15,0x26,0x11,0xd2,
163
-    0x3d,0x66,0xbb,0x29,0xff,0x8e,0x18,0xa5,0x16,0xbe,0x8a,0x81,0x4c,0xf1,
164
-    0x12,0x72,0x53,0x46,0x1b,0x4f,0xc7,0x82,0xb8,0xc6,0x23,0x6e,0x43,0xe7,
165
-    0x1b,0x8c,0xb1,0x2a,0x13,0x7e,0xf5,0x47,0x6c,0x01,0x0f,0x64,0x29,0x02,
166
-    0xd4,0x3b,0x9e,0x77,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,
167
-    0x60,0x82
168
-};
169
-
170
-static const unsigned int  slider_light_v_png_len = 204;
171
-static const unsigned char slider_light_v_png_data[] = {
189
+static const unsigned int  check_x_on_png_len = 154;
190
+static const unsigned char check_x_on_png_data[] = {
172 191
     0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
173
-    0x44,0x52,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x15,0x08,0x06,0x00,0x00,
174
-    0x00,0x9d,0x6e,0x64,0x8a,0x00,0x00,0x00,0x93,0x49,0x44,0x41,0x54,0x38,
175
-    0xcb,0xed,0xd3,0xa1,0x0a,0x02,0x51,0x10,0x85,0xe1,0x8f,0x75,0x41,0x10,
176
-    0x9b,0x4d,0x11,0xb1,0x18,0xad,0x46,0x93,0xdd,0x6a,0xf3,0x51,0x4c,0x3e,
177
-    0x97,0x46,0x93,0x6f,0x20,0x88,0x60,0x5f,0x58,0x0c,0x06,0xd7,0x72,0xc3,
178
-    0x65,0x51,0xd9,0x5d,0x30,0x08,0x9e,0x32,0xc3,0x9d,0xf9,0x39,0x77,0x60,
179
-    0x86,0x06,0x6a,0x45,0x79,0x8a,0x11,0x96,0x38,0x62,0x83,0x36,0x86,0xc8,
180
-    0x90,0xe3,0x01,0x49,0x04,0xcc,0x70,0xc2,0x04,0x0b,0x4c,0xb1,0xc3,0x00,
181
-    0x3d,0x14,0x65,0xc7,0x71,0x78,0x5c,0xa1,0x5b,0xaa,0x75,0xde,0x7d,0x73,
182
-    0x8d,0xed,0x0b,0xe0,0xa3,0x0a,0xcc,0xab,0x36,0x27,0x51,0x7e,0x6d,0x02,
183
-    0xf9,0x43,0x3f,0x01,0xf5,0xeb,0x9e,0xc6,0x39,0x6c,0xf9,0x01,0xf7,0xaa,
184
-    0x4e,0xfb,0x10,0xf3,0x3a,0x4e,0x39,0x6e,0xb8,0xd4,0x9d,0x2f,0xf5,0x4d,
185
-    0x3d,0x01,0xf6,0xc8,0x14,0xaa,0x58,0xc9,0x89,0xb4,0x00,0x00,0x00,0x00,
186
-    0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
192
+    0x44,0x52,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x08,0x06,0x00,0x00,
193
+    0x00,0xe0,0x91,0x06,0x10,0x00,0x00,0x00,0x61,0x49,0x44,0x41,0x54,0x18,
194
+    0x95,0x6d,0x8f,0x41,0x11,0xc0,0x30,0x08,0x04,0xb7,0x83,0x83,0xea,0x88,
195
+    0xa0,0x88,0xe9,0xb3,0x1a,0xaa,0x01,0x1d,0xd1,0x50,0x41,0xfd,0x5c,0x12,
196
+    0x60,0xca,0xef,0x60,0xe1,0x0e,0x03,0x2e,0xe0,0x01,0x4e,0x60,0xb0,0x6b,
197
+    0xf5,0x0f,0xe0,0x0d,0x03,0x07,0x6e,0x01,0x7d,0x36,0x4d,0x17,0x9a,0x74,
198
+    0x93,0xee,0x71,0xd1,0x64,0x51,0xc1,0x74,0xd9,0x24,0x2a,0x18,0xad,0x99,
199
+    0x50,0xca,0x50,0xac,0x87,0xfd,0x00,0x5e,0x33,0x9a,0xde,0xac,0x16,0x29,
200
+    0x63,0xfc,0x6e,0x65,0x28,0x19,0xfd,0x03,0xc4,0xa9,0x14,0xf0,0x37,0xcf,
201
+    0xd8,0xd2,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
187 202
 };
188 203
 
189
-static const unsigned int  check_x_on_png_len = 181;
190
-static const unsigned char check_x_on_png_data[] = {
204
+static const unsigned int  dot_png_len = 130;
205
+static const unsigned char dot_png_data[] = {
191 206
     0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
192
-    0x44,0x52,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x08,0x06,0x00,0x00,
193
-    0x00,0xe0,0x91,0x06,0x10,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,
194
-    0x00,0x0b,0x13,0x00,0x00,0x0b,0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,
195
-    0x00,0x1d,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x00,
196
-    0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x54,
197
-    0x68,0x65,0x20,0x47,0x49,0x4d,0x50,0xef,0x64,0x25,0x6e,0x00,0x00,0x00,
198
-    0x3e,0x49,0x44,0x41,0x54,0x18,0x95,0x95,0x8f,0x4b,0x0a,0x00,0x20,0x08,
199
-    0x05,0x07,0xba,0xb6,0x97,0xab,0x7b,0x45,0xee,0xea,0x91,0x86,0x24,0xb8,
200
-    0x70,0x18,0x7f,0x0d,0x30,0xa0,0x03,0x13,0x18,0x9c,0x50,0xce,0x92,0x34,
201
-    0x11,0x94,0x07,0x90,0xd5,0x69,0x67,0x10,0x5e,0x62,0x29,0x94,0xab,0xd2,
202
-    0x89,0x5f,0xdf,0xdd,0x37,0x6c,0xee,0x67,0xfc,0x35,0xc3,0xb2,0x07,0xf6,
203
-    0x7b,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
207
+    0x44,0x52,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x05,0x08,0x04,0x00,0x00,
208
+    0x00,0x27,0x66,0xee,0x6e,0x00,0x00,0x00,0x01,0x73,0x52,0x47,0x42,0x00,
209
+    0xae,0xce,0x1c,0xe9,0x00,0x00,0x00,0x02,0x62,0x4b,0x47,0x44,0x00,0xff,
210
+    0x87,0x8f,0xcc,0xbf,0x00,0x00,0x00,0x2e,0x49,0x44,0x41,0x54,0x08,0xd7,
211
+    0x63,0x64,0xe0,0x62,0x88,0x63,0x50,0x64,0xf8,0xc7,0x30,0x8f,0x81,0x21,
212
+    0x83,0x41,0x8d,0x81,0x81,0x81,0x81,0xa1,0x8e,0x81,0xa1,0x97,0x01,0x0a,
213
+    0x98,0x18,0xfe,0x32,0xc0,0x81,0x2a,0x43,0x33,0x84,0x01,0x00,0xb7,0x94,
214
+    0x05,0x67,0x58,0x92,0xdc,0x0c,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,
215
+    0xae,0x42,0x60,0x82
204 216
 };
205 217
 
206 218
 #include <qcstring.h>
@@ -211,14 +223,15 @@ static struct Embed {
211 223
     const char *name;
212 224
 } embed_vec[] = {
213 225
     { 419, radio_frame_png_data, "radio_frame.png" },
226
+    { 276, radio_inner_png_data, "radio_inner.png" },
214 227
     { 236, radio_light_png_data, "radio_light.png" },
215
-    { 231, radio_on_png_data, "radio_on.png" },
228
+    { 221, radio_on_png_data, "radio_on.png" },
229
+    { 258, radio_on_small_png_data, "radio_on_small.png" },
216 230
     { 179, check_on_png_data, "check_on.png" },
217 231
     { 311, slider_png_data, "slider.png" },
218 232
     { 199, slider_light_png_data, "slider_light.png" },
219
-    { 310, slider_v_png_data, "slider_v.png" },
220
-    { 204, slider_light_v_png_data, "slider_light_v.png" },
221
-    { 181, check_x_on_png_data, "check_x_on.png" },
233
+    { 154, check_x_on_png_data, "check_x_on.png" },
234
+    { 130, dot_png_data, "dot.png" },
222 235
     { 0, 0, 0 }
223 236
 };
224 237
 

+ 233
- 0
style/qtc_fixx11h.h View File

@@ -0,0 +1,233 @@
1
+//#ifdef    don't do this, this file is supposed to be included
2
+//#define   multiple times
3
+
4
+/* Usage:
5
+
6
+ If you get compile errors caused by X11 includes (the line
7
+ where first error appears contains word like None, Unsorted,
8
+ Below, etc.), put #include <fixx11h.h> in the .cpp file 
9
+ (not .h file!) between the place where X11 headers are
10
+ included and the place where the file with compile
11
+ error is included (or the place where the compile error
12
+ in the .cpp file occurs).
13
+ 
14
+ This file remaps X11 #defines to const variables or
15
+ inline functions. The side effect may be that these
16
+ symbols may now refer to different variables
17
+ (e.g. if X11 #defined NoButton, after this file
18
+ is included NoButton would no longer be X11's
19
+ NoButton, but Qt::NoButton instead). At this time,
20
+ there's no conflict known that could cause problems.
21
+
22
+ The original X11 symbols are still accessible
23
+ (e.g. for None) as X::None, XNone, and also still
24
+ None, unless name lookup finds different None
25
+ first (in the current class, etc.)
26
+
27
+ Use 'Unsorted', 'Bool' and 'index' as templates.
28
+
29
+*/
30
+
31
+namespace X
32
+{
33
+
34
+// template --->
35
+// Affects: Should be without side effects.
36
+#ifdef Unsorted
37
+#ifndef FIXX11H_Unsorted
38
+#define FIXX11H_Unsorted
39
+const int XUnsorted = Unsorted;
40
+#undef Unsorted
41
+const int Unsorted = XUnsorted;
42
+#endif
43
+#undef Unsorted
44
+#endif
45
+// template <---
46
+
47
+// Affects: Should be without side effects.
48
+#ifdef None
49
+#ifndef FIXX11H_None
50
+#define FIXX11H_None
51
+const XID XNone = None;
52
+#undef None
53
+const XID None = XNone;
54
+#endif
55
+#undef None
56
+#endif
57
+
58
+// template --->
59
+// Affects: Should be without side effects.
60
+#ifdef Bool
61
+#ifndef FIXX11H_Bool
62
+#define FIXX11H_Bool
63
+typedef Bool XBool;
64
+#undef Bool
65
+typedef XBool Bool;
66
+#endif
67
+#undef Bool
68
+#endif
69
+// template <---
70
+
71
+// Affects: Should be without side effects.
72
+#ifdef KeyPress
73
+#ifndef FIXX11H_KeyPress
74
+#define FIXX11H_KeyPress
75
+const int XKeyPress = KeyPress;
76
+#undef KeyPress
77
+const int KeyPress = XKeyPress;
78
+#endif
79
+#undef KeyPress
80
+#endif
81
+
82
+// Affects: Should be without side effects.
83
+#ifdef KeyRelease
84
+#ifndef FIXX11H_KeyRelease
85
+#define FIXX11H_KeyRelease
86
+const int XKeyRelease = KeyRelease;
87
+#undef KeyRelease
88
+const int KeyRelease = XKeyRelease;
89
+#endif
90
+#undef KeyRelease
91
+#endif
92
+
93
+// Affects: Should be without side effects.
94
+#ifdef Above
95
+#ifndef FIXX11H_Above
96
+#define FIXX11H_Above
97
+const int XAbove = Above;
98
+#undef Above
99
+const int Above = XAbove;
100
+#endif
101
+#undef Above
102
+#endif
103
+
104
+// Affects: Should be without side effects.
105
+#ifdef Below
106
+#ifndef FIXX11H_Below
107
+#define FIXX11H_Below
108
+const int XBelow = Below;
109
+#undef Below
110
+const int Below = XBelow;
111
+#endif
112
+#undef Below
113
+#endif
114
+
115
+// Affects: Should be without side effects.
116
+#ifdef FocusIn
117
+#ifndef FIXX11H_FocusIn
118
+#define FIXX11H_FocusIn
119
+const int XFocusIn = FocusIn;
120
+#undef FocusIn
121
+const int FocusIn = XFocusIn;
122
+#endif
123
+#undef FocusIn
124
+#endif
125
+
126
+// Affects: Should be without side effects.
127
+#ifdef FocusOut
128
+#ifndef FIXX11H_FocusOut
129
+#define FIXX11H_FocusOut
130
+const int XFocusOut = FocusOut;
131
+#undef FocusOut
132
+const int FocusOut = XFocusOut;
133
+#endif
134
+#undef FocusOut
135
+#endif
136
+
137
+// Affects: Should be without side effects.
138
+#ifdef Always
139
+#ifndef FIXX11H_Always
140
+#define FIXX11H_Always
141
+const int XAlways = Always;
142
+#undef Always
143
+const int Always = XAlways;
144
+#endif
145
+#undef Always
146
+#endif
147
+
148
+// Affects: Should be without side effects.
149
+#ifdef Success
150
+#ifndef FIXX11H_Success
151
+#define FIXX11H_Success
152
+const int XSuccess = Success;
153
+#undef Success
154
+const int Success = XSuccess;
155
+#endif
156
+#undef Success
157
+#endif
158
+
159
+// Affects: Should be without side effects.
160
+#ifdef GrayScale
161
+#ifndef FIXX11H_GrayScale
162
+#define FIXX11H_GrayScale
163
+const int XGrayScale = GrayScale;
164
+#undef GrayScale
165
+const int GrayScale = XGrayScale;
166
+#endif
167
+#undef GrayScale
168
+#endif
169
+
170
+// Affects: Should be without side effects.
171
+#ifdef Status
172
+#ifndef FIXX11H_Status
173
+#define FIXX11H_Status
174
+typedef Status XStatus;
175
+#undef Status
176
+typedef XStatus Status;
177
+#endif
178
+#undef Status
179
+#endif
180
+
181
+// Affects: Should be without side effects.
182
+#ifdef CursorShape
183
+#ifndef FIXX11H_CursorShape
184
+#define FIXX11H_CursorShape
185
+const int XCursorShape = CursorShape;
186
+#undef CursorShape
187
+const int CursorShape = CursorShape;
188
+#endif
189
+#undef CursorShape
190
+#endif
191
+
192
+// template --->
193
+// Affects: Should be without side effects.
194
+#ifdef index
195
+#ifndef FIXX11H_index
196
+#define FIXX11H_index
197
+inline
198
+char* Xindex( const char* s, int c )
199
+    {
200
+    return index( s, c );
201
+    }
202
+#undef index
203
+inline
204
+char* index( const char* s, int c )
205
+    {
206
+    return Xindex( s, c );
207
+    }
208
+#endif
209
+#undef index
210
+#endif
211
+// template <---
212
+
213
+#ifdef rindex
214
+// Affects: Should be without side effects.
215
+#ifndef FIXX11H_rindex
216
+#define FIXX11H_rindex
217
+inline
218
+char* Xrindex( const char* s, int c )
219
+    {
220
+    return rindex( s, c );
221
+    }
222
+#undef rindex
223
+inline
224
+char* rindex( const char* s, int c )
225
+    {
226
+    return Xrindex( s, c );
227
+    }
228
+#endif
229
+#undef rindex
230
+#endif
231
+}
232
+
233
+using namespace X;

+ 1717
- 0
style/qtc_kstyle.cpp
File diff suppressed because it is too large
View File


+ 324
- 0
style/qtc_kstyle.h View File

@@ -0,0 +1,324 @@
1
+/*
2
+ * $Id$
3
+ * 
4
+ * KStyle
5
+ * Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
6
+ * 
7
+ * QWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
8
+ * Copyright (C) 1998-2000 TrollTech AS.
9
+ * 
10
+ * Many thanks to Bradley T. Hughes for the 3 button scrollbar code.
11
+ *
12
+ * This library is free software; you can redistribute it and/or
13
+ * modify it under the terms of the GNU Library General Public
14
+ * License version 2 as published by the Free Software Foundation.
15
+ *
16
+ * This library is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19
+ * Library General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU Library General Public License
22
+ * along with this library; see the file COPYING.LIB.  If not, write to
23
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24
+ * Boston, MA 02110-1301, USA.
25
+ */
26
+
27
+#ifndef __QTC_KSTYLE_H
28
+#define __QTC_KSTYLE_H
29
+
30
+// W A R N I N G
31
+// -------------
32
+// This API is still subject to change.
33
+// I will remove this warning when I feel the API is sufficiently flexible.
34
+
35
+#include <qcommonstyle.h>
36
+
37
+struct QtCKStylePrivate;
38
+/** 
39
+ * Simplifies and extends the QStyle API to make style coding easier.
40
+ *  
41
+ * The KStyle class provides a simple internal menu transparency engine
42
+ * which attempts to use XRender for accelerated blending where requested,
43
+ * or falls back to fast internal software tinting/blending routines.
44
+ * It also simplifies more complex portions of the QStyle API, such as
45
+ * the PopupMenuItems, ScrollBars and Sliders by providing extra "primitive
46
+ * elements" which are simple to implement by the style writer.
47
+ *
48
+ * @see QStyle::QStyle
49
+ * @see QCommonStyle::QCommonStyle
50
+ * @author Karol Szwed (gallium@kde.org)
51
+ * @version $Id$
52
+ */
53
+class QtCKStyle: public QCommonStyle
54
+{
55
+	Q_OBJECT
56
+
57
+	public:
58
+
59
+		/**
60
+		 * QtCKStyle Flags:
61
+		 * 
62
+		 * @li Default - Default style setting, where menu transparency
63
+		 * and the FilledFrameWorkaround are disabled.
64
+		 * 
65
+		 * @li AllowMenuTransparency - Enable this flag to use QtCKStyle's
66
+		 * internal menu transparency engine.
67
+		 * 
68
+		 * @li FilledFrameWorkaround - Enable this flag to facilitate 
69
+		 * proper repaints of QMenuBars and QToolBars when the style chooses 
70
+		 * to paint the interior of a QFrame. The style primitives in question 
71
+		 * are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses
72
+		 * this workaround to enable painting of gradients in menubars and 
73
+		 * toolbars.
74
+		 */
75
+		typedef uint KStyleFlags;
76
+		enum KStyleOption {
77
+			Default 	      =		0x00000000, //!< All options disabled
78
+			AllowMenuTransparency =		0x00000001, //!< Internal transparency enabled
79
+			FilledFrameWorkaround = 	0x00000002  //!< Filled frames enabled
80
+		};
81
+
82
+		/**
83
+		 * KStyle ScrollBarType:
84
+		 *
85
+		 * Allows the style writer to easily select what type of scrollbar
86
+		 * should be used without having to duplicate large amounts of source
87
+		 * code by implementing the complex control CC_ScrollBar.
88
+		 *
89
+		 * @li WindowsStyleScrollBar - Two button scrollbar with the previous
90
+		 * button at the top/left, and the next button at the bottom/right.
91
+		 *
92
+		 * @li PlatinumStyleScrollBar - Two button scrollbar with both the 
93
+		 * previous and next buttons at the bottom/right.
94
+		 *
95
+		 * @li ThreeButtonScrollBar - %KDE style three button scrollbar with
96
+		 * two previous buttons, and one next button. The next button is always
97
+		 * at the bottom/right, whilst the two previous buttons are on either 
98
+		 * end of the scrollbar.
99
+		 *
100
+		 * @li NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but
101
+		 * with the buttons grouped on the opposite end of the scrollbar.
102
+		 *
103
+		 * @see KStyle::KStyle()
104
+		 */
105
+		enum KStyleScrollBarType {
106
+			WindowsStyleScrollBar  = 	0x00000000, //!< two button, windows style
107
+			PlatinumStyleScrollBar = 	0x00000001, //!< two button, platinum style
108
+			ThreeButtonScrollBar   = 	0x00000002, //!< three buttons, %KDE style
109
+			NextStyleScrollBar     = 	0x00000004  //!< two button, NeXT style
110
+		};
111
+
112
+		/** 
113
+		 * Constructs a KStyle object.
114
+		 *
115
+		 * Select the appropriate KStyle flags and scrollbar type
116
+		 * for your style. The user's style preferences selected in KControl
117
+		 * are read by using QSettings and are automatically applied to the style.
118
+		 * As a fallback, KStyle paints progressbars and tabbars. It inherits from
119
+		 * QCommonStyle for speed, so don't expect much to be implemented. 
120
+		 *
121
+		 * It is advisable to use a currently implemented style such as the HighColor
122
+		 * style as a foundation for any new KStyle, so the limited number of
123
+		 * drawing fallbacks should not prove problematic.
124
+		 *
125
+		 * @param flags the style to be applied
126
+		 * @param sbtype the scroll bar type
127
+		 * @see KStyle::KStyleFlags
128
+		 * @see KStyle::KStyleScrollBarType
129
+		 * @author Karol Szwed (gallium@kde.org)
130
+		 */
131
+		QtCKStyle( KStyleFlags flags = QtCKStyle::Default,
132
+			KStyleScrollBarType sbtype = QtCKStyle::WindowsStyleScrollBar );
133
+
134
+		/** 
135
+		 * Destructs the QtCKStyle object.
136
+		 */
137
+		~QtCKStyle();
138
+
139
+		/**
140
+		 * Returns the default widget style depending on color depth.
141
+		 */
142
+		static QString defaultStyle();
143
+
144
+		/**
145
+		 * Modifies the scrollbar type used by the style.
146
+		 * 
147
+		 * This function is only provided for convenience. It allows
148
+		 * you to make a late decision about what scrollbar type to use for the
149
+		 * style after performing some processing in your style's constructor.
150
+		 * In most situations however, setting the scrollbar type via the QtCKStyle
151
+		 * constructor should suffice.
152
+		 * @param sbtype the scroll bar type
153
+		 * @see QtCKStyle::KStyleScrollBarType
154
+		 */
155
+		void setScrollBarType(KStyleScrollBarType sbtype);
156
+
157
+		/**
158
+		 * Returns the KStyle flags used to initialize the style.
159
+		 *
160
+		 * This is used solely for the kcmstyle module, and hence is internal.
161
+		 */
162
+		KStyleFlags styleFlags() const;
163
+
164
+		/**
165
+		 * KStyle Primitive Elements:
166
+		 *
167
+		 * The KStyle class extends the Qt's Style API by providing certain 
168
+		 * simplifications for parts of QStyle. To do this, the KStylePrimitive
169
+		 * elements were defined, which are very similar to Qt's PrimitiveElement.
170
+		 * 
171
+		 * The first three Handle primitives simplify and extend PE_DockWindowHandle, 
172
+		 * so do not reimplement PE_DockWindowHandle if you want the KStyle handle 
173
+		 * simplifications to be operable. Similarly do not reimplement CC_Slider,
174
+		 * SC_SliderGroove and SC_SliderHandle when using the KStyle slider
175
+		 * primitives. KStyle automatically double-buffers slider painting
176
+		 * when they are drawn via these KStyle primitives to avoid flicker.
177
+		 *
178
+		 * @li KPE_DockWindowHandle - This primitive is already implemented in KStyle,
179
+		 * and paints a bevelled rect with the DockWindow caption text. Re-implement
180
+		 * this primitive to perform other more fancy effects when drawing the dock window
181
+		 * handle.
182
+		 *
183
+		 * @li KPE_ToolBarHandle - This primitive must be reimplemented. It currently
184
+		 * only paints a filled rectangle as default behavior. This primitive is used
185
+		 * to render QToolBar handles.
186
+		 *
187
+		 * @li KPE_GeneralHandle - This primitive must be reimplemented. It is used
188
+		 * to render general handles that are not part of a QToolBar or QDockWindow, such
189
+		 * as the applet handles used in Kicker. The default implementation paints a filled
190
+		 * rect of arbitrary color.
191
+		 *
192
+		 * @li KPE_SliderGroove - This primitive must be reimplemented. It is used to 
193
+		 * paint the slider groove. The default implementation paints a filled rect of
194
+		 * arbitrary color.
195
+		 *
196
+		 * @li KPE_SliderHandle - This primitive must be reimplemented. It is used to
197
+		 * paint the slider handle. The default implementation paints a filled rect of
198
+		 * arbitrary color.
199
+		 *
200
+		 * @li KPE_ListViewExpander - This primitive is already implemented in KStyle. It
201
+		 * is used to draw the Expand/Collapse element in QListViews. To indicate the 
202
+		 * expanded state, the style flags are set to Style_Off, while Style_On implies collapsed.
203
+		 *
204
+		 * @li KPE_ListViewBranch - This primitive is already implemented in KStyle. It is
205
+		 * used to draw the ListView branches where necessary.
206
+		 */
207
+		enum KStylePrimitive {
208
+			KPE_DockWindowHandle,
209
+			KPE_ToolBarHandle,
210
+			KPE_GeneralHandle,
211
+
212
+			KPE_SliderGroove,
213
+			KPE_SliderHandle,
214
+
215
+			KPE_ListViewExpander,
216
+			KPE_ListViewBranch
217
+		};
218
+
219
+		/**
220
+		 * This function is identical to Qt's QStyle::drawPrimitive(), except that 
221
+		 * it adds one further parameter, 'widget', that can be used to determine 
222
+		 * the widget state of the KStylePrimitive in question.
223
+		 *
224
+		 * @see KStyle::KStylePrimitive
225
+		 * @see QStyle::drawPrimitive
226
+		 * @see QStyle::drawComplexControl
227
+		 */
228
+		virtual void drawKStylePrimitive( KStylePrimitive kpe,
229
+					QPainter* p,
230
+					const QWidget* widget,
231
+					const QRect &r,
232
+					const QColorGroup &cg,
233
+					SFlags flags = Style_Default,
234
+					const QStyleOption& = QStyleOption::Default ) const;
235
+
236
+
237
+		enum KStylePixelMetric {
238
+			KPM_MenuItemSeparatorHeight		= 0x00000001,
239
+			KPM_MenuItemHMargin			= 0x00000002,
240
+			KPM_MenuItemVMargin			= 0x00000004,
241
+			KPM_MenuItemHFrame			= 0x00000008,
242
+			KPM_MenuItemVFrame			= 0x00000010,
243
+			KPM_MenuItemCheckMarkHMargin	        = 0x00000020,
244
+			KPM_MenuItemArrowHMargin		= 0x00000040,
245
+			KPM_MenuItemTabSpacing			= 0x00000080,
246
+			KPM_ListViewBranchThickness		= 0x00000100
247
+		};
248
+
249
+		int kPixelMetric( KStylePixelMetric kpm, const QWidget* widget = 0 ) const;
250
+
251
+		// ---------------------------------------------------------------------------
252
+
253
+		void polish( QWidget* widget );
254
+		void unPolish( QWidget* widget );
255
+		void polishPopupMenu( QPopupMenu* );
256
+
257
+		void drawPrimitive( PrimitiveElement pe,
258
+					QPainter* p,
259
+					const QRect &r,
260
+					const QColorGroup &cg,
261
+					SFlags flags = Style_Default,
262
+					const QStyleOption& = QStyleOption::Default ) const;
263
+
264
+		void drawControl( ControlElement element,
265
+					QPainter* p,
266
+					const QWidget* widget,
267
+					const QRect &r,
268
+					const QColorGroup &cg,
269
+					SFlags flags = Style_Default,
270
+					const QStyleOption& = QStyleOption::Default ) const;
271
+
272
+		void drawComplexControl( ComplexControl control,
273
+					QPainter *p,
274
+					const QWidget* widget,
275
+					const QRect &r,
276
+					const QColorGroup &cg,
277
+					SFlags flags = Style_Default,
278
+					SCFlags controls = SC_All,
279
+					SCFlags active = SC_None,
280
+					const QStyleOption& = QStyleOption::Default ) const;
281
+
282
+		SubControl querySubControl( ComplexControl control,
283
+					const QWidget* widget,
284
+					const QPoint &pos,
285
+					const QStyleOption& = QStyleOption::Default ) const;
286
+
287
+		QRect querySubControlMetrics( ComplexControl control,
288
+					const QWidget* widget,
289
+					SubControl sc,
290
+					const QStyleOption& = QStyleOption::Default ) const;
291
+
292
+		int pixelMetric( PixelMetric m, 
293
+					const QWidget* widget = 0 ) const;
294
+
295
+		QRect subRect( SubRect r, 
296
+					const QWidget* widget ) const;
297
+
298
+		QPixmap stylePixmap( StylePixmap stylepixmap,
299
+					const QWidget* widget = 0,
300
+					const QStyleOption& = QStyleOption::Default ) const;
301
+
302
+		int styleHint( StyleHint sh, 
303
+					const QWidget* w = 0,
304
+					const QStyleOption &opt = QStyleOption::Default,
305
+					QStyleHintReturn* shr = 0 ) const;
306
+
307
+	protected:
308
+		bool eventFilter( QObject* object, QEvent* event );
309
+
310
+	private:
311
+		// Disable copy constructor and = operator
312
+		QtCKStyle( const QtCKStyle & );
313
+		QtCKStyle& operator=( const QtCKStyle & );
314
+
315
+	protected:
316
+		virtual void virtual_hook( int id, void* data );
317
+	private:
318
+		QtCKStylePrivate *d;
319
+};
320
+
321
+
322
+// vim: set noet ts=4 sw=4:
323
+#endif
324
+

+ 3981
- 1694
style/qtcurve.cpp
File diff suppressed because it is too large
View File


+ 84
- 30
style/qtcurve.h View File

@@ -2,7 +2,7 @@
2 2
 #define __QTCURVE_H__
3 3
 
4 4
 /*
5
-  QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk
5
+  QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
6 6
 
7 7
   ----
8 8
 
@@ -51,31 +51,30 @@
51 51
 */
52 52
 
53 53
 #include "config.h"
54
+#ifdef QTC_QT_ONLY
55
+#include "qtc_kstyle.h"
56
+#else
54 57
 #include <kdeversion.h>
55 58
 #include <kstyle.h>
59
+#endif
56 60
 #include <qcolor.h>
57 61
 #include <qpoint.h>
58 62
 #include <qpalette.h>
59 63
 #include <qpixmap.h>
60 64
 #include <qcache.h>
65
+#include <qvaluelist.h>
61 66
 #include "common.h"
62 67
 
63 68
 class QTimer;
64 69
 class QSlider;
65 70
 
66
-class HighContrastStyle : public KStyle
67
-{
68
-    Q_OBJECT
69
-
70
-    public:
71
-
72
-    HighContrastStyle();
73
-    virtual ~HighContrastStyle() { }
74
-
75
-    const char * className();
76
-};
71
+#ifdef QTC_QT_ONLY
72
+#define BASE_STYLE QtCKStyle
73
+#else
74
+#define BASE_STYLE KStyle
75
+#endif
77 76
 
78
-class QtCurveStyle : public HighContrastStyle
77
+class QtCurveStyle : public BASE_STYLE
79 78
 {
80 79
     Q_OBJECT
81 80
 
@@ -96,6 +95,8 @@ class QtCurveStyle : public HighContrastStyle
96 95
         APP_TORA,
97 96
         APP_KONTACT,
98 97
         APP_OPERA,
98
+        APP_SYSTEMSETTINGS,
99
+        APP_KATE,
99 100
         APP_OTHER
100 101
     };
101 102
 
@@ -112,14 +113,29 @@ class QtCurveStyle : public HighContrastStyle
112 113
         HOVER_KICKER,
113 114
         HOVER_SW_UP,
114 115
         HOVER_SW_DOWN,
115
-        HOVER_CB_ARROW
116
+        HOVER_SW_ENTRY,
117
+        HOVER_CB_ARROW,
118
+        HOVER_CB_ENTRY
116 119
     };
117 120
 
121
+    enum EntryColor
122
+    {
123
+        ENTRY_FOCUS,
124
+        ENTRY_MOUSE_OVER,
125
+        ENTRY_NONE
126
+    };
127
+
128
+#ifdef QTC_STYLE_SUPPORT
118 129
     QtCurveStyle(const QString &name=QString());
130
+#else
131
+    QtCurveStyle();
132
+#endif
133
+
119 134
     virtual ~QtCurveStyle();
120 135
 
121 136
     void polish(QApplication *app);
122 137
     void polish(QPalette &pal);
138
+    QColorGroup setColorGroup(const QColorGroup &old, const QColorGroup &act, bool dis=false);
123 139
     void polish(QWidget *widget);
124 140
     void unPolish(QWidget *widget);
125 141
     void drawLightBevel(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
@@ -129,12 +145,16 @@ class QtCurveStyle : public HighContrastStyle
129 145
     void drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &r, const QColorGroup &cg,
130 146
                         SFlags flags, int round, const QColor &fill, const QColor *custom=NULL,
131 147
                         bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const;
132
-    void drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool top, bool bot, bool raised=false) const;
148
+    void drawGlow(QPainter *p, const QRect &r, const QColorGroup &cg, EWidget w, const QColor *cols=0) const;
149
+    void drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool raised=false, bool square=false) const;
133 150
     void drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, const QColorGroup &cg,
134 151
                     SFlags flags, int round, const QColor *custom=NULL, EWidget w=WIDGET_OTHER,
135
-                    bool doCorners=true, EBorder borderProfile=BORDER_FLAT, bool blendBorderColors=true, int borderVal=QT_STD_BORDER) const;
152
+                    bool doCorners=true, EBorder borderProfile=BORDER_FLAT, bool blendBorderColors=true, int borderVal=STD_BORDER) const;
153
+    void drawMdiIcon(QPainter *painter, const QColor &color, const QColor &shadow, const QRect &r, bool sunken, int margin,
154
+                     SubControl button) const;
155
+    void drawWindowIcon(QPainter *painter, const QColor &color, const QRect &r, bool sunken, int margin, SubControl button) const;
136 156
     void drawEntryField(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
137
-                        bool highlight, int round, EWidget=WIDGET_OTHER) const;
157
+                        EntryColor coloration, int round, EWidget=WIDGET_ENTRY) const;
138 158
     void drawArrow(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
139 159
                    QStyle::PrimitiveElement pe,  bool small=false, bool checkActive=false) const;
140 160
     void drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &,
@@ -159,32 +179,40 @@ class QtCurveStyle : public HighContrastStyle
159 179
                            const QStyleOption & = QStyleOption::Default) const;
160 180
     int styleHint(StyleHint, const QWidget *widget= 0, const QStyleOption & = QStyleOption::Default,
161 181
                   QStyleHintReturn *returnData= 0) const;
182
+    void drawItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg, bool enabled,
183
+                  const QPixmap *pixmap, const QString &text, int len=-1, const QColor *penColor=0) const;
162 184
 
163 185
     protected:
164 186
 
165 187
     bool appIsNotEmbedded(QDialog *dlg);
166 188
     bool eventFilter(QObject *object, QEvent *event);
167
-    void drawMenuItem(QPainter *p, const QRect &r, const QColorGroup &cg,
189
+    void drawMenuItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg,
168 190
                       bool mbi, int round, const QColor &bgnd, const QColor *cols) const;
169 191
     void drawProgress(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, int round,
170 192
                       const QWidget *widget) const;
171
-    void drawBevelGradient(const QColor &base, bool increase, QPainter *p, QRect const &r,
172
-                           bool horiz, double shadeTop, double shadeBot, bool sel, EAppearance bevApp,
173
-                           EWidget w=WIDGET_OTHER) const;
174
-    void drawGradient(const QColor &top, const QColor &bot, bool increase, QPainter *p,
175
-                      const QRect &r, bool horiz=true) const;
193
+    void drawBevelGradient(const QColor &base, QPainter *p, QRect const &r,
194
+                           bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const;
195
+    void drawBevelGradientReal(const QColor &base, QPainter *p, QRect const &r,
196
+                               bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const;
197
+    void drawGradient(const QColor &top, const QColor &bot, QPainter *p, const QRect &r, bool horiz=true) const;
176 198
     void drawSbSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, bool slider=false) const;
177 199
     void drawSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, QSlider *slider, bool tb=false) const;
178 200
     void drawSliderGroove(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
179 201
                           const QWidget *widget) const;
180
-    void drawMenuOrToolBarBackground(QPainter *p, const QRect &r, const QColorGroup &cg, bool menu=true,
181
-                                     bool horiz=true) const;
202
+    void drawMenuOrToolBarBackground(QPainter *p, const QRect &r, const QColorGroup &cg, bool menu=true, bool horiz=true) const;
182 203
     void drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags, bool tb, ELine handles) const;
204
+    void drawHighlight(QPainter *p, const QRect &r, const QColorGroup &cg, bool horiz, bool inc) const;
183 205
 
184 206
     private:
185 207
 
208
+    static QColor shadowColor(const QColor col)
209
+    {
210
+        return qGray(col.rgb()) < 100 ? QColor(255, 255, 255) : QColor(0, 0, 0);
211
+    }
212
+
186 213
     void           shadeColors(const QColor &base, QColor *vals) const;
187 214
     const QColor * buttonColors(const QColorGroup &cg) const;
215
+    const QColor * checkRadioColors(const QColorGroup &cg, SFlags flags) const;
188 216
     const QColor * sliderColors(/*const QColorGroup &cg, */SFlags flags) const;