summaryrefslogtreecommitdiffstats
path: root/twin-styles/glow
diff options
context:
space:
mode:
Diffstat (limited to 'twin-styles/glow')
-rw-r--r--twin-styles/glow/CMakeLists.txt35
-rw-r--r--twin-styles/glow/Makefile.am22
-rw-r--r--twin-styles/glow/config/CMakeLists.txt28
-rw-r--r--twin-styles/glow/config/Makefile.am17
-rw-r--r--twin-styles/glow/config/bitmaps.h55
-rw-r--r--twin-styles/glow/config/glowconfigdialog.cpp369
-rw-r--r--twin-styles/glow/config/glowconfigdialog.h92
-rw-r--r--twin-styles/glow/glow.desktop49
-rw-r--r--twin-styles/glow/glowbutton.cpp339
-rw-r--r--twin-styles/glow/glowbutton.h129
-rw-r--r--twin-styles/glow/glowclient.cpp902
-rw-r--r--twin-styles/glow/glowclient.h206
-rw-r--r--twin-styles/glow/resources.h11
-rw-r--r--twin-styles/glow/themes/CMakeLists.txt17
-rw-r--r--twin-styles/glow/themes/Makefile.am1
-rw-r--r--twin-styles/glow/themes/default/CMakeLists.txt22
-rw-r--r--twin-styles/glow/themes/default/Makefile.am17
-rw-r--r--twin-styles/glow/themes/default/background.pngbin0 -> 788 bytes
-rw-r--r--twin-styles/glow/themes/default/close.pngbin0 -> 122 bytes
-rw-r--r--twin-styles/glow/themes/default/close_glow.pngbin0 -> 179 bytes
-rw-r--r--twin-styles/glow/themes/default/default.theme19
-rw-r--r--twin-styles/glow/themes/default/help.pngbin0 -> 120 bytes
-rw-r--r--twin-styles/glow/themes/default/help_glow.pngbin0 -> 174 bytes
-rw-r--r--twin-styles/glow/themes/default/iconify.pngbin0 -> 120 bytes
-rw-r--r--twin-styles/glow/themes/default/iconify_glow.pngbin0 -> 177 bytes
-rw-r--r--twin-styles/glow/themes/default/maximizeoff.pngbin0 -> 109 bytes
-rw-r--r--twin-styles/glow/themes/default/maximizeoff_glow.pngbin0 -> 166 bytes
-rw-r--r--twin-styles/glow/themes/default/maximizeon.pngbin0 -> 129 bytes
-rw-r--r--twin-styles/glow/themes/default/maximizeon_glow.pngbin0 -> 186 bytes
-rw-r--r--twin-styles/glow/themes/default/stickyoff.pngbin0 -> 103 bytes
-rw-r--r--twin-styles/glow/themes/default/stickyoff_glow.pngbin0 -> 161 bytes
-rw-r--r--twin-styles/glow/themes/default/stickyon.pngbin0 -> 115 bytes
-rw-r--r--twin-styles/glow/themes/default/stickyon_glow.pngbin0 -> 173 bytes
-rw-r--r--twin-styles/glow/themes/glass/CMakeLists.txt22
-rw-r--r--twin-styles/glow/themes/glass/Makefile.am17
-rw-r--r--twin-styles/glow/themes/glass/background.pngbin0 -> 794 bytes
-rw-r--r--twin-styles/glow/themes/glass/close.pngbin0 -> 186 bytes
-rw-r--r--twin-styles/glow/themes/glass/close_glow.pngbin0 -> 567 bytes
-rw-r--r--twin-styles/glow/themes/glass/glass.theme19
-rw-r--r--twin-styles/glow/themes/glass/help.pngbin0 -> 183 bytes
-rw-r--r--twin-styles/glow/themes/glass/help_glow.pngbin0 -> 554 bytes
-rw-r--r--twin-styles/glow/themes/glass/iconify.pngbin0 -> 190 bytes
-rw-r--r--twin-styles/glow/themes/glass/iconify_glow.pngbin0 -> 575 bytes
-rw-r--r--twin-styles/glow/themes/glass/maximizeoff.pngbin0 -> 169 bytes
-rw-r--r--twin-styles/glow/themes/glass/maximizeoff_glow.pngbin0 -> 518 bytes
-rw-r--r--twin-styles/glow/themes/glass/maximizeon.pngbin0 -> 188 bytes
-rw-r--r--twin-styles/glow/themes/glass/maximizeon_glow.pngbin0 -> 541 bytes
-rw-r--r--twin-styles/glow/themes/glass/stickyoff.pngbin0 -> 178 bytes
-rw-r--r--twin-styles/glow/themes/glass/stickyoff_glow.pngbin0 -> 597 bytes
-rw-r--r--twin-styles/glow/themes/glass/stickyon.pngbin0 -> 180 bytes
-rw-r--r--twin-styles/glow/themes/glass/stickyon_glow.pngbin0 -> 564 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/CMakeLists.txt22
-rw-r--r--twin-styles/glow/themes/glass_huge/Makefile.am17
-rw-r--r--twin-styles/glow/themes/glass_huge/background.pngbin0 -> 2094 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/close.pngbin0 -> 207 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/close_glow.pngbin0 -> 1386 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/glass_huge.theme19
-rw-r--r--twin-styles/glow/themes/glass_huge/help.pngbin0 -> 199 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/help_glow.pngbin0 -> 1398 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/iconify.pngbin0 -> 206 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/iconify_glow.pngbin0 -> 1395 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/maximizeoff.pngbin0 -> 187 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/maximizeoff_glow.pngbin0 -> 1397 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/maximizeon.pngbin0 -> 206 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/maximizeon_glow.pngbin0 -> 1417 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/stickyoff.pngbin0 -> 192 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/stickyoff_glow.pngbin0 -> 1409 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/stickyon.pngbin0 -> 194 bytes
-rw-r--r--twin-styles/glow/themes/glass_huge/stickyon_glow.pngbin0 -> 1414 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/CMakeLists.txt22
-rw-r--r--twin-styles/glow/themes/glass_large/Makefile.am17
-rw-r--r--twin-styles/glow/themes/glass_large/background.pngbin0 -> 1217 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/close.pngbin0 -> 190 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/close_glow.pngbin0 -> 731 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/glass_large.theme19
-rw-r--r--twin-styles/glow/themes/glass_large/help.pngbin0 -> 187 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/help_glow.pngbin0 -> 720 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/iconify.pngbin0 -> 194 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/iconify_glow.pngbin0 -> 723 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/maximizeoff.pngbin0 -> 174 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/maximizeoff_glow.pngbin0 -> 667 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/maximizeon.pngbin0 -> 195 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/maximizeon_glow.pngbin0 -> 700 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/stickyoff.pngbin0 -> 182 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/stickyoff_glow.pngbin0 -> 658 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/stickyon.pngbin0 -> 178 bytes
-rw-r--r--twin-styles/glow/themes/glass_large/stickyon_glow.pngbin0 -> 674 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/CMakeLists.txt22
-rw-r--r--twin-styles/glow/themes/glass_verylarge/Makefile.am17
-rw-r--r--twin-styles/glow/themes/glass_verylarge/background.pngbin0 -> 1520 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/close.pngbin0 -> 197 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/close_glow.pngbin0 -> 1048 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/glass_verylarge.theme19
-rw-r--r--twin-styles/glow/themes/glass_verylarge/help.pngbin0 -> 190 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/help_glow.pngbin0 -> 1070 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/iconify.pngbin0 -> 201 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/iconify_glow.pngbin0 -> 1063 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/maximizeoff.pngbin0 -> 179 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/maximizeoff_glow.pngbin0 -> 1060 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/maximizeon.pngbin0 -> 201 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/maximizeon_glow.pngbin0 -> 1073 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/stickyoff.pngbin0 -> 185 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/stickyoff_glow.pngbin0 -> 1059 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/stickyon.pngbin0 -> 183 bytes
-rw-r--r--twin-styles/glow/themes/glass_verylarge/stickyon_glow.pngbin0 -> 1045 bytes
-rw-r--r--twin-styles/glow/themes/square/CMakeLists.txt22
-rw-r--r--twin-styles/glow/themes/square/Makefile.am17
-rw-r--r--twin-styles/glow/themes/square/background.pngbin0 -> 287 bytes
-rw-r--r--twin-styles/glow/themes/square/close.pngbin0 -> 122 bytes
-rw-r--r--twin-styles/glow/themes/square/close_glow.pngbin0 -> 164 bytes
-rw-r--r--twin-styles/glow/themes/square/help.pngbin0 -> 120 bytes
-rw-r--r--twin-styles/glow/themes/square/help_glow.pngbin0 -> 164 bytes
-rw-r--r--twin-styles/glow/themes/square/iconify.pngbin0 -> 120 bytes
-rw-r--r--twin-styles/glow/themes/square/iconify_glow.pngbin0 -> 164 bytes
-rw-r--r--twin-styles/glow/themes/square/maximizeoff.pngbin0 -> 109 bytes
-rw-r--r--twin-styles/glow/themes/square/maximizeoff_glow.pngbin0 -> 164 bytes
-rw-r--r--twin-styles/glow/themes/square/maximizeon.pngbin0 -> 129 bytes
-rw-r--r--twin-styles/glow/themes/square/maximizeon_glow.pngbin0 -> 164 bytes
-rw-r--r--twin-styles/glow/themes/square/square.theme19
-rw-r--r--twin-styles/glow/themes/square/stickyoff.pngbin0 -> 103 bytes
-rw-r--r--twin-styles/glow/themes/square/stickyoff_glow.pngbin0 -> 164 bytes
-rw-r--r--twin-styles/glow/themes/square/stickyon.pngbin0 -> 115 bytes
-rw-r--r--twin-styles/glow/themes/square/stickyon_glow.pngbin0 -> 164 bytes
123 files changed, 2620 insertions, 0 deletions
diff --git a/twin-styles/glow/CMakeLists.txt b/twin-styles/glow/CMakeLists.txt
new file mode 100644
index 00000000..76d0a23e
--- /dev/null
+++ b/twin-styles/glow/CMakeLists.txt
@@ -0,0 +1,35 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( config )
+add_subdirectory( themes )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+##### other data ################################
+
+install( FILES glow.desktop DESTINATION ${DATA_INSTALL_DIR}/twin )
+
+##### twin3_glow ################################
+
+tde_add_kpart( twin3_glow AUTOMOC
+ SOURCES glowbutton.cpp glowclient.cpp
+ LINK tdecorations-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/twin-styles/glow/Makefile.am b/twin-styles/glow/Makefile.am
new file mode 100644
index 00000000..bb624e59
--- /dev/null
+++ b/twin-styles/glow/Makefile.am
@@ -0,0 +1,22 @@
+
+INCLUDES = $(all_includes)
+
+SUBDIRS = . config themes
+
+kde_module_LTLIBRARIES = twin3_glow.la
+
+twin3_glow_la_SOURCES = glowclient.cpp glowbutton.cpp
+twin3_glow_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx
+twin3_glow_la_LIBADD = $(LIB_TDECORE) -ltdecorations
+
+METASOURCES = AUTO
+noinst_HEADERS = glowclient.h glowbutton.h resources.h
+
+linkdir = $(kde_datadir)/twin/
+link_DATA = glow.desktop
+
+EXTRA_DIST = $(link_DATA)
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/config/CMakeLists.txt b/twin-styles/glow/config/CMakeLists.txt
new file mode 100644
index 00000000..bfcc2633
--- /dev/null
+++ b/twin-styles/glow/config/CMakeLists.txt
@@ -0,0 +1,28 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+##### twin_glow_config (module) ##################
+
+tde_add_kpart( twin_glow_config AUTOMOC
+ SOURCES glowconfigdialog.cpp
+ LINK tdeui-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/twin-styles/glow/config/Makefile.am b/twin-styles/glow/config/Makefile.am
new file mode 100644
index 00000000..bf3d334b
--- /dev/null
+++ b/twin-styles/glow/config/Makefile.am
@@ -0,0 +1,17 @@
+INCLUDES = $(all_includes)
+
+kde_module_LTLIBRARIES = twin_glow_config.la
+
+twin_glow_config_la_SOURCES = glowconfigdialog.cpp
+twin_glow_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx
+twin_glow_config_la_LIBADD = $(LIB_TDEUI)
+
+METASOURCES = AUTO
+noinst_HEADERS = glowconfigdialog.h
+
+lnkdir = $(kde_datadir)/twin/
+
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/config/bitmaps.h b/twin-styles/glow/config/bitmaps.h
new file mode 100644
index 00000000..7ecb262a
--- /dev/null
+++ b/twin-styles/glow/config/bitmaps.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ bitmaps.h - description
+ -------------------
+ begin : Thu Sep 12 2001
+ copyright : (C) 2001 by Henning Burchardt
+ email : h_burchardt@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef BITMAPS_H
+#define BITMAPS_H
+
+#define BITMAP_SIZE 17
+
+static unsigned char close_bits[] = {
+ 0x00,0x00,0x16,0x00,0x00,0x16,0x00,0x00,0xf8,0x00,0x00,0x0c,0x10,0x10,0x60,
+ 0x30,0x18,0x00,0x60,0x0c,0xc8,0xc0,0x07,0x16,0x80,0x03,0x60,0xc0,0x07,0x00,
+ 0x60,0x0c,0x00,0x30,0x18,0xf8,0x10,0x10,0x00,0x00,0x00,0x46,0x00,0x00,0xfe,
+ 0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0xf3,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
+static unsigned char help_bits[] = {
+ 0x00,0x00,0x16,0x00,0x00,0x16,0x00,0x00,0x10,0x00,0x00,0x0c,0x80,0x07,0xb6,
+ 0x40,0x0c,0x00,0x00,0x0c,0xc8,0x00,0x0c,0x16,0x00,0x06,0xb6,0x00,0x03,0x00,
+ 0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x01,0x00,0x00,0x00,0xac,0x00,0x00,0xfe,
+ 0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x24,0xc4,0x3f,0x40,0x01,0xf3,0x00,0x00,
+ 0x70,0xb9,0x65,0x40,0x70,0xb9,0x65,0x40 };
+static unsigned char maximizeoff_bits[] = {
+ 0x00,0x00,0x16,0x00,0x00,0x16,0x00,0x00,0x1e,0x00,0x00,0x0c,0xf0,0x1f,0x60,
+ 0xf0,0x1f,0x00,0x10,0x10,0xc8,0x10,0x10,0x16,0x10,0x10,0x60,0x10,0x10,0x00,
+ 0x10,0x10,0x00,0x10,0x10,0x1e,0xf0,0x1f,0x00,0x00,0x00,0x50,0x00,0x00,0xfe,
+ 0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x68,0xb9,0x65,0x40,0x01,0xf2,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xe0,0xb1,0x65,0x40 };
+static unsigned char minimize_bits[] = {
+ 0x00,0x00,0x16,0x00,0x00,0x16,0x00,0x00,0x10,0x00,0x00,0x0c,0x00,0x00,0xb6,
+ 0xe0,0x0f,0x00,0x00,0x00,0xc8,0x20,0x08,0x16,0x60,0x0c,0xb6,0xc0,0x06,0x00,
+ 0x80,0x03,0x00,0x00,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0xb2,0x00,0x00,0xfe,
+ 0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0xf2,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
+static unsigned char stickyoff_bits[] = {
+ 0x00,0x00,0x16,0x00,0x00,0x16,0x00,0x00,0x1e,0x00,0x00,0x0c,0x50,0x15,0x60,
+ 0xe0,0x00,0x00,0xf0,0x11,0xc8,0xe0,0x00,0x16,0x50,0x15,0x60,0x00,0x00,0x00,
+ 0x10,0x11,0x00,0x00,0x00,0x1e,0x50,0x15,0x00,0x00,0x00,0x46,0x00,0x00,0xfe,
+ 0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x08,0x31,0xf2,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x29,0xf2,0x00,0x00 };
+
+#endif
+
diff --git a/twin-styles/glow/config/glowconfigdialog.cpp b/twin-styles/glow/config/glowconfigdialog.cpp
new file mode 100644
index 00000000..f8ff62fd
--- /dev/null
+++ b/twin-styles/glow/config/glowconfigdialog.cpp
@@ -0,0 +1,369 @@
+/***************************************************************************
+ glowconfigdialog.cpp - description
+ -------------------
+ begin : Thu Sep 12 2001
+ copyright : (C) 2001 by Henning Burchardt
+ email : h_burchardt@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <tqbitmap.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqsignalmapper.h>
+#include <tqstringlist.h>
+#include <kconfig.h>
+#include <kcolorbutton.h>
+#include <kdebug.h>
+#include <kglobal.h>
+#include <kglobalsettings.h>
+#include <klocale.h>
+#include <kpixmap.h>
+#include <kpixmapeffect.h>
+#include <kstandarddirs.h>
+#include "bitmaps.h"
+#include "glowconfigdialog.h"
+#include "../resources.h"
+
+#define NUMBER_OF_BUTTONS 5
+
+extern "C"
+{
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
+ {
+ return(new GlowConfigDialog(conf, parent));
+ }
+}
+
+GlowConfigDialog::GlowConfigDialog( KConfig * conf, TQWidget * parent )
+ : TQObject(parent)
+{
+ _glowConfig = new KConfig("twinglowrc");
+ KGlobal::locale()->insertCatalogue("twin_glow_config");
+
+ _main_group_box = new TQWidget(parent);
+ TQVBoxLayout *main_group_boxLayout = new TQVBoxLayout(_main_group_box);
+ main_group_boxLayout->tqsetAlignment(TQt::AlignTop | TQt::AlignLeft);
+ main_group_boxLayout->setSpacing(6);
+
+ //-------------------------------------------------------------------------
+ // themes
+
+ _theme_list_view = new TQListView (_main_group_box, "theme_list_view");
+ _theme_list_view->addColumn (i18n("Theme"));
+ _theme_list_view->addColumn (i18n("Button Size"));
+ _theme_list_view->setAllColumnsShowFocus(true);
+ _theme_list_view->setResizeMode(TQListView::AllColumns);
+
+ main_group_boxLayout->addWidget (_theme_list_view);
+ TQObject::connect (_theme_list_view, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotThemeListViewSelectionChanged()));
+ slotLoadThemeList();
+
+ _button_glow_color_group_box = new TQGroupBox(
+ 0, Qt::Horizontal, i18n("Button Glow Colors"), _main_group_box);
+ TQHBoxLayout *colorHBoxLayout =
+ new TQHBoxLayout(_button_glow_color_group_box->tqlayout());
+
+ // create buttons
+ TQSize buttonSize(BITMAP_SIZE, BITMAP_SIZE);
+ TQPixmap pm(buttonSize);
+ pm.fill(TQt::black);
+
+ _stickyButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, stickyoff_bits, true));
+ _stickyButton->setPixmap(pm);
+ colorHBoxLayout->addWidget(_stickyButton);
+ _titleButtonList.push_back(_stickyButton);
+
+ _helpButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, help_bits, true));
+ _helpButton->setPixmap(pm);
+ colorHBoxLayout->addWidget(_helpButton);
+ _titleButtonList.push_back(_helpButton);
+
+ _iconifyButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, minimize_bits, true));
+ _iconifyButton->setPixmap(pm);
+ colorHBoxLayout->addWidget(_iconifyButton);
+ _titleButtonList.push_back(_iconifyButton);
+
+ _maximizeButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, maximizeoff_bits, true));
+ _maximizeButton->setPixmap(pm);
+ colorHBoxLayout->addWidget(_maximizeButton);
+ _titleButtonList.push_back(_maximizeButton);
+
+ _closeButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, close_bits, true));
+ _closeButton->setPixmap(pm);
+ colorHBoxLayout->addWidget(_closeButton);
+ _titleButtonList.push_back(_closeButton);
+
+ // create signal mapper
+ _titleButtonMapper = new TQSignalMapper(this);
+ for( uint i=0; i<_titleButtonList.size(); i++ ) {
+ _titleButtonMapper->setMapping(TQT_TQOBJECT(_titleButtonList[i]), i);
+ connect(_titleButtonList[i], TQT_SIGNAL(clicked()),_titleButtonMapper, TQT_SLOT(map()));
+ }
+ connect(_titleButtonMapper, TQT_SIGNAL(mapped(int)),this, TQT_SLOT(slotTitleButtonClicked(int)));
+
+ _colorButton = new KColorButton(_button_glow_color_group_box);
+ _colorButton->setEnabled(false);
+ connect(_colorButton, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(slotColorButtonChanged(const TQColor&)));
+
+ colorHBoxLayout->addItem(new TQSpacerItem(
+ 200, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ colorHBoxLayout->addWidget(_colorButton);
+
+ main_group_boxLayout->addWidget(_button_glow_color_group_box);
+
+ TQHBoxLayout *titlebarGradientTypeLayout = new TQHBoxLayout();
+ _titlebarGradientTypeComboBox = new TQComboBox(_main_group_box);
+
+ KConfig *c = KGlobal::config();
+ KConfigGroupSaver cgs( c, TQString::tqfromLatin1("WM") );
+ TQColor activeBackground = c->readColorEntry("activeBackground");
+ TQColor activeBlend = c->readColorEntry("activeBlend");
+
+ // If the colors are equal, change one to get a gradient effect
+ if (activeBackground==activeBlend) {
+ activeBackground = activeBackground.dark();
+ }
+ for (int i=0; i< KPixmapEffect::EllipticGradient; i++ ) {
+ KPixmap gradPixmap(TQSize(196,20));
+ KPixmapEffect::gradient(gradPixmap, activeBackground,
+ activeBlend, (KPixmapEffect::GradientType) i);
+
+ _titlebarGradientTypeComboBox->insertItem(gradPixmap, i);
+ }
+
+ connect(_titlebarGradientTypeComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotTitlebarGradientTypeChanged(int)));
+ titlebarGradientTypeLayout->addWidget(
+ new TQLabel(i18n("Titlebar gradient:"), _main_group_box));
+ titlebarGradientTypeLayout->addWidget(_titlebarGradientTypeComboBox, 0, TQt::AlignLeft);
+ titlebarGradientTypeLayout->addStretch(10);
+ main_group_boxLayout->addLayout(titlebarGradientTypeLayout);
+
+
+ _showResizeHandleCheckBox = new TQCheckBox(
+ i18n("Show resize handle"), _main_group_box);
+ connect(_showResizeHandleCheckBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotResizeHandleCheckBoxChanged()));
+ main_group_boxLayout->addWidget(_showResizeHandleCheckBox);
+
+ // load config and update user interface
+ load(conf);
+
+ _main_group_box->show();
+}
+
+GlowConfigDialog::~GlowConfigDialog()
+{
+ delete _main_group_box;
+ delete _glowConfig;
+ delete[] _buttonConfigMap;
+}
+
+void GlowConfigDialog::load( KConfig* /* conf */ )
+{
+ TQColor color;
+ const TQColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+
+ _glowConfig->setGroup("General");
+
+ _buttonConfigMap = new TQColor[NUMBER_OF_BUTTONS];
+ color = _glowConfig->readColorEntry("stickyButtonGlowColor",
+ &defaultStickyButtonColor);
+ _buttonConfigMap[stickyButton] = color;
+
+ color = _glowConfig->readColorEntry("helpButtonGlowColor",
+ &defaultHelpButtonColor);
+ _buttonConfigMap[helpButton] = color;
+
+ color = _glowConfig->readColorEntry("iconifyButtonGlowColor",
+ &defaultIconifyButtonColor);
+ _buttonConfigMap[iconifyButton] = color;
+
+ color = _glowConfig->readColorEntry("maximizeButtonGlowColor",
+ &defaultMaximizeButtonColor);
+ _buttonConfigMap[maximizeButton] = color;
+
+ color = _glowConfig->readColorEntry("closeButtonGlowColor",
+ &defaultCloseButtonColor);
+ _buttonConfigMap[closeButton] = color;
+
+ _showResizeHandle = _glowConfig->readBoolEntry("showResizeHandle", true);
+ _titlebarGradientType = static_cast<KPixmapEffect::GradientType>
+ (_glowConfig->readNumEntry("titlebarGradientType",
+ KPixmapEffect::DiagonalGradient));
+
+ _showResizeHandleCheckBox->setChecked(_showResizeHandle);
+ _titlebarGradientTypeComboBox->setCurrentItem(_titlebarGradientType);
+
+ _theme_name = _glowConfig->readEntry ("themeName", "default");
+ _theme_list_view->setSelected (
+ _theme_list_view->findItem (_theme_name, 0), true);
+ slotTitleButtonClicked(0);
+}
+
+void GlowConfigDialog::save( KConfig* /* conf */ )
+{
+ _glowConfig->setGroup("General");
+
+ _glowConfig->writeEntry("stickyButtonGlowColor", _buttonConfigMap[stickyButton]);
+ _glowConfig->writeEntry("helpButtonGlowColor", _buttonConfigMap[helpButton]);
+ _glowConfig->writeEntry("iconifyButtonGlowColor", _buttonConfigMap[iconifyButton]);
+ _glowConfig->writeEntry("maximizeButtonGlowColor", _buttonConfigMap[maximizeButton]);
+ _glowConfig->writeEntry("closeButtonGlowColor", _buttonConfigMap[closeButton]);
+
+ _glowConfig->writeEntry("showResizeHandle", _showResizeHandle);
+ _glowConfig->writeEntry("titlebarGradientType", _titlebarGradientType);
+
+ _glowConfig->writeEntry ("themeName", _theme_name);
+
+ _glowConfig->sync();
+}
+
+void GlowConfigDialog::defaults()
+{
+ const TQColor defaultCloseButtonColor = DEFAULT_CLOSE_BUTTON_COLOR;
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+
+ _buttonConfigMap[stickyButton] = defaultStickyButtonColor;
+ _buttonConfigMap[helpButton] = defaultHelpButtonColor;
+ _buttonConfigMap[iconifyButton] = defaultIconifyButtonColor;
+ _buttonConfigMap[maximizeButton] = defaultMaximizeButtonColor;
+ _buttonConfigMap[closeButton] = defaultCloseButtonColor;
+
+ _showResizeHandle = true;
+ _titlebarGradientType = KPixmapEffect::DiagonalGradient;
+
+ _showResizeHandleCheckBox->setChecked(_showResizeHandle);
+ _titlebarGradientTypeComboBox->setCurrentItem(_titlebarGradientType);
+
+ _theme_list_view->setSelected (
+ _theme_list_view->findItem("default", 0), true);
+}
+
+void GlowConfigDialog::slotLoadThemeList ()
+{
+ TQStringList dir_list=KGlobal::dirs()->findDirs("data", "twin/glow-themes");
+
+ TQStringList::ConstIterator it;
+
+ _theme_list_view->clear();
+ new TQListViewItem (_theme_list_view, "default", "17x17");
+
+ for (it=dir_list.begin(); it!=dir_list.end(); ++it)
+ {
+ TQDir dir (*it, TQString("*"), TQDir::Unsorted,
+ TQDir::Dirs | TQDir::Readable);
+ if (dir.exists())
+ {
+ TQFileInfoListIterator it2(*dir.entryInfoList());
+ TQFileInfo * finfo;
+
+ while ((finfo=it2.current()))
+ {
+ if (finfo->fileName() == "." || finfo->fileName() == "..") {
+ ++it2;
+ continue;
+ }
+
+ if (! _theme_list_view->findItem (finfo->fileName(), 0))
+ {
+ KConfig conf (dir.path() + "/" + finfo->fileName() + "/" +
+ finfo->fileName() + ".theme");
+ TQSize button_size = conf.readSizeEntry (
+ "buttonSize", new TQSize (-1, -1));
+ if (button_size.width() == -1)
+ {
+ ++it2;
+ continue;
+ }
+ TQString size_string = TQString("") +
+ TQString::number(button_size.width()) +
+ "x" + TQString::number(button_size.height());
+ new TQListViewItem (_theme_list_view,
+ finfo->fileName(), size_string);
+ }
+
+ ++it2;
+ }
+ }
+ }
+}
+
+void GlowConfigDialog::slotTitlebarGradientTypeChanged(int index)
+{
+ _titlebarGradientType = static_cast<KPixmapEffect::GradientType>(index);
+ emit changed();
+}
+
+void GlowConfigDialog::slotResizeHandleCheckBoxChanged()
+{
+ _showResizeHandle = _showResizeHandleCheckBox->isChecked();
+ emit changed();
+}
+
+void GlowConfigDialog::slotTitleButtonClicked(int index)
+{
+ for( int i=0; i< ((int) _titleButtonList.size()); i++ ) {
+ _titleButtonList[i]->setDown(i==index);
+ }
+ _colorButton->setEnabled(true);
+ _colorButton->setColor(_buttonConfigMap[index]);
+}
+
+void GlowConfigDialog::slotColorButtonChanged(const TQColor& glowColor)
+{
+ if( _stickyButton->isDown() ) {
+ _buttonConfigMap[stickyButton] = glowColor;
+ } else if( _helpButton->isDown() ) {
+ _buttonConfigMap[helpButton] = glowColor;
+ } else if( _iconifyButton->isDown() ) {
+ _buttonConfigMap[iconifyButton] = glowColor;
+ } else if( _maximizeButton->isDown() ) {
+ _buttonConfigMap[maximizeButton] = glowColor;
+ } else {
+ _buttonConfigMap[closeButton] = glowColor;
+ }
+ emit changed();
+}
+
+void GlowConfigDialog::slotThemeListViewSelectionChanged ()
+{
+ if( _theme_list_view->selectedItem() != 0 ) {
+ _theme_name = _theme_list_view->selectedItem()->text (0);
+
+ emit changed();
+ }
+}
+
+#include "glowconfigdialog.moc"
diff --git a/twin-styles/glow/config/glowconfigdialog.h b/twin-styles/glow/config/glowconfigdialog.h
new file mode 100644
index 00000000..81747a4c
--- /dev/null
+++ b/twin-styles/glow/config/glowconfigdialog.h
@@ -0,0 +1,92 @@
+/***************************************************************************
+ glowconfigdialog.h - description
+ -------------------
+ begin : Thu Sep 12 2001
+ copyright : (C) 2001 by Henning Burchardt
+ email : h_burchardt@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef GLOW_CONFIG_DIALOG_H
+#define GLOW_CONFIG_DIALOG_H
+
+#include <tqvaluevector.h>
+#include <tqobject.h>
+
+class TQListView;
+class TQPushButton;
+class TQSignalMapper;
+class TQCheckBox;
+class TQComboBox;
+class KConfig;
+class KColorButton;
+
+class GlowConfigDialog : public TQObject
+{
+ Q_OBJECT
+ TQ_OBJECT
+
+public:
+ GlowConfigDialog( KConfig* conf, TQWidget* parent );
+ ~GlowConfigDialog();
+
+signals:
+ void changed();
+
+public slots:
+ void load( KConfig* conf );
+ void save( KConfig* conf );
+ void defaults();
+
+protected slots:
+ void slotTitleButtonClicked(int);
+ void slotColorButtonChanged(const TQColor&);
+ void slotTitlebarGradientTypeChanged(int);
+ void slotResizeHandleCheckBoxChanged();
+ void slotThemeListViewSelectionChanged ();
+
+private slots:
+ void slotLoadThemeList ();
+
+private:
+ enum ButtonType{stickyButton, helpButton, iconifyButton,
+ maximizeButton, closeButton };
+
+ KConfig *_glowConfig;
+
+ bool _showResizeHandle;
+ KPixmapEffect::GradientType _titlebarGradientType;
+ TQString _theme_name;
+
+ TQWidget *_main_group_box;
+ TQGroupBox *_button_glow_color_group_box;
+ TQGroupBox *_theme_group_box;
+
+ TQListView * _theme_list_view;
+
+ TQCheckBox *_showResizeHandleCheckBox;
+ TQComboBox *_titlebarGradientTypeComboBox;
+
+ TQPushButton *_stickyButton;
+ TQPushButton *_helpButton;
+ TQPushButton *_iconifyButton;
+ TQPushButton *_maximizeButton;
+ TQPushButton *_closeButton;
+ TQSignalMapper *_titleButtonMapper;
+
+ TQColor* _buttonConfigMap;
+ TQValueVector<TQPushButton*> _titleButtonList;
+
+ KColorButton *_colorButton;
+};
+
+#endif
+
diff --git a/twin-styles/glow/glow.desktop b/twin-styles/glow/glow.desktop
new file mode 100644
index 00000000..9659e5d6
--- /dev/null
+++ b/twin-styles/glow/glow.desktop
@@ -0,0 +1,49 @@
+[Desktop Entry]
+Name=Glow
+Name[af]=Gloei
+Name[br]=Lufrus
+Name[ca]=Lluïssor
+Name[cs]=Záře
+Name[cy]=Gwrid
+Name[da]=Glød
+Name[el]=Λάμψη
+Name[es]=Brillo
+Name[et]=Helendus
+Name[eu]=Dirdira
+Name[fa]=درخشندگی
+Name[fi]=Hehku
+Name[fr]=Lueur
+Name[fy]=Gloede
+Name[hi]=ग्लो
+Name[is]=Glóð
+Name[it]=Bagliore
+Name[ja]=輝き
+Name[ka]=გავარვარება
+Name[lt]=Švytėjimas
+Name[lv]=Kvēlot
+Name[mk]=Отсјај
+Name[ms]=Kilau
+Name[mt]=Dija
+Name[nb]=Glød
+Name[ne]=चमक
+Name[nl]=Gloed
+Name[nn]=Glød
+Name[pl]=Blask
+Name[ro]=Licărire
+Name[ru]=Зарево
+Name[sk]=Plameň
+Name[sl]=Lesk
+Name[sr]=Сијање
+Name[sr@Latn]=Sijanje
+Name[sv]=Glöd
+Name[ta]=ஒளிப்பெற்று
+Name[tg]=Шафақ
+Name[th]=เรืองแสง
+Name[tr]=Parlama
+Name[uk]=Заграва
+Name[ven]=Tshedza
+Name[vi]=Hào quang
+Name[xh]=Qukuqela
+Name[zh_CN]=光芒
+Name[zu]=Khanya
+X-KDE-Library=twin3_glow
diff --git a/twin-styles/glow/glowbutton.cpp b/twin-styles/glow/glowbutton.cpp
new file mode 100644
index 00000000..87079c2e
--- /dev/null
+++ b/twin-styles/glow/glowbutton.cpp
@@ -0,0 +1,339 @@
+/***************************************************************************
+ glowbutton.cpp - description
+ -------------------
+ begin : Thu Sep 6 2001
+ copyright : (C) 2001 by Henning Burchardt
+ email : h_burchardt@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <math.h>
+#include <iostream>
+#include <vector>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <kdecoration.h>
+#include <kiconeffect.h>
+#include "glowbutton.h"
+
+namespace Glow
+{
+
+//-----------------------------------------------------------------------------
+// PixmapCache
+//-----------------------------------------------------------------------------
+
+TQMap<TQString, const TQPixmap*> PixmapCache::m_pixmapMap;
+
+const TQPixmap* PixmapCache::find(const TQString& key)
+{
+ TQMap<TQString, const TQPixmap*>::const_iterator it =
+ m_pixmapMap.find(key);
+ if( it != m_pixmapMap.end() )
+ return *it;
+ else
+ return 0;
+}
+
+void PixmapCache::insert(const TQString& key, const TQPixmap *pixmap)
+{
+ m_pixmapMap[key] = pixmap;
+}
+
+void PixmapCache::erase(const TQString& key)
+{
+ TQMap<TQString, const TQPixmap*>::iterator it =
+ m_pixmapMap.find(key);
+ if (it != m_pixmapMap.end())
+ {
+ delete *it;
+ m_pixmapMap.erase(it);
+ }
+}
+
+void PixmapCache::clear()
+{
+ // delete all pixmaps in the cache
+ TQMap<TQString, const TQPixmap*>::const_iterator it
+ = m_pixmapMap.begin();
+ for(; it != m_pixmapMap.end(); ++it)
+ delete *it;
+ m_pixmapMap.clear();
+}
+
+//-----------------------------------------------------------------------------
+// GlowButton
+//-----------------------------------------------------------------------------
+
+GlowButton::GlowButton(TQWidget *parent, const char *name,
+ const TQString& tip, const int realizeBtns)
+ : TQButton(parent, name)
+{
+ m_realizeButtons = realizeBtns;
+
+ _steps = 0;
+ m_updateTime = 50;
+ m_pixmapName = TQString();
+
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
+ m_pos = 0;
+ m_timertqStatus = Stop;
+
+ setTipText (tip);
+ setCursor(arrowCursor);
+}
+
+GlowButton::~GlowButton()
+{
+}
+
+void GlowButton::setTipText( const TQString& tip )
+{
+ if (KDecoration::options()->showTooltips())
+ {
+ TQToolTip::remove( this );
+ TQToolTip::add( this, tip );
+ }
+}
+
+TQString GlowButton::getPixmapName() const
+{
+ return m_pixmapName;
+}
+
+TQt::ButtonState GlowButton::lastButton() const
+{
+ return _last_button;
+}
+
+void GlowButton::setPixmapName(const TQString& pixmapName)
+{
+ m_pixmapName = pixmapName;
+
+ const TQPixmap *pixmap = PixmapCache::find(pixmapName);
+ if( ! pixmap )
+ return;
+
+ // set steps
+ _steps = pixmap->height()/pixmap->width() - 1;
+
+ tqrepaint(false);
+}
+
+void GlowButton::paintEvent( TQPaintEvent *e )
+{
+ TQWidget::paintEvent(e);
+ const TQPixmap *pixmap = PixmapCache::find(m_pixmapName);
+ if( pixmap != 0 )
+ {
+ int pos = m_pos>=0?m_pos:-m_pos;
+ TQPainter p;
+ TQPixmap pm (pixmap->size());
+ p.begin(&pm);
+ const TQPixmap * bg_pixmap = PixmapCache::find(
+ TQString::number(parentWidget()->winId()));
+ p.drawPixmap (0, 0, *bg_pixmap, x(), y(), width(), height());
+ p.drawPixmap (0, 0, *pixmap, 0, pos*height(), width(), height());
+ p.end();
+ p.begin(this);
+ p.drawPixmap (0, 0, pm);
+ p.end();
+ }
+}
+
+void GlowButton::enterEvent( TQEvent *e )
+{
+ if( m_pos<0 )
+ m_pos=-m_pos;
+ m_timertqStatus = Run;
+ if( ! m_timer->isActive() )
+ m_timer->start(m_updateTime);
+ TQButton::enterEvent(e);
+}
+
+void GlowButton::leaveEvent( TQEvent *e )
+{
+ m_timertqStatus = Stop;
+ if( ! m_timer->isActive() )
+ m_timer->start(m_updateTime);
+ TQButton::leaveEvent(e);
+}
+
+void GlowButton::mousePressEvent( TQMouseEvent *e )
+{
+ _last_button = e->button();
+ if( m_timer->isActive() )
+ m_timer->stop();
+ m_pos = _steps;
+ tqrepaint(false);
+ // without pretending LeftButton, clicking on the button with MidButton
+ // or RightButton would cause unwanted titlebar action
+ TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
+ (e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state());
+ TQButton::mousePressEvent(&me);
+}
+
+void GlowButton::mouseReleaseEvent( TQMouseEvent *e )
+{
+ _last_button = e->button();
+ TQPoint p = mapToParent(mapFromGlobal(e->globalPos()));
+ if( ! m_timer->isActive() ) {
+ m_timer->start(m_updateTime);
+ }
+ if( ! tqgeometry().contains(p) ) {
+ m_timertqStatus = Stop;
+ }
+ TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
+ (e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state());
+ TQButton::mouseReleaseEvent(&me);
+}
+
+void GlowButton::slotTimeout()
+{
+ tqrepaint(false);
+
+ if( m_pos>=_steps-1 ) {
+ m_pos = -m_pos;
+ }
+ if( m_timertqStatus==Stop ) {
+ if( m_pos==0 ) {
+ m_timer->stop();
+ return;
+ } else if( m_pos>0 ) {
+ m_pos = -m_pos;
+ }
+ }
+
+ m_pos++;
+}
+
+//-----------------------------------------------------------------------------
+// GlowButtonFactory
+//-----------------------------------------------------------------------------
+
+GlowButtonFactory::GlowButtonFactory()
+{
+ _steps = 20;
+}
+
+int GlowButtonFactory::getSteps()
+{
+ return _steps;
+}
+
+void GlowButtonFactory::setSteps(int steps)
+{
+ _steps = steps;
+}
+
+TQPixmap * GlowButtonFactory::createGlowButtonPixmap(
+ const TQImage & bg_image,
+ const TQImage & fg_image,
+ const TQImage & glow_image,
+ const TQColor & color,
+ const TQColor & glow_color)
+{
+ if (bg_image.size() != fg_image.size()
+ || fg_image.size() != glow_image.size()) {
+ std::cerr << "Image size error" << std::endl;
+ return new TQPixmap();
+ }
+
+ TQImage colorized_bg_image = bg_image.copy();
+ KIconEffect::colorize (colorized_bg_image, color, 1.0);
+
+ int w = colorized_bg_image.width();
+ int h = colorized_bg_image.height();
+
+ TQImage image (w, (_steps+1)*h, 32);
+ image.setAlphaBuffer (true);
+ for (int i=0; i<_steps+1; ++i) {
+ for (int y=0; y<h; ++y) {
+ uint * src1_line = (uint*) colorized_bg_image.scanLine (y);
+ uint * src2_line = (uint*) fg_image.scanLine (y);
+ uint * dst_line = (uint*) image.scanLine (i*h+y);
+ for (int x=0; x<w; ++x) {
+ int r = tqRed (*(src1_line+x));
+ int g = tqGreen (*(src1_line+x));
+ int b = tqBlue (*(src1_line+x));
+ int a = TQMAX (tqAlpha(*(src1_line+x)),tqGray(*(src2_line+x)));
+ *(dst_line+x) = tqRgba (r, g, b, a);
+ }
+ }
+ }
+ TQPixmap * pixmap = new TQPixmap (image);
+ TQPainter painter (pixmap);
+
+ bool dark = (tqGray(color.rgb()) <= 127);
+ TQImage fg_img (w, h, 32);
+ fg_img.setAlphaBuffer (true);
+ for (int y=0; y<h; ++y) {
+ uint * src_line = (uint*) fg_image.scanLine (y);
+ uint * dst_line = (uint*) fg_img.scanLine (y);
+ for (int x=0; x<w; ++x) {
+ int alpha = tqGray (*(src_line+x));
+ if (dark)
+ *(dst_line+x) = tqRgba (255, 255, 255, alpha);
+ else
+ *(dst_line+x) = tqRgba (0, 0, 0, alpha);
+ }
+ }
+
+ int r = glow_color.red();
+ int g = glow_color.green();
+ int b = glow_color.blue();
+ TQImage glow_img (w, h, 32);
+ glow_img.setAlphaBuffer (true);
+ for (int i=0; i<_steps; ++i) {
+ painter.drawImage (0, i*h, fg_img);
+ for (int y=0; y<h; ++y) {
+ uint * src_line = (uint*) glow_image.scanLine(y);
+ uint * dst_line = (uint*) glow_img.scanLine(y);
+ for (int x=0; x<w; ++x) {
+ int alpha =
+ (int) (tqGray (*(src_line+x)) * ((double) i/_steps));
+ *(dst_line+x) = tqRgba (r, g, b, alpha);
+ }
+ }
+ painter.drawImage (0, i*h, glow_img);
+ }
+ painter.drawImage (0, _steps*h, fg_img);
+ for (int y=0; y<h; ++y) {
+ uint * src_line = (uint*) glow_image.scanLine (y);
+ uint * dst_line = (uint*) glow_img.scanLine (y);
+ for (int x=0; x<w; ++x) {
+ int alpha = tqGray (*(src_line+x));
+ *(dst_line+x) = tqRgba (r, g, b, alpha);
+ }
+ }
+ painter.drawImage (0, _steps*h, glow_img);
+
+ return pixmap;
+}
+
+GlowButton* GlowButtonFactory::createGlowButton(
+ TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns)
+{
+ GlowButton *glowButton = new GlowButton(parent, name, tip, realizeBtns);
+ return glowButton;
+}
+
+}
+
+#include "glowbutton.moc"
+
diff --git a/twin-styles/glow/glowbutton.h b/twin-styles/glow/glowbutton.h
new file mode 100644
index 00000000..d2e83beb
--- /dev/null
+++ b/twin-styles/glow/glowbutton.h
@@ -0,0 +1,129 @@
+/***************************************************************************
+ glowbutton.h - description
+ -------------------
+ begin : Thu Sep 14 2001
+ copyright : (C) 2001 by Henning Burchardt
+ email : h_burchardt@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef GLOW_BUTTON_H
+#define GLOW_BUTTON_H
+
+#include <vector>
+#include <tqmap.h>
+#include <tqbutton.h>
+
+class TQPixmap;
+class TQBitmap;
+class TQTimer;
+class TQString;
+
+namespace Glow
+{
+
+class PixmapCache
+{
+public:
+ static const TQPixmap* find(const TQString& key);
+ static void insert(const TQString& key, const TQPixmap *pixmap);
+ static void erase(const TQString& key);
+ static void clear();
+private:
+ static TQMap<TQString, const TQPixmap*> m_pixmapMap;
+};
+
+
+//-----------------------------------------------------------------------------
+
+class GlowButton : public TQButton
+{
+ Q_OBJECT
+ TQ_OBJECT
+
+public:
+ GlowButton(TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns);
+ ~GlowButton();
+
+ void setTipText( const TQString& tip );
+
+ TQString getPixmapName() const;
+ ButtonState lastButton() const;
+
+ /** Sets the name of the pixmap in the pixmap cache.
+ * If no background pixmap is wanted use TQString() as name. */
+ void setPixmapName(const TQString& pixmapName);
+
+protected:
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
+
+protected slots:
+ void slotTimeout();
+
+private:
+ enum TimertqStatus { Run, Stop };
+
+ int m_updateTime;
+ int _steps;
+ TQString m_pixmapName;
+
+ TQTimer *m_timer;
+ int m_pos;
+ TimertqStatus m_timertqStatus;
+
+ int m_realizeButtons;
+ ButtonState _last_button;
+};
+
+//-----------------------------------------------------------------------------
+
+class GlowButtonFactory
+{
+public:
+ GlowButtonFactory();
+
+ int getSteps();
+
+ /**
+ * Sets the number of pixmaps used to create the glow effect of the
+ * glow buttons.
+ */
+ void setSteps(int steps);
+
+ /**
+ * Creates a background pixmap for a glow button.
+ * The pixmap will consist of sub pixmaps of the size of the button which
+ * are placed one below the other. Each sub pixmap is copied on the button
+ * in succession to create the glow effect. The last sub pixmap is used
+ * when the button is pressed.
+ */
+ TQPixmap * createGlowButtonPixmap(
+ const TQImage & bg_image,
+// const TQImage & bg_alpha_image,
+ const TQImage & fg_image,
+ const TQImage & glow_image,
+ const TQColor & color,
+ const TQColor & glow_color);
+
+ GlowButton* createGlowButton(
+ TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns = Qt::LeftButton);
+
+private:
+ int _steps;
+};
+
+} // namespace
+
+#endif
diff --git a/twin-styles/glow/glowclient.cpp b/twin-styles/glow/glowclient.cpp
new file mode 100644
index 00000000..98133221
--- /dev/null
+++ b/twin-styles/glow/glowclient.cpp
@@ -0,0 +1,902 @@
+/***************************************************************************
+ glowclient.cpp - description
+ -------------------
+ begin : Thu Sep 6 2001
+ copyright : (C) 2001 by Henning Burchardt
+ email : h_burchardt@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <kconfig.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kpixmapeffect.h>
+#include <kpixmap.h>
+#include <kstandarddirs.h>
+#include <tqlabel.h>
+#include "resources.h"
+#include "glowclient.h"
+#include "glowbutton.h"
+
+namespace Glow
+{
+
+static int titleHeight;
+static int SIDE_MARGIN;
+static int BOTTOM_MARGIN;
+static const int TITLE_MARGIN = 2;
+static const int TITLE_SPACING = 1;
+static int RESIZE_HANDLE_HEIGHT;
+
+//-----------------------------------------------------------------------------
+
+GlowClientConfig::GlowClientConfig()
+{
+ themeName = "default";
+}
+
+void GlowClientConfig::load(KDecorationFactory *factory)
+{
+ KConfig conf("twinglowrc");
+ conf.setGroup("General");
+
+ const TQColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+
+ stickyButtonGlowColor = conf.readColorEntry(
+ "stickyButtonGlowColor", &defaultStickyButtonColor);
+
+ helpButtonGlowColor = conf.readColorEntry(
+ "helpButtonGlowColor", &defaultHelpButtonColor);
+
+ iconifyButtonGlowColor = conf.readColorEntry(
+ "iconifyButtonGlowColor", &defaultIconifyButtonColor);
+
+ maximizeButtonGlowColor = conf.readColorEntry(
+ "maximizeButtonGlowColor", &defaultMaximizeButtonColor);
+
+ closeButtonGlowColor = conf.readColorEntry(
+ "closeButtonGlowColor", &defaultCloseButtonColor);
+
+ showResizeHandle = conf.readBoolEntry("showResizeHandle", true);
+ titlebarGradientType = conf.readNumEntry("titlebarGradientType",
+ KPixmapEffect::DiagonalGradient);
+
+ themeName = conf.readEntry ("themeName", "default");
+
+ switch(KDecoration::options()->preferredBorderSize (factory)) {
+ case KDecoration::BorderLarge:
+ SIDE_MARGIN = 8;
+ BOTTOM_MARGIN = 6;
+ RESIZE_HANDLE_HEIGHT = 10;
+ break;
+ case KDecoration::BorderVeryLarge:
+ SIDE_MARGIN = 12;
+ BOTTOM_MARGIN = 12;
+ RESIZE_HANDLE_HEIGHT = 18;
+ break;
+ case KDecoration::BorderHuge:
+ SIDE_MARGIN = 18;
+ BOTTOM_MARGIN = 18;
+ RESIZE_HANDLE_HEIGHT = 27;
+ break;
+ case KDecoration::BorderVeryHuge:
+ SIDE_MARGIN = 27;
+ BOTTOM_MARGIN = 27;
+ RESIZE_HANDLE_HEIGHT = 40;
+ break;
+ case KDecoration::BorderOversized:
+ SIDE_MARGIN = 40;
+ BOTTOM_MARGIN = 40;
+ RESIZE_HANDLE_HEIGHT = 60;
+ break;
+ case KDecoration::BorderNormal:
+ default:
+ SIDE_MARGIN = 4;
+ BOTTOM_MARGIN = 2;
+ RESIZE_HANDLE_HEIGHT = 4;
+ }
+}
+
+//-----------------------------------------------------------------------------
+
+GlowClientGlobals::~GlowClientGlobals()
+{
+ deletePixmaps();
+ m_instance = 0;
+}
+
+TQString GlowClientGlobals::getPixmapName(PixmapType type, bool isActive)
+{
+ TQString s = getPixmapTypeName(static_cast<PixmapType>(type));
+ s += "|";
+ s += isActive ? "Active" : "NotActive";
+ return s;
+}
+
+GlowClientGlobals::GlowClientGlobals()
+ : KDecorationFactory()
+{
+ _button_factory = new GlowButtonFactory();
+ readConfig();
+ readTheme ();
+ if (!createPixmaps())
+ {
+ deletePixmaps();
+ delete _theme;
+ config()->themeName = "default";
+ readTheme();
+ createPixmaps();
+ }
+}
+
+void GlowClientGlobals::readConfig()
+{
+ _config = new GlowClientConfig();
+ _config->load(this);
+}
+
+TQValueList< GlowClientGlobals::BorderSize >
+GlowClientGlobals::borderSizes() const
+{
+ // the list must be sorted
+ return TQValueList< BorderSize >() << BorderNormal <<
+ BorderLarge << BorderVeryLarge << BorderHuge <<
+ BorderVeryHuge << BorderOversized;
+}
+
+void GlowClientGlobals::readTheme()
+{
+ TQString theme_config_file = KGlobal::dirs()->findResource ("data",
+ TQString("twin/glow-themes/") + config()->themeName + "/" +
+ config()->themeName + ".theme");
+ if (theme_config_file.isNull())
+ {
+ config()->themeName = "default";
+ return;
+ }
+
+ KConfig conf (theme_config_file);
+ _theme = new GlowTheme(default_glow_theme);
+
+ _theme->buttonSize = conf.readSizeEntry ("buttonSize",
+ &_theme->buttonSize);
+ _theme->stickyOnPixmap = conf.readEntry ("stickyOnPixmap",
+ _theme->stickyOnPixmap);
+ _theme->stickyOffPixmap = conf.readEntry ("stickyOffPixmap",
+ _theme->stickyOffPixmap);
+ _theme->maximizeOnPixmap = conf.readEntry ("maximizeOnPixmap",
+ _theme->maximizeOnPixmap);
+ _theme->maximizeOffPixmap = conf.readEntry ("maximizeOffPixmap",
+ _theme->maximizeOffPixmap);
+ _theme->helpPixmap = conf.readEntry ("helpPixmap",
+ _theme->helpPixmap);
+ _theme->closePixmap = conf.readEntry ("closePixmap",
+ _theme->closePixmap);
+ _theme->iconifyPixmap = conf.readEntry ("iconifyPixmap",
+ _theme->iconifyPixmap);
+ _theme->stickyOnGlowPixmap = conf.readEntry ("stickyOnGlowPixmap",
+ _theme->stickyOnGlowPixmap);
+ _theme->stickyOffGlowPixmap = conf.readEntry ("stickyOffGlowPixmap",
+ _theme->stickyOffGlowPixmap);
+ _theme->maximizeOnGlowPixmap = conf.readEntry ("maximizeOnGlowPixmap",
+ _theme->maximizeOnGlowPixmap);
+ _theme->maximizeOffGlowPixmap = conf.readEntry ("maximizeOffGlowPixmap",
+ _theme->maximizeOffGlowPixmap);
+ _theme->helpGlowPixmap = conf.readEntry ("helpGlowPixmap",
+ _theme->helpGlowPixmap);
+ _theme->closeGlowPixmap = conf.readEntry ("closeGlowPixmap",
+ _theme->closeGlowPixmap);
+ _theme->iconifyGlowPixmap = conf.readEntry ("iconifyGlowPixmap",
+ _theme->iconifyGlowPixmap);
+
+ titleHeight = TQFontMetrics(KDecoration::options()->font(true)).height();
+ if (titleHeight < SIDE_MARGIN)
+ titleHeight = SIDE_MARGIN;
+ if (titleHeight < _theme->buttonSize.height())
+ titleHeight = _theme->buttonSize.height();
+}
+
+bool GlowClientGlobals::reset( unsigned long /*changed*/ )
+{
+ deletePixmaps();
+ delete _config;
+ readConfig();
+ delete _theme;
+ readTheme ();
+ if (! createPixmaps())
+ {
+ deletePixmaps();
+ delete _theme;
+ _config->themeName = "default";
+ readTheme();
+ createPixmaps();
+ }
+ return true; // FRAME
+}
+
+bool GlowClientGlobals::supports( Ability ability )
+{
+ switch( ability )
+ {
+ case AbilityAnnounceButtons:
+ case AbilityButtonOnAllDesktops:
+ case AbilityButtonSpacer:
+ case AbilityButtonHelp:
+ case AbilityButtonMinimize:
+ case AbilityButtonMaximize:
+ case AbilityButtonClose:
+ return true;
+ default:
+ return false;
+ };
+}
+
+bool GlowClientGlobals::createPixmaps()
+{
+ for( int type=0; type<=Close; type++ ) {
+ if (! createPixmap(static_cast<PixmapType>(type), false))
+ return false;
+ if (! createPixmap(static_cast<PixmapType>(type), true))
+ return false;
+ }
+
+ return true;
+}
+
+void GlowClientGlobals::deletePixmaps()
+{
+ PixmapCache::clear();
+}
+
+const TQString GlowClientGlobals::getPixmapTypeName(PixmapType type)
+{
+ switch(type) {
+ case (StickyOn):
+ return "StickyOn";
+ case(StickyOff ):
+ return "StickyOff";
+ case(Help):
+ return "Help";
+ case(Iconify):
+ return "Iconify";
+ case(MaximizeOn):
+ return "MaximizeOn";
+ case(MaximizeOff):
+ return "MaximizeOff";
+ case(Close):
+ return "Close";
+ default:
+ return TQString();
+ }
+}
+
+bool GlowClientGlobals::createPixmap(PixmapType type, bool isActive)
+{
+ TQString theme_dir = KGlobal::dirs()->findResource ("data",
+ TQString("twin/glow-themes/") + _config->themeName + "/");
+
+ TQColor glow_color;
+ TQColor color = options()->color(ColorButtonBg, isActive);
+
+ TQImage bg_image (theme_dir+_theme->backgroundPixmap);
+ TQImage fg_image;
+ TQImage glow_image;
+
+ switch(type) {
+ case (StickyOn):
+ {
+ fg_image = TQImage (theme_dir+_theme->stickyOnPixmap);
+ glow_image = TQImage (theme_dir+_theme->stickyOnGlowPixmap);
+ glow_color = _config->stickyButtonGlowColor;
+ break;
+ }
+ case (StickyOff):
+ {
+ fg_image = TQImage (theme_dir+_theme->stickyOffPixmap);
+ glow_image = TQImage (theme_dir+_theme->stickyOffGlowPixmap);
+ glow_color = _config->stickyButtonGlowColor;
+ break;
+ }
+ case (Help):
+ {
+ fg_image = TQImage (theme_dir+_theme->helpPixmap);
+ glow_image = TQImage (theme_dir+_theme->helpGlowPixmap);
+ glow_color = _config->helpButtonGlowColor;
+ break;
+ }
+ case (Iconify):
+ {
+ fg_image = TQImage (theme_dir+_theme->iconifyPixmap);
+ glow_image = TQImage (theme_dir+_theme->iconifyGlowPixmap);
+ glow_color = _config->iconifyButtonGlowColor;
+ break;
+ }
+ case (MaximizeOn):
+ {
+ fg_image = TQImage (theme_dir+_theme->maximizeOnPixmap);
+ glow_image = TQImage (theme_dir+_theme->maximizeOnGlowPixmap);
+ glow_color = _config->maximizeButtonGlowColor;
+ break;
+ }
+ case (MaximizeOff):
+ {
+ fg_image = TQImage (theme_dir+_theme->maximizeOffPixmap);
+ glow_image = TQImage (theme_dir+_theme->maximizeOffGlowPixmap);
+ glow_color = _config->maximizeButtonGlowColor;
+ break;
+ }
+ case (Close):
+ {
+ fg_image = TQImage (theme_dir+_theme->closePixmap);
+ glow_image = TQImage (theme_dir+_theme->closeGlowPixmap);
+ glow_color = _config->closeButtonGlowColor;
+ break;
+ }
+ }
+
+ if (bg_image.size() != _theme->buttonSize
+ || fg_image.size() != _theme->buttonSize
+ || glow_image.size() != _theme->buttonSize)
+ return false;
+
+ TQPixmap * glowPm = buttonFactory()->createGlowButtonPixmap(
+ bg_image, fg_image, glow_image,
+ color, glow_color);
+ if (glowPm->isNull())
+ return false;
+ PixmapCache::insert(getPixmapName(type, isActive), glowPm);
+ return true;
+}
+
+GlowClientGlobals *GlowClientGlobals::m_instance = 0;
+
+GlowClientGlobals *GlowClientGlobals::instance()
+{
+ if( ! m_instance )
+ {
+ m_instance = new GlowClientGlobals();
+ }
+ return m_instance;
+}
+
+//-----------------------------------------------------------------------------
+
+GlowClient::GlowClient( KDecorationBridge* b, KDecorationFactory* f )
+ : KDecoration( b, f ),
+ m_stickyButton(0), m_helpButton(0), m_minimizeButton(0),
+ m_maximizeButton(0), m_closeButton(0),
+ m_leftButtonLayout(0), m_rightButtonLayout(0), _main_layout(0)
+{
+}
+
+void GlowClient::init()
+{
+ createMainWidget(WResizeNoErase | WStaticContents | WRepaintNoErase);
+ widget()->installEventFilter(this);
+
+ createButtons();
+ resetLayout();
+}
+
+GlowClient::~GlowClient()
+{
+ PixmapCache::erase(TQString::number(widget()->winId()));
+}
+
+void GlowClient::resizeEvent( TQResizeEvent * )
+{
+ doShape();
+ widget()->tqrepaint(false);
+}
+
+void GlowClient::paintEvent( TQPaintEvent * )
+{
+ GlowClientConfig *conf = GlowClientGlobals::instance()->config();
+ TQRect r_this = widget()->rect();
+ TQRect r_title = _title_spacer->tqgeometry();
+ TQColorGroup titleCg = options()->tqcolorGroup(ColorTitleBar, isActive());
+ TQColorGroup titleBlendCg=options()->tqcolorGroup(ColorTitleBlend, isActive());
+ TQColorGroup cg = widget()->tqcolorGroup();
+ TQColor titleColor = options()->color(ColorTitleBar, isActive());
+ TQColor titleBlendColor = options()->color(ColorTitleBlend, isActive());
+ TQColor bgColor = widget()->tqcolorGroup().background();
+ TQPainter p;
+ TQPointArray pArray, pArray2, pArray3, pArray4;
+
+ // pixmap for title bar
+ TQSize tBSize(width(), r_title.height());
+ TQSize gradientPixmapSize (tBSize-TQSize(3,3));
+ if (! gradientPixmapSize.isValid())
+ gradientPixmapSize = TQSize(0,0);
+ KPixmap gradientPixmap(gradientPixmapSize);
+ if (! gradientPixmapSize.isNull())
+ KPixmapEffect::gradient(gradientPixmap, titleColor, titleBlendColor,
+ (KPixmapEffect::GradientType) conf->titlebarGradientType);
+
+ TQPixmap * title_buffer = new TQPixmap(tBSize);
+ p.begin(title_buffer);
+ if (! gradientPixmap.isNull())
+ p.drawPixmap(2, 2, gradientPixmap);
+
+ if (tBSize.width()>=3 && tBSize.height()>=3)
+ {
+ // draw caption
+ p.setFont(options()->font(isActive()));
+ p.setPen(options()->color(ColorFont, isActive()));
+ p.drawText(r_title.x(), 0,
+ r_title.width(), r_title.height(),
+ TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, caption());
+
+ // draw split color beneath buttons top right
+ pArray4 = TQPointArray(4);
+ pArray4.setPoint(0, tBSize.width()-1, tBSize.height()/2-1);
+ pArray4.setPoint(1, r_title.x()+r_title.width()-1+tBSize.height()/2,
+ tBSize.height()/2-1);
+ pArray4.setPoint(2, r_title.x()+r_title.width()-1, tBSize.height());
+ pArray4.setPoint(3, tBSize.width()-1, tBSize.height());
+ p.setPen(TQt::NoPen);
+ p.setBrush(bgColor);
+ p.drawPolygon(pArray4);
+
+ // draw borders
+ pArray = TQPointArray(3);
+ pArray.setPoint(0, tBSize.width()-1, tBSize.height()/2-1);
+ pArray.setPoint(1, r_title.x()+r_title.width()-1+tBSize.height()/2,
+ tBSize.height()/2-1);
+ pArray.setPoint(2, r_title.x()+r_title.width()-1, tBSize.height()-1);
+ p.setPen(titleCg.mid());
+ p.drawPolyline(pArray);
+ p.drawLine (0, tBSize.height()-1, r_title.x()+r_title.width()-1, tBSize.height()-1);
+
+ pArray2 = TQPointArray(3);
+ pArray2.setPoint(0, 1, tBSize.height()-2);
+ pArray2.setPoint(1, 1, 1);
+ pArray2.setPoint(2, tBSize.width()-2, 1);
+ p.setPen(titleCg.light());
+ p.drawPolyline(pArray2);
+ }
+
+ pArray3 = TQPointArray(4);
+ pArray3.setPoint(0, 0, tBSize.height()-1);
+ pArray3.setPoint(1, 0, 0);
+ pArray3.setPoint(2, tBSize.width()-1, 0);
+ pArray3.setPoint(3, tBSize.width()-1, tBSize.height()-1);
+ p.setPen(TQt::black);
+ p.drawPolyline(pArray3);
+ p.end();
+
+ // insert title buffer in cache; before that, remove old buffer
+ PixmapCache::erase(TQString::number(widget()->winId()));
+ PixmapCache::insert(TQString::number(widget()->winId()), title_buffer);
+
+ bitBlt(widget(), 0, 0, title_buffer);
+ for (unsigned int i=0; i<m_buttonList.size(); ++i)
+ m_buttonList[i]->tqrepaint(false);
+
+ p.begin(widget());
+ p.setPen(TQt::black);
+ //-----
+ // draw borders
+ p.drawLine(0,tBSize.height(),0,r_this.height()-1);
+ p.drawLine(0,r_this.height()-1,r_this.width()-1,r_this.height()-1);
+ p.drawLine(r_this.width()-1,r_this.height()-1,
+ r_this.width()-1,tBSize.height()/2);
+ //-----
+ // fill content widget
+ p.fillRect(1, tBSize.height(),
+ r_this.width()-2, r_this.height()-tBSize.height()-1,
+ options()->tqcolorGroup(ColorFrame, isActive()).background());
+ p.end();
+
+ // paint resize handle if necessary
+ if(conf->showResizeHandle && isResizable() && ! isShade()
+ && width()>=2 && height() >= RESIZE_HANDLE_HEIGHT)
+ {
+ p.begin(widget());
+ p.setPen (TQt::black);
+ p.drawLine (1, height() - RESIZE_HANDLE_HEIGHT,
+ width()-2, height() - RESIZE_HANDLE_HEIGHT);
+ p.end();
+ }
+}
+
+void GlowClient::showEvent( TQShowEvent * )
+{
+ doShape();
+ widget()->tqrepaint(false);
+}
+
+void GlowClient::mouseDoubleClickEvent( TQMouseEvent *e )
+{
+ if(e->button() == Qt::LeftButton && _title_spacer->tqgeometry().contains(e->pos()))
+ titlebarDblClickOperation();
+}
+
+void GlowClient::wheelEvent( TQWheelEvent *e )
+{
+ if (isSetShade() || TQRect( 0, 0, width(), titleHeight ).contains(e->pos()))
+ titlebarMouseWheelOperation( e->delta());
+}
+
+void GlowClient::activeChange()
+{
+ updateButtonPixmaps();
+ widget()->tqrepaint(false);
+}
+
+void GlowClient::iconChange()
+{
+ // we have no (t yet an) icon button, so do nothing
+}
+
+void GlowClient::shadeChange()
+{
+}
+
+void GlowClient::captionChange()
+{
+ widget()->update(_title_spacer->tqgeometry());
+}
+
+TQSize GlowClient::tqminimumSize() const
+{
+ return widget()->tqminimumSize();
+}
+
+void GlowClient::resize( const TQSize& s )
+{
+ widget()->resize( s );
+}
+
+void GlowClient::borders( int& left, int& right, int& top, int& bottom ) const
+{
+ left = right = SIDE_MARGIN;
+ top = titleHeight + TITLE_MARGIN + 1;
+ if (GlowClientGlobals::instance()->config()->showResizeHandle
+ && isResizable())
+ bottom = RESIZE_HANDLE_HEIGHT;
+ else
+ bottom = BOTTOM_MARGIN;
+}
+
+void GlowClient::desktopChange()
+{
+ if (isOnAllDesktops()) {
+ m_stickyButton->setPixmapName(
+ GlowClientGlobals::instance()->getPixmapName(
+ GlowClientGlobals::StickyOn, isActive()));
+ m_stickyButton->setTipText(i18n("Not on all desktops"));
+ } else {
+ m_stickyButton->setPixmapName(
+ GlowClientGlobals::instance()->getPixmapName(
+ GlowClientGlobals::StickyOff, isActive()));
+ m_stickyButton->setTipText(i18n("On all desktops"));
+ }
+}
+
+void GlowClient::maximizeChange()
+{
+ if (maximizeMode() == MaximizeFull) {
+ m_maximizeButton->setPixmapName(
+ GlowClientGlobals::instance()->getPixmapName(
+ GlowClientGlobals::MaximizeOn, isActive()));
+ m_maximizeButton->setTipText(i18n("Restore"));
+ } else {
+ m_maximizeButton->setPixmapName(
+ GlowClientGlobals::instance()->getPixmapName(
+ GlowClientGlobals::MaximizeOff, isActive()));
+ m_maximizeButton->setTipText(i18n("Maximize"));
+ }
+}
+
+KDecoration::Position GlowClient::mousePosition(const TQPoint &pos) const
+{
+ Position m = PositionCenter;
+
+ int bottomSize
+ = (GlowClientGlobals::instance()->config()->showResizeHandle)
+ ? RESIZE_HANDLE_HEIGHT : BOTTOM_MARGIN;
+
+ const int range = 14 + 3*SIDE_MARGIN/2;
+
+ if ( ( pos.x() > SIDE_MARGIN && pos.x() < width() - SIDE_MARGIN )
+ && ( pos.y() > 4 && pos.y() < height() - bottomSize ) )
+ m = PositionCenter;
+ else if ( pos.y() <= range && pos.x() <= range)
+ m = PositionTopLeft;
+ else if ( pos.y() >= height()-range && pos.x() >= width()-range)
+ m = PositionBottomRight;
+ else if ( pos.y() >= height()-range && pos.x() <= range)
+ m = PositionBottomLeft;
+ else if ( pos.y() <= range && pos.x() >= width()-range)
+ m = PositionTopRight;
+ else if ( pos.y() <= 4 )
+ m = PositionTop;
+ else if ( pos.y() >= height()-bottomSize )
+ m = PositionBottom;
+ else if ( pos.x() <= SIDE_MARGIN )
+ m = PositionLeft;
+ else if ( pos.x() >= width()-SIDE_MARGIN )
+ m = PositionRight;
+ else
+ m = PositionCenter;
+
+ return m;
+}
+
+void GlowClient::createButtons()
+{
+ GlowClientGlobals *globals = GlowClientGlobals::instance();
+ GlowButtonFactory *factory = globals->buttonFactory();
+ TQSize size = globals->theme()->buttonSize;
+
+ m_stickyButton = factory->createGlowButton(widget(),
+ "StickyButton", isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops"), Qt::LeftButton|Qt::RightButton);
+ m_stickyButton->setFixedSize(size);
+ connect(m_stickyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleOnAllDesktops()));
+ m_buttonList.insert(m_buttonList.end(), m_stickyButton);
+
+ m_helpButton = factory->createGlowButton(widget(),
+ "HelpButton", i18n("Help"));
+ m_helpButton->setFixedSize(size);
+ connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showContextHelp()));
+ m_buttonList.insert(m_buttonList.end(), m_helpButton);
+
+ m_minimizeButton = factory->createGlowButton(widget(),
+ "IconifyButton", i18n("Minimize"));
+ m_minimizeButton->setFixedSize(size);
+ connect(m_minimizeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimize()));
+ m_buttonList.insert(m_buttonList.end(), m_minimizeButton);
+
+ m_maximizeButton=factory->createGlowButton(widget(),
+ "MaximizeButton", i18n("Maximize"), Qt::LeftButton|Qt::MidButton|Qt::RightButton);
+ m_maximizeButton->setFixedSize(size);
+ connect(m_maximizeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMaximize()));
+ m_buttonList.insert(m_buttonList.end(), m_maximizeButton);
+
+ m_closeButton = factory->createGlowButton(widget(),
+ "CloseButton", i18n("Close"));
+ m_closeButton->setFixedSize(size);
+ connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeWindow()));
+ m_buttonList.insert(m_buttonList.end(), m_closeButton);
+}
+
+void GlowClient::resetLayout()
+{
+ _main_layout = new TQVBoxLayout(widget(), 0, 0);
+ _main_layout->setResizeMode (TQLayout::FreeResize);
+
+ // update button positions and colors
+ updateButtonPositions();
+ updateButtonPixmaps();
+
+ TQBoxLayout * topLayout = new TQBoxLayout(_main_layout,
+ TQBoxLayout::LeftToRight, 0, 0);
+ topLayout->setMargin(0);
+ topLayout->setSpacing(TITLE_SPACING);
+ topLayout->addSpacing(SIDE_MARGIN);
+ TQVBoxLayout *outerLeftLayout = new TQVBoxLayout(topLayout);
+ outerLeftLayout->addSpacing(TITLE_MARGIN);
+ outerLeftLayout->addItem(m_leftButtonLayout);
+ outerLeftLayout->addSpacing(1);
+ topLayout->addSpacing(SIDE_MARGIN);
+
+ _title_spacer = new TQSpacerItem(0, titleHeight + TITLE_MARGIN + 1,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ topLayout->addItem(_title_spacer);
+
+ topLayout->addSpacing(SIDE_MARGIN);
+ TQVBoxLayout *outerRightLayout = new TQVBoxLayout(topLayout);
+ outerRightLayout->addSpacing(TITLE_MARGIN);
+ outerRightLayout->addItem(m_rightButtonLayout);
+ outerRightLayout->addSpacing(1);
+ topLayout->addSpacing(SIDE_MARGIN);
+
+ TQBoxLayout *midLayout = new TQBoxLayout(
+ _main_layout, TQBoxLayout::LeftToRight, 0, 0);
+ midLayout->addSpacing(SIDE_MARGIN);
+ if(isPreview())
+ midLayout->addWidget(
+ new TQLabel( i18n( "<b><center>Glow preview</center></b>" ), widget()));
+ else
+ midLayout->addItem( new TQSpacerItem( 0, 0 ));
+ midLayout->addSpacing(SIDE_MARGIN);
+
+ if(GlowClientGlobals::instance()->config()->showResizeHandle
+ && isResizable() ) {
+ _bottom_spacer = new TQSpacerItem(SIDE_MARGIN*2,
+ RESIZE_HANDLE_HEIGHT, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
+ } else {
+ _bottom_spacer = new TQSpacerItem(SIDE_MARGIN*2,
+ BOTTOM_MARGIN, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
+ }
+ _main_layout->addItem (_bottom_spacer);
+ _main_layout->setStretchFactor(topLayout, 0);
+ _main_layout->setStretchFactor(midLayout, 1);
+}
+
+void GlowClient::updateButtonPositions()
+{
+ TQString buttons = options()->titleButtonsLeft() + "|"
+ + options()->titleButtonsRight();
+ bool leftButtons=true;
+
+ // hide all buttons
+ for( unsigned int i=0; i<m_buttonList.size(); i++ )
+ m_buttonList[i]->hide();
+
+ m_leftButtonList.clear();
+ m_rightButtonList.clear();
+
+ // reset left and right button tqlayout
+ if(m_leftButtonLayout)
+ delete m_leftButtonLayout;
+ m_leftButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
+ m_leftButtonLayout->setMargin(0);
+ m_leftButtonLayout->setSpacing(TITLE_SPACING);
+ if(m_rightButtonLayout)
+ delete m_rightButtonLayout;
+ m_rightButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
+ m_rightButtonLayout->setMargin(0);
+ m_rightButtonLayout->setSpacing(TITLE_SPACING);
+
+ for( unsigned int i=0; i<buttons.length(); i++ )
+ {
+ char c = buttons[i].latin1();
+ GlowButton *button = 0;
+ if( c=='S' ) // sticky
+ button = m_stickyButton;
+ else if( c=='H' && providesContextHelp() ) // help
+ button = m_helpButton;
+ else if( c=='I' && isMinimizable() ) // iconify
+ button = m_minimizeButton;
+ else if( c=='A' && isMaximizable() ) // maximize
+ button = m_maximizeButton;
+ else if( c=='X' && isCloseable() ) // close
+ button= m_closeButton;
+ else if( c=='_' ) // spacer item
+ {
+ if(leftButtons)
+ m_leftButtonLayout->addSpacing(4);
+ else
+ m_rightButtonLayout->addSpacing(4);
+ }
+ else if( c=='|' )
+ leftButtons = false;
+
+ if (button) {
+ button->show(); // show visible buttons
+ if (leftButtons) {
+ m_leftButtonList.insert(m_leftButtonList.end(), button);
+ m_leftButtonLayout->addWidget(button);
+ } else {
+ m_rightButtonList.insert(m_rightButtonList.end(), button);
+ m_rightButtonLayout->addWidget(button);
+ }
+ }
+ }
+}
+
+void GlowClient::updateButtonPixmaps()
+{
+ GlowClientGlobals *globals = GlowClientGlobals::instance();
+
+ if ( isOnAllDesktops() ) {
+ m_stickyButton->setPixmapName(globals->getPixmapName(
+ GlowClientGlobals::StickyOn, isActive()));
+ } else {
+ m_stickyButton->setPixmapName(globals->getPixmapName(
+ GlowClientGlobals::StickyOff, isActive()));
+ }
+ m_helpButton->setPixmapName(globals->getPixmapName(
+ GlowClientGlobals::Help, isActive()));
+
+ m_minimizeButton->setPixmapName(globals->getPixmapName(
+ GlowClientGlobals::Iconify, isActive()));
+
+ if ( maximizeMode() == MaximizeFull ) {
+ m_maximizeButton->setPixmapName(globals->getPixmapName(
+ GlowClientGlobals::MaximizeOn, isActive()));
+ } else {
+ m_maximizeButton->setPixmapName(globals->getPixmapName(
+ GlowClientGlobals::MaximizeOff, isActive()));
+ }
+ m_closeButton->setPixmapName(globals->getPixmapName(
+ GlowClientGlobals::Close, isActive()));
+}
+
+void GlowClient::doShape()
+{
+ TQRegion mask(widget()->rect());
+ // edges
+
+ mask -= TQRegion(width()-1,0,1,1);
+ mask -= TQRegion(0,height()-1,1,1);
+ mask -= TQRegion(width()-1,height()-1,1,1);
+ setMask(mask);
+}
+
+bool GlowClient::isLeft(GlowButton *button)
+{
+ for( unsigned int i=0; i<m_leftButtonList.size(); i++ )
+ if( m_leftButtonList[i] == button )
+ return true;
+ return false;
+}
+
+bool GlowClient::isRight(GlowButton *button)
+{
+ for( unsigned int i=0; i<m_rightButtonList.size(); i++ )
+ if( m_rightButtonList[i] == button )
+ return true;
+ return false;
+}
+
+void GlowClient::slotMaximize()
+{
+ maximize(m_maximizeButton->lastButton());
+}
+
+bool GlowClient::eventFilter( TQObject* o, TQEvent* e )
+{
+ if( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget()))
+ return false;
+ switch( e->type())
+ {
+ case TQEvent::Resize:
+ resizeEvent( TQT_TQRESIZEEVENT( e ));
+ return true;
+ case TQEvent::Paint:
+ paintEvent( TQT_TQPAINTEVENT( e ));
+ return true;
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent( TQT_TQMOUSEEVENT( e ));
+ return true;
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent( TQT_TQMOUSEEVENT( e ));
+ return true;
+ case TQEvent::Show:
+ showEvent( TQT_TQSHOWEVENT( e ));
+ return true;
+ case TQEvent::Wheel:
+ wheelEvent( TQT_TQWHEELEVENT( e ));
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
+KDecoration* GlowClientGlobals::createDecoration( KDecorationBridge* bridge )
+{
+ return new GlowClient( bridge, this );
+}
+
+} // end of namespace
+
+extern "C"
+KDE_EXPORT KDecorationFactory* create_factory()
+{
+ return Glow::GlowClientGlobals::instance();
+}
+
+#include "glowclient.moc"
+
diff --git a/twin-styles/glow/glowclient.h b/twin-styles/glow/glowclient.h
new file mode 100644
index 00000000..9129dce0
--- /dev/null
+++ b/twin-styles/glow/glowclient.h
@@ -0,0 +1,206 @@
+/***************************************************************************
+ glowclient.h - description
+ -------------------
+ begin : Thu Sep 6 2001
+ copyright : (C) 2001 by Henning Burchardt
+ email : h_burchardt@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef GLOW_CLIENT_H
+#define GLOW_CLIENT_H
+
+#include <vector>
+#include <map>
+#include <kdecoration.h>
+#include <kdecorationfactory.h>
+
+class TQPixmap;
+class TQBitmap;
+class TQTimer;
+class TQBoxLayout;
+class TQGridLayout;
+class TQVBoxLayout;
+class TQSpacerItem;
+
+namespace Glow
+{
+
+class GlowButton;
+class GlowButtonFactory;
+
+//-----------------------------------------------------------------------------
+// GlowTheme
+//-----------------------------------------------------------------------------
+
+struct GlowTheme
+{
+ TQSize buttonSize;
+
+ TQString backgroundPixmap;
+ TQString backgroundAlphaPixmap;
+
+ TQString stickyOnPixmap;
+ TQString stickyOffPixmap;
+ TQString maximizeOnPixmap;
+ TQString maximizeOffPixmap;
+ TQString helpPixmap;
+ TQString closePixmap;
+ TQString iconifyPixmap;
+
+ TQString stickyOnGlowPixmap;
+ TQString stickyOffGlowPixmap;
+ TQString maximizeOnGlowPixmap;
+ TQString maximizeOffGlowPixmap;
+ TQString helpGlowPixmap;
+ TQString closeGlowPixmap;
+ TQString iconifyGlowPixmap;
+};
+
+static GlowTheme default_glow_theme = {
+ TQSize (17, 17),
+ "background.png", "background_alpha.png",
+ "stickyon.png", "stickyoff.png",
+ "maximizeon.png", "maximizeoff.png",
+ "help.png", "close.png", "iconify.png",
+ "stickyon_glow.png", "stickyoff_glow.png",
+ "maximizeon_glow.png", "maximizeoff_glow.png",
+ "help_glow.png", "close_glow.png", "iconify_glow.png" };
+
+//-----------------------------------------------------------------------------
+// GlowClientConfig
+//-----------------------------------------------------------------------------
+
+class GlowClientConfig
+{
+public:
+ GlowClientConfig();
+
+ void load (KDecorationFactory *factory);
+
+ TQColor stickyButtonGlowColor;
+ TQColor helpButtonGlowColor;
+ TQColor iconifyButtonGlowColor;
+ TQColor maximizeButtonGlowColor;
+ TQColor closeButtonGlowColor;
+ bool showResizeHandle;
+ int titlebarGradientType;
+ TQString themeName;
+};
+
+//-----------------------------------------------------------------------------
+// GlowClientGlobals
+//-----------------------------------------------------------------------------
+
+class GlowClientGlobals : public KDecorationFactory
+{
+public:
+ enum PixmapType { StickyOn, StickyOff, Help, Iconify, MaximizeOn,
+ MaximizeOff, Close };
+
+ static GlowClientGlobals *instance();
+
+ ~GlowClientGlobals();
+
+ virtual KDecoration* createDecoration( KDecorationBridge* b );
+ virtual bool reset( unsigned long changed );
+ virtual bool supports( Ability ability );
+ TQValueList< GlowClientGlobals::BorderSize > borderSizes() const;
+
+ TQString getPixmapName(PixmapType type, bool isActive);
+
+ GlowTheme * theme() const { return _theme; }
+ GlowClientConfig * config() const { return _config; }
+ GlowButtonFactory * buttonFactory() { return _button_factory; }
+
+private:
+ static GlowClientGlobals *m_instance;
+
+ GlowTheme * _theme;
+ GlowClientConfig * _config;
+ GlowButtonFactory * _button_factory;
+
+ GlowClientGlobals();
+ void readConfig();
+ void readTheme ();
+ bool createPixmaps();
+ void deletePixmaps();
+ bool createPixmap(PixmapType type,bool isActive);
+ const TQString getPixmapTypeName(PixmapType type);
+};
+
+//-----------------------------------------------------------------------------
+// GlowClient
+//-----------------------------------------------------------------------------
+
+class GlowClient : public KDecoration
+{
+ Q_OBJECT
+ TQ_OBJECT
+public:
+ GlowClient( KDecorationBridge* b, KDecorationFactory* f );
+ ~GlowClient();
+
+ virtual void init();
+ virtual void borders( int&, int&, int&, int& ) const;
+ virtual void resize( const TQSize& );
+ virtual TQSize tqminimumSize() const;
+
+protected:
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void showEvent( TQShowEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
+ virtual void wheelEvent( TQWheelEvent * );
+ virtual void maximizeChange();
+ virtual void activeChange();
+ virtual void iconChange();
+ virtual void desktopChange();
+ virtual void shadeChange();
+ virtual void captionChange();
+ virtual Position mousePosition(const TQPoint &) const;
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
+
+private:
+ std::vector<GlowButton*> m_buttonList;
+ std::vector<GlowButton*> m_leftButtonList;
+ std::vector<GlowButton*> m_rightButtonList;
+ GlowButton *m_stickyButton;
+ GlowButton *m_helpButton;
+ GlowButton *m_minimizeButton;
+ GlowButton *m_maximizeButton;
+ GlowButton *m_closeButton;
+ TQBoxLayout *m_leftButtonLayout;
+ TQBoxLayout *m_rightButtonLayout;
+ TQSpacerItem * _bottom_spacer;
+ TQSpacerItem * _title_spacer;
+ TQVBoxLayout * _main_layout;
+
+ void createButtons();
+ void updateButtonPositions();
+ /**
+ * Before this method is called we have to update the button
+ * positions with updateButtonPositions() because the pixmaps
+ * depend on the position
+ */
+ void updateButtonPixmaps();
+ void resetLayout();
+ void doShape();
+ bool isLeft(GlowButton *button);
+ bool isRight(GlowButton *button);
+
+protected slots:
+ void slotMaximize();
+};
+
+} // namespace
+
+#endif
diff --git a/twin-styles/glow/resources.h b/twin-styles/glow/resources.h
new file mode 100644
index 00000000..a304b822
--- /dev/null
+++ b/twin-styles/glow/resources.h
@@ -0,0 +1,11 @@
+#ifndef RESOURCES_H
+#define RESOURCES_H
+
+#define DEFAULT_CLOSE_BUTTON_COLOR TQt::red
+#define DEFAULT_MAXIMIZE_BUTTON_COLOR TQt::yellow
+#define DEFAULT_ICONIFY_BUTTON_COLOR TQt::green
+#define DEFAULT_HELP_BUTTON_COLOR TQt::white
+#define DEFAULT_STICKY_BUTTON_COLOR TQt::white
+
+#endif
+
diff --git a/twin-styles/glow/themes/CMakeLists.txt b/twin-styles/glow/themes/CMakeLists.txt
new file mode 100644
index 00000000..2f725214
--- /dev/null
+++ b/twin-styles/glow/themes/CMakeLists.txt
@@ -0,0 +1,17 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( default )
+add_subdirectory( glass )
+add_subdirectory( glass_huge )
+add_subdirectory( glass_large )
+add_subdirectory( glass_verylarge )
+add_subdirectory( square ) \ No newline at end of file
diff --git a/twin-styles/glow/themes/Makefile.am b/twin-styles/glow/themes/Makefile.am
new file mode 100644
index 00000000..ec2725a7
--- /dev/null
+++ b/twin-styles/glow/themes/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS=default glass square glass_large glass_verylarge glass_huge
diff --git a/twin-styles/glow/themes/default/CMakeLists.txt b/twin-styles/glow/themes/default/CMakeLists.txt
new file mode 100644
index 00000000..433e22b6
--- /dev/null
+++ b/twin-styles/glow/themes/default/CMakeLists.txt
@@ -0,0 +1,22 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ background.png
+ help.png help_glow.png
+ close.png close_glow.png
+ iconify.png iconify_glow.png
+ maximizeoff.png maximizeoff_glow.png
+ maximizeon.png maximizeon_glow.png
+ stickyon.png stickyon_glow.png
+ stickyoff.png stickyoff_glow.png
+ default.theme
+ DESTINATION ${DATA_INSTALL_DIR}/twin/glow-themes/default )
diff --git a/twin-styles/glow/themes/default/Makefile.am b/twin-styles/glow/themes/default/Makefile.am
new file mode 100644
index 00000000..b3ef0fa5
--- /dev/null
+++ b/twin-styles/glow/themes/default/Makefile.am
@@ -0,0 +1,17 @@
+linkdir = $(kde_datadir)/twin/glow-themes/default
+link_DATA = \
+background.png \
+help.png help_glow.png \
+close.png close_glow.png \
+iconify.png iconify_glow.png \
+maximizeoff.png maximizeoff_glow.png \
+maximizeon.png maximizeon_glow.png \
+stickyon.png stickyon_glow.png \
+stickyoff.png stickyoff_glow.png \
+default.theme
+
+EXTRA_DIST = $(link_DATA)
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/themes/default/background.png b/twin-styles/glow/themes/default/background.png
new file mode 100644
index 00000000..3fcbcdf5
--- /dev/null
+++ b/twin-styles/glow/themes/default/background.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/close.png b/twin-styles/glow/themes/default/close.png
new file mode 100644
index 00000000..898a368a
--- /dev/null
+++ b/twin-styles/glow/themes/default/close.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/close_glow.png b/twin-styles/glow/themes/default/close_glow.png
new file mode 100644
index 00000000..69b36e92
--- /dev/null
+++ b/twin-styles/glow/themes/default/close_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/default.theme b/twin-styles/glow/themes/default/default.theme
new file mode 100644
index 00000000..26f00feb
--- /dev/null
+++ b/twin-styles/glow/themes/default/default.theme
@@ -0,0 +1,19 @@
+buttonSize=17,17
+
+backgroundPixmap=background.png
+
+stickyOnPixmap=stickyon.png
+stickyOffPixmap=stickyoff.png
+maximizeOnPixmap=maximizeon.png
+maximizeOffPixmap=maximizeoff.png
+helpPixmap=help.png
+closePixmap=close.png
+iconifyPixmap=iconify.png
+
+stickyOnGlowPixmap=stickyon_glow.png
+stickyOffGlowPixmap=stickyoff_glow.png
+maximizeOnGlowPixmap=maximizeon_glow.png
+maximizeOffGlowPixmap=maximizeoff_glow.png
+helpGlowPixmap=help_glow.png
+closeGlowPixmap=close_glow.png
+iconifyGlowPixmap=iconify_glow.png
diff --git a/twin-styles/glow/themes/default/help.png b/twin-styles/glow/themes/default/help.png
new file mode 100644
index 00000000..c3ed65ee
--- /dev/null
+++ b/twin-styles/glow/themes/default/help.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/help_glow.png b/twin-styles/glow/themes/default/help_glow.png
new file mode 100644
index 00000000..79a5006a
--- /dev/null
+++ b/twin-styles/glow/themes/default/help_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/iconify.png b/twin-styles/glow/themes/default/iconify.png
new file mode 100644
index 00000000..94fc6338
--- /dev/null
+++ b/twin-styles/glow/themes/default/iconify.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/iconify_glow.png b/twin-styles/glow/themes/default/iconify_glow.png
new file mode 100644
index 00000000..8b4d1413
--- /dev/null
+++ b/twin-styles/glow/themes/default/iconify_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/maximizeoff.png b/twin-styles/glow/themes/default/maximizeoff.png
new file mode 100644
index 00000000..e60cdc97
--- /dev/null
+++ b/twin-styles/glow/themes/default/maximizeoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/maximizeoff_glow.png b/twin-styles/glow/themes/default/maximizeoff_glow.png
new file mode 100644
index 00000000..25f4c8ec
--- /dev/null
+++ b/twin-styles/glow/themes/default/maximizeoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/maximizeon.png b/twin-styles/glow/themes/default/maximizeon.png
new file mode 100644
index 00000000..3976411f
--- /dev/null
+++ b/twin-styles/glow/themes/default/maximizeon.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/maximizeon_glow.png b/twin-styles/glow/themes/default/maximizeon_glow.png
new file mode 100644
index 00000000..941ed849
--- /dev/null
+++ b/twin-styles/glow/themes/default/maximizeon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/stickyoff.png b/twin-styles/glow/themes/default/stickyoff.png
new file mode 100644
index 00000000..3600e326
--- /dev/null
+++ b/twin-styles/glow/themes/default/stickyoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/stickyoff_glow.png b/twin-styles/glow/themes/default/stickyoff_glow.png
new file mode 100644
index 00000000..5c9861a0
--- /dev/null
+++ b/twin-styles/glow/themes/default/stickyoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/stickyon.png b/twin-styles/glow/themes/default/stickyon.png
new file mode 100644
index 00000000..a84941a3
--- /dev/null
+++ b/twin-styles/glow/themes/default/stickyon.png
Binary files differ
diff --git a/twin-styles/glow/themes/default/stickyon_glow.png b/twin-styles/glow/themes/default/stickyon_glow.png
new file mode 100644
index 00000000..905653e5
--- /dev/null
+++ b/twin-styles/glow/themes/default/stickyon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/CMakeLists.txt b/twin-styles/glow/themes/glass/CMakeLists.txt
new file mode 100644
index 00000000..279668d3
--- /dev/null
+++ b/twin-styles/glow/themes/glass/CMakeLists.txt
@@ -0,0 +1,22 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ background.png
+ help.png help_glow.png
+ close.png close_glow.png
+ iconify.png iconify_glow.png
+ maximizeoff.png maximizeoff_glow.png
+ maximizeon.png maximizeon_glow.png
+ stickyon.png stickyon_glow.png
+ stickyoff.png stickyoff_glow.png
+ glass.theme
+ DESTINATION ${DATA_INSTALL_DIR}/twin/glow-themes/glass )
diff --git a/twin-styles/glow/themes/glass/Makefile.am b/twin-styles/glow/themes/glass/Makefile.am
new file mode 100644
index 00000000..aeff2c35
--- /dev/null
+++ b/twin-styles/glow/themes/glass/Makefile.am
@@ -0,0 +1,17 @@
+linkdir = $(kde_datadir)/twin/glow-themes/glass
+link_DATA = \
+background.png \
+help.png help_glow.png \
+close.png close_glow.png \
+iconify.png iconify_glow.png \
+maximizeoff.png maximizeoff_glow.png \
+maximizeon.png maximizeon_glow.png \
+stickyon.png stickyon_glow.png \
+stickyoff.png stickyoff_glow.png \
+glass.theme
+
+EXTRA_DIST = $(link_DATA)
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/themes/glass/background.png b/twin-styles/glow/themes/glass/background.png
new file mode 100644
index 00000000..97d278a0
--- /dev/null
+++ b/twin-styles/glow/themes/glass/background.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/close.png b/twin-styles/glow/themes/glass/close.png
new file mode 100644
index 00000000..8b61cfd2
--- /dev/null
+++ b/twin-styles/glow/themes/glass/close.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/close_glow.png b/twin-styles/glow/themes/glass/close_glow.png
new file mode 100644
index 00000000..2be50e89
--- /dev/null
+++ b/twin-styles/glow/themes/glass/close_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/glass.theme b/twin-styles/glow/themes/glass/glass.theme
new file mode 100644
index 00000000..9facf271
--- /dev/null
+++ b/twin-styles/glow/themes/glass/glass.theme
@@ -0,0 +1,19 @@
+buttonSize=19,19
+
+backgroundPixmap=background.png
+
+stickyOnPixmap=stickyon.png
+stickyOffPixmap=stickyoff.png
+maximizeOnPixmap=maximizeon.png
+maximizeOffPixmap=maximizeoff.png
+helpPixmap=help.png
+closePixmap=close.png
+iconifyPixmap=iconify.png
+
+stickyOnGlowPixmap=stickyon_glow.png
+stickyOffGlowPixmap=stickyoff_glow.png
+maximizeOnGlowPixmap=maximizeon_glow.png
+maximizeOffGlowPixmap=maximizeoff_glow.png
+helpGlowPixmap=help_glow.png
+closeGlowPixmap=close_glow.png
+iconifyGlowPixmap=iconify_glow.png
diff --git a/twin-styles/glow/themes/glass/help.png b/twin-styles/glow/themes/glass/help.png
new file mode 100644
index 00000000..7a12fe88
--- /dev/null
+++ b/twin-styles/glow/themes/glass/help.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/help_glow.png b/twin-styles/glow/themes/glass/help_glow.png
new file mode 100644
index 00000000..77976ff1
--- /dev/null
+++ b/twin-styles/glow/themes/glass/help_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/iconify.png b/twin-styles/glow/themes/glass/iconify.png
new file mode 100644
index 00000000..55b9f6a9
--- /dev/null
+++ b/twin-styles/glow/themes/glass/iconify.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/iconify_glow.png b/twin-styles/glow/themes/glass/iconify_glow.png
new file mode 100644
index 00000000..ff741dbe
--- /dev/null
+++ b/twin-styles/glow/themes/glass/iconify_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/maximizeoff.png b/twin-styles/glow/themes/glass/maximizeoff.png
new file mode 100644
index 00000000..b08d34c1
--- /dev/null
+++ b/twin-styles/glow/themes/glass/maximizeoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/maximizeoff_glow.png b/twin-styles/glow/themes/glass/maximizeoff_glow.png
new file mode 100644
index 00000000..8ff43447
--- /dev/null
+++ b/twin-styles/glow/themes/glass/maximizeoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/maximizeon.png b/twin-styles/glow/themes/glass/maximizeon.png
new file mode 100644
index 00000000..8894007e
--- /dev/null
+++ b/twin-styles/glow/themes/glass/maximizeon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/maximizeon_glow.png b/twin-styles/glow/themes/glass/maximizeon_glow.png
new file mode 100644
index 00000000..7fe3c840
--- /dev/null
+++ b/twin-styles/glow/themes/glass/maximizeon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/stickyoff.png b/twin-styles/glow/themes/glass/stickyoff.png
new file mode 100644
index 00000000..d87cfe9d
--- /dev/null
+++ b/twin-styles/glow/themes/glass/stickyoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/stickyoff_glow.png b/twin-styles/glow/themes/glass/stickyoff_glow.png
new file mode 100644
index 00000000..f682df78
--- /dev/null
+++ b/twin-styles/glow/themes/glass/stickyoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/stickyon.png b/twin-styles/glow/themes/glass/stickyon.png
new file mode 100644
index 00000000..f044c134
--- /dev/null
+++ b/twin-styles/glow/themes/glass/stickyon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass/stickyon_glow.png b/twin-styles/glow/themes/glass/stickyon_glow.png
new file mode 100644
index 00000000..0b468787
--- /dev/null
+++ b/twin-styles/glow/themes/glass/stickyon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/CMakeLists.txt b/twin-styles/glow/themes/glass_huge/CMakeLists.txt
new file mode 100644
index 00000000..92021eff
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/CMakeLists.txt
@@ -0,0 +1,22 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ background.png
+ help.png help_glow.png
+ close.png close_glow.png
+ iconify.png iconify_glow.png
+ maximizeoff.png maximizeoff_glow.png
+ maximizeon.png maximizeon_glow.png
+ stickyon.png stickyon_glow.png
+ stickyoff.png stickyoff_glow.png
+ glass_huge.theme
+ DESTINATION ${DATA_INSTALL_DIR}/twin/glow-themes/glass_huge )
diff --git a/twin-styles/glow/themes/glass_huge/Makefile.am b/twin-styles/glow/themes/glass_huge/Makefile.am
new file mode 100644
index 00000000..244f67a0
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/Makefile.am
@@ -0,0 +1,17 @@
+linkdir = $(kde_datadir)/twin/glow-themes/glass_huge
+link_DATA = \
+background.png \
+help.png help_glow.png \
+close.png close_glow.png \
+iconify.png iconify_glow.png \
+maximizeoff.png maximizeoff_glow.png \
+maximizeon.png maximizeon_glow.png \
+stickyon.png stickyon_glow.png \
+stickyoff.png stickyoff_glow.png \
+glass_huge.theme
+
+EXTRA_DIST = $(link_DATA)
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/themes/glass_huge/background.png b/twin-styles/glow/themes/glass_huge/background.png
new file mode 100644
index 00000000..f69e109b
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/background.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/close.png b/twin-styles/glow/themes/glass_huge/close.png
new file mode 100644
index 00000000..3f1c7369
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/close.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/close_glow.png b/twin-styles/glow/themes/glass_huge/close_glow.png
new file mode 100644
index 00000000..00b647dc
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/close_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/glass_huge.theme b/twin-styles/glow/themes/glass_huge/glass_huge.theme
new file mode 100644
index 00000000..d8c41f52
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/glass_huge.theme
@@ -0,0 +1,19 @@
+buttonSize=40,40
+
+backgroundPixmap=background.png
+
+stickyOnPixmap=stickyon.png
+stickyOffPixmap=stickyoff.png
+maximizeOnPixmap=maximizeon.png
+maximizeOffPixmap=maximizeoff.png
+helpPixmap=help.png
+closePixmap=close.png
+iconifyPixmap=iconify.png
+
+stickyOnGlowPixmap=stickyon_glow.png
+stickyOffGlowPixmap=stickyoff_glow.png
+maximizeOnGlowPixmap=maximizeon_glow.png
+maximizeOffGlowPixmap=maximizeoff_glow.png
+helpGlowPixmap=help_glow.png
+closeGlowPixmap=close_glow.png
+iconifyGlowPixmap=iconify_glow.png
diff --git a/twin-styles/glow/themes/glass_huge/help.png b/twin-styles/glow/themes/glass_huge/help.png
new file mode 100644
index 00000000..a391ce94
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/help.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/help_glow.png b/twin-styles/glow/themes/glass_huge/help_glow.png
new file mode 100644
index 00000000..a8237795
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/help_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/iconify.png b/twin-styles/glow/themes/glass_huge/iconify.png
new file mode 100644
index 00000000..b3219692
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/iconify.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/iconify_glow.png b/twin-styles/glow/themes/glass_huge/iconify_glow.png
new file mode 100644
index 00000000..a5950bcc
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/iconify_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/maximizeoff.png b/twin-styles/glow/themes/glass_huge/maximizeoff.png
new file mode 100644
index 00000000..b6ca8c0b
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/maximizeoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/maximizeoff_glow.png b/twin-styles/glow/themes/glass_huge/maximizeoff_glow.png
new file mode 100644
index 00000000..deb8b29f
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/maximizeoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/maximizeon.png b/twin-styles/glow/themes/glass_huge/maximizeon.png
new file mode 100644
index 00000000..bcccef1f
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/maximizeon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/maximizeon_glow.png b/twin-styles/glow/themes/glass_huge/maximizeon_glow.png
new file mode 100644
index 00000000..410296b1
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/maximizeon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/stickyoff.png b/twin-styles/glow/themes/glass_huge/stickyoff.png
new file mode 100644
index 00000000..db79fec8
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/stickyoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/stickyoff_glow.png b/twin-styles/glow/themes/glass_huge/stickyoff_glow.png
new file mode 100644
index 00000000..ff8377b1
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/stickyoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/stickyon.png b/twin-styles/glow/themes/glass_huge/stickyon.png
new file mode 100644
index 00000000..c6b1f6bc
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/stickyon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_huge/stickyon_glow.png b/twin-styles/glow/themes/glass_huge/stickyon_glow.png
new file mode 100644
index 00000000..46d8470b
--- /dev/null
+++ b/twin-styles/glow/themes/glass_huge/stickyon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/CMakeLists.txt b/twin-styles/glow/themes/glass_large/CMakeLists.txt
new file mode 100644
index 00000000..597d15c1
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/CMakeLists.txt
@@ -0,0 +1,22 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ background.png
+ help.png help_glow.png
+ close.png close_glow.png
+ iconify.png iconify_glow.png
+ maximizeoff.png maximizeoff_glow.png
+ maximizeon.png maximizeon_glow.png
+ stickyon.png stickyon_glow.png
+ stickyoff.png stickyoff_glow.png
+ glass_large.theme
+ DESTINATION ${DATA_INSTALL_DIR}/twin/glow-themes/glass_large )
diff --git a/twin-styles/glow/themes/glass_large/Makefile.am b/twin-styles/glow/themes/glass_large/Makefile.am
new file mode 100644
index 00000000..353e4b6f
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/Makefile.am
@@ -0,0 +1,17 @@
+linkdir = $(kde_datadir)/twin/glow-themes/glass_large
+link_DATA = \
+background.png \
+help.png help_glow.png \
+close.png close_glow.png \
+iconify.png iconify_glow.png \
+maximizeoff.png maximizeoff_glow.png \
+maximizeon.png maximizeon_glow.png \
+stickyon.png stickyon_glow.png \
+stickyoff.png stickyoff_glow.png \
+glass_large.theme
+
+EXTRA_DIST = $(link_DATA)
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/themes/glass_large/background.png b/twin-styles/glow/themes/glass_large/background.png
new file mode 100644
index 00000000..860e346f
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/background.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/close.png b/twin-styles/glow/themes/glass_large/close.png
new file mode 100644
index 00000000..4e180281
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/close.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/close_glow.png b/twin-styles/glow/themes/glass_large/close_glow.png
new file mode 100644
index 00000000..59976dd3
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/close_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/glass_large.theme b/twin-styles/glow/themes/glass_large/glass_large.theme
new file mode 100644
index 00000000..1fdf6832
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/glass_large.theme
@@ -0,0 +1,19 @@
+buttonSize=23,23
+
+backgroundPixmap=background.png
+
+stickyOnPixmap=stickyon.png
+stickyOffPixmap=stickyoff.png
+maximizeOnPixmap=maximizeon.png
+maximizeOffPixmap=maximizeoff.png
+helpPixmap=help.png
+closePixmap=close.png
+iconifyPixmap=iconify.png
+
+stickyOnGlowPixmap=stickyon_glow.png
+stickyOffGlowPixmap=stickyoff_glow.png
+maximizeOnGlowPixmap=maximizeon_glow.png
+maximizeOffGlowPixmap=maximizeoff_glow.png
+helpGlowPixmap=help_glow.png
+closeGlowPixmap=close_glow.png
+iconifyGlowPixmap=iconify_glow.png
diff --git a/twin-styles/glow/themes/glass_large/help.png b/twin-styles/glow/themes/glass_large/help.png
new file mode 100644
index 00000000..464a7d49
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/help.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/help_glow.png b/twin-styles/glow/themes/glass_large/help_glow.png
new file mode 100644
index 00000000..21e94cd0
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/help_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/iconify.png b/twin-styles/glow/themes/glass_large/iconify.png
new file mode 100644
index 00000000..c148f4bb
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/iconify.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/iconify_glow.png b/twin-styles/glow/themes/glass_large/iconify_glow.png
new file mode 100644
index 00000000..9daa831b
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/iconify_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/maximizeoff.png b/twin-styles/glow/themes/glass_large/maximizeoff.png
new file mode 100644
index 00000000..40580530
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/maximizeoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/maximizeoff_glow.png b/twin-styles/glow/themes/glass_large/maximizeoff_glow.png
new file mode 100644
index 00000000..164aadbf
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/maximizeoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/maximizeon.png b/twin-styles/glow/themes/glass_large/maximizeon.png
new file mode 100644
index 00000000..34e9425a
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/maximizeon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/maximizeon_glow.png b/twin-styles/glow/themes/glass_large/maximizeon_glow.png
new file mode 100644
index 00000000..6038c045
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/maximizeon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/stickyoff.png b/twin-styles/glow/themes/glass_large/stickyoff.png
new file mode 100644
index 00000000..a29cde1a
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/stickyoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/stickyoff_glow.png b/twin-styles/glow/themes/glass_large/stickyoff_glow.png
new file mode 100644
index 00000000..76c4781e
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/stickyoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/stickyon.png b/twin-styles/glow/themes/glass_large/stickyon.png
new file mode 100644
index 00000000..c805faf4
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/stickyon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_large/stickyon_glow.png b/twin-styles/glow/themes/glass_large/stickyon_glow.png
new file mode 100644
index 00000000..7a6b9ec4
--- /dev/null
+++ b/twin-styles/glow/themes/glass_large/stickyon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/CMakeLists.txt b/twin-styles/glow/themes/glass_verylarge/CMakeLists.txt
new file mode 100644
index 00000000..5fd50a91
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/CMakeLists.txt
@@ -0,0 +1,22 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ background.png
+ help.png help_glow.png
+ close.png close_glow.png
+ iconify.png iconify_glow.png
+ maximizeoff.png maximizeoff_glow.png
+ maximizeon.png maximizeon_glow.png
+ stickyon.png stickyon_glow.png
+ stickyoff.png stickyoff_glow.png
+ glass_verylarge.theme
+ DESTINATION ${DATA_INSTALL_DIR}/twin/glow-themes/glass_verylarge )
diff --git a/twin-styles/glow/themes/glass_verylarge/Makefile.am b/twin-styles/glow/themes/glass_verylarge/Makefile.am
new file mode 100644
index 00000000..ab67c5db
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/Makefile.am
@@ -0,0 +1,17 @@
+linkdir = $(kde_datadir)/twin/glow-themes/glass_verylarge
+link_DATA = \
+background.png \
+help.png help_glow.png \
+close.png close_glow.png \
+iconify.png iconify_glow.png \
+maximizeoff.png maximizeoff_glow.png \
+maximizeon.png maximizeon_glow.png \
+stickyon.png stickyon_glow.png \
+stickyoff.png stickyoff_glow.png \
+glass_verylarge.theme
+
+EXTRA_DIST = $(link_DATA)
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/themes/glass_verylarge/background.png b/twin-styles/glow/themes/glass_verylarge/background.png
new file mode 100644
index 00000000..ed032232
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/background.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/close.png b/twin-styles/glow/themes/glass_verylarge/close.png
new file mode 100644
index 00000000..15dc4b50
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/close.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/close_glow.png b/twin-styles/glow/themes/glass_verylarge/close_glow.png
new file mode 100644
index 00000000..9207e37e
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/close_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/glass_verylarge.theme b/twin-styles/glow/themes/glass_verylarge/glass_verylarge.theme
new file mode 100644
index 00000000..36368a8d
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/glass_verylarge.theme
@@ -0,0 +1,19 @@
+buttonSize=30,30
+
+backgroundPixmap=background.png
+
+stickyOnPixmap=stickyon.png
+stickyOffPixmap=stickyoff.png
+maximizeOnPixmap=maximizeon.png
+maximizeOffPixmap=maximizeoff.png
+helpPixmap=help.png
+closePixmap=close.png
+iconifyPixmap=iconify.png
+
+stickyOnGlowPixmap=stickyon_glow.png
+stickyOffGlowPixmap=stickyoff_glow.png
+maximizeOnGlowPixmap=maximizeon_glow.png
+maximizeOffGlowPixmap=maximizeoff_glow.png
+helpGlowPixmap=help_glow.png
+closeGlowPixmap=close_glow.png
+iconifyGlowPixmap=iconify_glow.png
diff --git a/twin-styles/glow/themes/glass_verylarge/help.png b/twin-styles/glow/themes/glass_verylarge/help.png
new file mode 100644
index 00000000..3a2d0c9d
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/help.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/help_glow.png b/twin-styles/glow/themes/glass_verylarge/help_glow.png
new file mode 100644
index 00000000..29e6edf9
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/help_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/iconify.png b/twin-styles/glow/themes/glass_verylarge/iconify.png
new file mode 100644
index 00000000..2d760e3d
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/iconify.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/iconify_glow.png b/twin-styles/glow/themes/glass_verylarge/iconify_glow.png
new file mode 100644
index 00000000..01f474e5
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/iconify_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/maximizeoff.png b/twin-styles/glow/themes/glass_verylarge/maximizeoff.png
new file mode 100644
index 00000000..4224aa05
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/maximizeoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/maximizeoff_glow.png b/twin-styles/glow/themes/glass_verylarge/maximizeoff_glow.png
new file mode 100644
index 00000000..9327994a
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/maximizeoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/maximizeon.png b/twin-styles/glow/themes/glass_verylarge/maximizeon.png
new file mode 100644
index 00000000..2d90482f
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/maximizeon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/maximizeon_glow.png b/twin-styles/glow/themes/glass_verylarge/maximizeon_glow.png
new file mode 100644
index 00000000..3b9a6bf4
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/maximizeon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/stickyoff.png b/twin-styles/glow/themes/glass_verylarge/stickyoff.png
new file mode 100644
index 00000000..a2c26583
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/stickyoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/stickyoff_glow.png b/twin-styles/glow/themes/glass_verylarge/stickyoff_glow.png
new file mode 100644
index 00000000..c6e57e21
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/stickyoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/stickyon.png b/twin-styles/glow/themes/glass_verylarge/stickyon.png
new file mode 100644
index 00000000..56cde081
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/stickyon.png
Binary files differ
diff --git a/twin-styles/glow/themes/glass_verylarge/stickyon_glow.png b/twin-styles/glow/themes/glass_verylarge/stickyon_glow.png
new file mode 100644
index 00000000..f3778479
--- /dev/null
+++ b/twin-styles/glow/themes/glass_verylarge/stickyon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/CMakeLists.txt b/twin-styles/glow/themes/square/CMakeLists.txt
new file mode 100644
index 00000000..0343fa2a
--- /dev/null
+++ b/twin-styles/glow/themes/square/CMakeLists.txt
@@ -0,0 +1,22 @@
+#################################################
+#
+# (C) 2011 Golubev Alexander
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES
+ background.png
+ help.png help_glow.png
+ close.png close_glow.png
+ iconify.png iconify_glow.png
+ maximizeoff.png maximizeoff_glow.png
+ maximizeon.png maximizeon_glow.png
+ stickyon.png stickyon_glow.png
+ stickyoff.png stickyoff_glow.png
+ square.theme
+ DESTINATION ${DATA_INSTALL_DIR}/twin/glow-themes/square )
diff --git a/twin-styles/glow/themes/square/Makefile.am b/twin-styles/glow/themes/square/Makefile.am
new file mode 100644
index 00000000..01193d98
--- /dev/null
+++ b/twin-styles/glow/themes/square/Makefile.am
@@ -0,0 +1,17 @@
+linkdir = $(kde_datadir)/twin/glow-themes/square
+link_DATA = \
+background.png \
+help.png help_glow.png \
+close.png close_glow.png \
+iconify.png iconify_glow.png \
+maximizeoff.png maximizeoff_glow.png \
+maximizeon.png maximizeon_glow.png \
+stickyon.png stickyon_glow.png \
+stickyoff.png stickyoff_glow.png \
+square.theme
+
+EXTRA_DIST = $(link_DATA)
+
+###KMAKE-start (don't edit or delete this block)
+
+###KMAKE-end
diff --git a/twin-styles/glow/themes/square/background.png b/twin-styles/glow/themes/square/background.png
new file mode 100644
index 00000000..225af3a5
--- /dev/null
+++ b/twin-styles/glow/themes/square/background.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/close.png b/twin-styles/glow/themes/square/close.png
new file mode 100644
index 00000000..898a368a
--- /dev/null
+++ b/twin-styles/glow/themes/square/close.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/close_glow.png b/twin-styles/glow/themes/square/close_glow.png
new file mode 100644
index 00000000..4cd1f1cb
--- /dev/null
+++ b/twin-styles/glow/themes/square/close_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/help.png b/twin-styles/glow/themes/square/help.png
new file mode 100644
index 00000000..c3ed65ee
--- /dev/null
+++ b/twin-styles/glow/themes/square/help.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/help_glow.png b/twin-styles/glow/themes/square/help_glow.png
new file mode 100644
index 00000000..4cd1f1cb
--- /dev/null
+++ b/twin-styles/glow/themes/square/help_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/iconify.png b/twin-styles/glow/themes/square/iconify.png
new file mode 100644
index 00000000..94fc6338
--- /dev/null
+++ b/twin-styles/glow/themes/square/iconify.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/iconify_glow.png b/twin-styles/glow/themes/square/iconify_glow.png
new file mode 100644
index 00000000..4cd1f1cb
--- /dev/null
+++ b/twin-styles/glow/themes/square/iconify_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/maximizeoff.png b/twin-styles/glow/themes/square/maximizeoff.png
new file mode 100644
index 00000000..e60cdc97
--- /dev/null
+++ b/twin-styles/glow/themes/square/maximizeoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/maximizeoff_glow.png b/twin-styles/glow/themes/square/maximizeoff_glow.png
new file mode 100644
index 00000000..4cd1f1cb
--- /dev/null
+++ b/twin-styles/glow/themes/square/maximizeoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/maximizeon.png b/twin-styles/glow/themes/square/maximizeon.png
new file mode 100644
index 00000000..3976411f
--- /dev/null
+++ b/twin-styles/glow/themes/square/maximizeon.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/maximizeon_glow.png b/twin-styles/glow/themes/square/maximizeon_glow.png
new file mode 100644
index 00000000..4cd1f1cb
--- /dev/null
+++ b/twin-styles/glow/themes/square/maximizeon_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/square.theme b/twin-styles/glow/themes/square/square.theme
new file mode 100644
index 00000000..26f00feb
--- /dev/null
+++ b/twin-styles/glow/themes/square/square.theme
@@ -0,0 +1,19 @@
+buttonSize=17,17
+
+backgroundPixmap=background.png
+
+stickyOnPixmap=stickyon.png
+stickyOffPixmap=stickyoff.png
+maximizeOnPixmap=maximizeon.png
+maximizeOffPixmap=maximizeoff.png
+helpPixmap=help.png
+closePixmap=close.png
+iconifyPixmap=iconify.png
+
+stickyOnGlowPixmap=stickyon_glow.png
+stickyOffGlowPixmap=stickyoff_glow.png
+maximizeOnGlowPixmap=maximizeon_glow.png
+maximizeOffGlowPixmap=maximizeoff_glow.png
+helpGlowPixmap=help_glow.png
+closeGlowPixmap=close_glow.png
+iconifyGlowPixmap=iconify_glow.png
diff --git a/twin-styles/glow/themes/square/stickyoff.png b/twin-styles/glow/themes/square/stickyoff.png
new file mode 100644
index 00000000..3600e326
--- /dev/null
+++ b/twin-styles/glow/themes/square/stickyoff.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/stickyoff_glow.png b/twin-styles/glow/themes/square/stickyoff_glow.png
new file mode 100644
index 00000000..4cd1f1cb
--- /dev/null
+++ b/twin-styles/glow/themes/square/stickyoff_glow.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/stickyon.png b/twin-styles/glow/themes/square/stickyon.png
new file mode 100644
index 00000000..a84941a3
--- /dev/null
+++ b/twin-styles/glow/themes/square/stickyon.png
Binary files differ
diff --git a/twin-styles/glow/themes/square/stickyon_glow.png b/twin-styles/glow/themes/square/stickyon_glow.png
new file mode 100644
index 00000000..4cd1f1cb
--- /dev/null
+++ b/twin-styles/glow/themes/square/stickyon_glow.png
Binary files differ