summaryrefslogtreecommitdiffstats
path: root/deco
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-21 20:35:05 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-21 20:35:05 +0100
commit066aaaeb73a8bb908b1c0d8c45f110b2f799f7ce (patch)
tree4cb26eb8ace976f7d0c8607dc2d3de2b5107670c /deco
downloadtde-style-baghira-066aaaeb73a8bb908b1c0d8c45f110b2f799f7ce.tar.gz
tde-style-baghira-066aaaeb73a8bb908b1c0d8c45f110b2f799f7ce.zip
Initial import of baghira 0.8
Diffstat (limited to 'deco')
-rw-r--r--deco/Doxyfile247
-rw-r--r--deco/Makefile.am28
-rw-r--r--deco/baghira.desktop5
-rw-r--r--deco/baghiraclient.cc2636
-rw-r--r--deco/baghiraclient.h445
-rw-r--r--deco/config/Makefile.am23
-rw-r--r--deco/config/aquariusbutton.cc162
-rw-r--r--deco/config/aquariusbutton.h37
-rw-r--r--deco/config/baghiraconfig.cc729
-rw-r--r--deco/config/baghiraconfig.cc.new730
-rw-r--r--deco/config/baghiraconfig.h145
-rw-r--r--deco/config/baghiraconfig.h.new149
-rw-r--r--deco/config/colorpicker.cc124
-rw-r--r--deco/config/colorpicker.h44
-rw-r--r--deco/config/configdialog.ui3088
-rw-r--r--deco/config/configdialog.ui.new398
-rw-r--r--deco/config/customdecosettings.ui586
-rwxr-xr-xdeco/config/generatePixmaps.sh10
-rwxr-xr-xdeco/generatePixmaps.sh28
-rw-r--r--deco/masks.h81
20 files changed, 9695 insertions, 0 deletions
diff --git a/deco/Doxyfile b/deco/Doxyfile
new file mode 100644
index 0000000..f90d99c
--- /dev/null
+++ b/deco/Doxyfile
@@ -0,0 +1,247 @@
+# Doxyfile 1.3.5-KDevelop
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = baghira_deco.kdevelop
+PROJECT_NUMBER = $VERSION$
+OUTPUT_DIRECTORY =
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = /home/thomas/Desktop/baghira-deco-2/client
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.C \
+ *.H \
+ *.tlh \
+ *.diff \
+ *.patch \
+ *.moc \
+ *.xpm \
+ *.dox
+RECURSIVE = yes
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = YES
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = yes
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 1000
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
diff --git a/deco/Makefile.am b/deco/Makefile.am
new file mode 100644
index 0000000..6d435f2
--- /dev/null
+++ b/deco/Makefile.am
@@ -0,0 +1,28 @@
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = config
+
+KDE_CXXFLAGS = -DQT_PLUGIN
+
+INCLUDES = $(all_includes) -I$(kde_includes)/kwin
+
+kwindir = $(kde_datadir)/kwin/
+kwin_DATA = baghira.desktop
+
+EXTRA_DIST = $(kwin_DATA) images
+
+noinst_HEADERS = baghiraclient.h pixmaps.h masks.h
+
+kde_module_LTLIBRARIES = kwin3_baghira.la
+kwin3_baghira_la_SOURCES = baghiraclient.cc
+kwin3_baghira_la_LIBADD = $(kde_libraries)/libkdecorations.la
+kwin3_baghira_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -lkdecore -module
+kwin3_baghira_la_METASOURCES = AUTO
+
+DISTCLEANFILES = $(kwin3_baghira_la_METASOURCES)
+
+pixmaps.h: $(srcdir)/generatePixmaps.sh
+ $(SHELL) $(srcdir)/generatePixmaps.sh $(top_srcdir)
+CLEANFILES = pixmaps.h
+baghiraclient.lo: pixmaps.h
+
diff --git a/deco/baghira.desktop b/deco/baghira.desktop
new file mode 100644
index 0000000..1514386
--- /dev/null
+++ b/deco/baghira.desktop
@@ -0,0 +1,5 @@
+# KDE Desktop Entry
+[Desktop Entry]
+Encoding=UTF-8
+Name=Baghira
+X-KDE-Library=kwin3_baghira
diff --git a/deco/baghiraclient.cc b/deco/baghiraclient.cc
new file mode 100644
index 0000000..30d6c8d
--- /dev/null
+++ b/deco/baghiraclient.cc
@@ -0,0 +1,2636 @@
+//////////////////////////////////////////////////////////////////////////////
+// baghiraclient.h
+// -------------------
+// Baghira window decoration for KDE
+// -------------------
+// Copyright (c) 2004, 2005 Thomas Lübking
+// Please see the header file for copyright and license information.
+//////////////////////////////////////////////////////////////////////////////
+
+// #include <kconfig.h>
+#include <kglobal.h>
+#include <kglobalsettings.h>
+#include <kimageeffect.h>
+#include <klocale.h>
+#include <kpixmapeffect.h>
+#include <kwin.h>
+#include <kwinmodule.h>
+#include <qapplication.h>
+#include <qbitmap.h>
+#include <qcursor.h>
+#include <qdir.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qpainter.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+#include <qsettings.h>
+#include <stdio.h>
+
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/shape.h>
+#include "baghiraclient.h"
+#include "pixmaps.h"
+#include "masks.h"
+#include "config.h"
+
+#define COLOR_SPACE(R,G,B) \
+ if ( R < 0 ) R = 0; else if ( R > 255 ) R = 255; \
+ if ( G < 0 ) G = 0; else if ( G > 255 ) G = 255; \
+ if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255;
+
+#define SATURATION_COLOR(R,G,B) \
+ grey = (299 * R + 587 * G + 114 * B) / 1000; \
+ delta = 255 - grey; \
+ grey = (grey *(10 - 5)) / 10; \
+ iGrey = 255 - grey;\
+ destR = (iGrey * (srcR - delta) + grey * R) / 255; \
+ destG = (iGrey * (srcG - delta) + grey * G) / 255; \
+ destB = (iGrey * (srcB - delta) + grey * B) / 255;
+
+#define CLAMP(x,l,u) x < l ? l :\
+ x > u ? u :\
+ x
+
+#define SATURATION_COLOR2(S,R,G,B,cR,cG,cB) \
+ int max = 255+0.65*(100-S); \
+ destR = CLAMP((cR + R - 128), 0, max); \
+ destG = CLAMP((cG + G - 128), 0, max); \
+ destB = CLAMP((cB + B - 128), 0, max); \
+ destR = (S*destR + (100-S)*R)/100; \
+ destG = (S*destG + (100-S)*G)/100; \
+ destB = (S*destB + (100-S)*B)/100;
+
+using namespace Baghira;
+
+static const int BUTTONSIZE = 15;
+static const int MENUBUTTONWIDTH = 20;
+static const int DECOSIZE = 8;
+int TITLESIZE;// = 26;
+static const int TITLESIZESMALL = 18;
+static const int MARGIN = 6;
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraFactory Class //
+//////////////////////////////////////////////////////////////////////////////
+
+bool BaghiraFactory::initialized_ = false;
+Baghira::TitlebarType BaghiraFactory::effect_[5][2];
+Qt::AlignmentFlags BaghiraFactory::titlealign_;
+QColor BaghiraFactory::colors_[5][ ColorTypeCount ][ 2 ];
+KPixmap BaghiraFactory::pix_[5][ PixmapTypeCount ][ 2 ][ 2 ];
+int BaghiraFactory::bordersize_[5] = {0,0,6,0,0};//{BorderTiny, BorderTiny, BorderVeryHuge};
+QPixmap BaghiraFactory::ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2];
+QColor BaghiraFactory::brushedMetalColor;
+QColor BaghiraFactory::ButtonColor_[ButtonTypeAmount+1];
+QPixmap BaghiraFactory::nostalgia_[5][3][2];
+int BaghiraFactory::contrast_;
+int BaghiraFactory::_3DImpact_[5];
+int BaghiraFactory::LineImpact_[5];
+bool BaghiraFactory::bgStipple_;
+bool BaghiraFactory::comicFrame_;
+bool BaghiraFactory::addAutoSpacing_;
+bool BaghiraFactory::maxResizable_;
+bool BaghiraFactory::shape_ul[5];
+bool BaghiraFactory::shape_ur[5];
+bool BaghiraFactory::shape_ll[5];
+bool BaghiraFactory::shape_lr[5];
+bool BaghiraFactory::allowEasyClosing_;
+bool BaghiraFactory::resizeGrip_;
+uint BaghiraFactory::defaultMode_;
+bool BaghiraFactory::drawIcon_[5];
+bool BaghiraFactory::tintBrush_;
+bool BaghiraFactory::showTitle_;
+QColor BaghiraFactory::brushTint;
+int BaghiraFactory::minimumTitleHeight_;
+ButtonStyle BaghiraFactory::buttonStyle_[5];
+
+QBitmap BaghiraFactory::helpMask;
+QBitmap BaghiraFactory::jaguarDownMask;
+QBitmap BaghiraFactory::jaguarMenuDownMask;
+QBitmap BaghiraFactory::jaguarMenuMask;
+QBitmap BaghiraFactory::jaguarMask;
+QBitmap BaghiraFactory::milkMenuDownMask;
+QBitmap BaghiraFactory::milkMenuMask;
+QBitmap BaghiraFactory::milkMask;
+QBitmap BaghiraFactory::pantherMenuMask;
+QBitmap BaghiraFactory::pantherMask;
+QBitmap BaghiraFactory::milkDownMask;
+QBitmap BaghiraFactory::arrowUp;
+QBitmap BaghiraFactory::arrowDown;
+DeMaximizer BaghiraFactory::deMaximizer_;
+bool BaghiraFactory::fullSpec_;
+bool BaghiraFactory::noModalDeco_;
+bool BaghiraFactory::delAppname_;
+
+Atom baghira_deco_design = XInternAtom(qt_xdisplay(), "BAGHIRA_DECO_DESIGN", False);
+
+extern "C" KDecorationFactory* create_factory() {
+ return new Baghira::BaghiraFactory();
+}
+
+DeMaximizer::DeMaximizer() : QWidget(0, "deMaximizer", Qt::WType_TopLevel | Qt::WStyle_NoBorder | Qt::WX11BypassWM )
+{
+ client_ = 0L;
+ setFixedSize(16,16);
+ setMouseTracking(TRUE);
+ setAutoMask(TRUE);
+ move(QApplication::desktop()->availableGeometry().right()-17,QApplication::desktop()->availableGeometry().top()+2);
+ setBackgroundMode( NoBackground );
+// setBackgroundMode (Qt::X11ParentRelative);
+// setPaletteBackgroundColor(Qt::green);
+}
+
+void DeMaximizer::mouseReleaseEvent( QMouseEvent *)
+{
+ hasMouse()?setState(1):setState(0);
+ if (client_) client_->demaxButtonPressed();
+}
+
+void DeMaximizer::mousePressEvent ( QMouseEvent *)
+{
+ setState(2);
+}
+
+void DeMaximizer::enterEvent ( QEvent *)
+{
+ setState(1);
+}
+
+void DeMaximizer::leaveEvent ( QEvent *)
+{
+ setState(0);
+}
+
+void DeMaximizer::setState(int i)
+{
+ erase();
+ QPainter p(this);
+ p.drawPixmap(0,0,pixmap[i]);
+ p.end();
+}
+
+void DeMaximizer::setPixmap(int i, QImage &image )
+{
+ pixmap[i] = QPixmap(image);
+}
+
+
+void DeMaximizer::setClient(BaghiraClient *client)
+{
+ if (client_)
+ {
+ QObject::disconnect ( client_, SIGNAL(hide()), this, SLOT(hide()) );
+ client_ = 0L;
+ }
+ if (client)
+ {
+ client_ = client;
+ connect ( client_, SIGNAL(hide()), SLOT(hide()) );
+ setState(0);
+ }
+// repaint();
+}
+
+#if KDE_IS_VERSION(3,3,91)
+//////////////////////////////////////////////////////////////////////////////
+// ResizeHandle()
+// ---------------
+// Constructor
+ResizeHandle::ResizeHandle(BaghiraClient * parent) : QWidget(parent->widget(), 0, 0)
+{
+ if (!parent->widget())
+ return;
+ client = parent;
+ setCursor(QCursor(Qt::SizeFDiagCursor));
+ setFixedSize(16,16);
+ updateLook(FALSE);
+ WId root, daddy = 0;
+ WId *kids = 0L;
+ uint numKids = 0;
+ XQueryTree(qt_xdisplay(), parent->windowId(), &root, &daddy, &kids, &numKids);
+ if (daddy)
+ XReparentWindow( qt_xdisplay(), winId(), daddy, 0, 0 );
+ else return;
+ move(client->width()-2*BaghiraFactory::borderSize(parent->currentStyle)-16,client->height()-client->titleheight_-16);
+ shape();
+ parent->widget()->installEventFilter(this);
+ raise();
+ show();
+}
+
+void ResizeHandle::updateLook(bool rp)
+{
+ pix = QPixmap(16,16);
+ QPainter p(&pix);
+ p.fillRect(pix.rect(), BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? BaghiraFactory::BrushedMetalColor().light(110):paletteBackgroundColor());
+ p.setPen( BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? Qt::black:paletteForegroundColor() );
+ p.drawLine(0,16,16,0);
+ p.drawLine(4,16,16,4);
+ p.drawLine(8,16,16,8);
+ p.drawLine(12,16,16,12);
+ p.end();
+ setPaletteBackgroundPixmap(pix);
+ if (rp) repaint();
+}
+
+void ResizeHandle::shape()
+{
+ XRectangle* xrects = new XRectangle[16];
+ for (int i = 0; i < 16; i++)
+ {
+ xrects[ i ].x = 15-i;
+ xrects[ i ].y = i;
+ xrects[ i ].width = i+1;
+ xrects[ i ].height = 1;
+ }
+ XShapeCombineRectangles( qt_xdisplay(), winId(), ShapeBounding, 0, 0,
+ xrects, 16, ShapeSet, 0 );
+ delete[] xrects;
+}
+
+bool ResizeHandle::eventFilter(QObject *obj, QEvent *e)
+{
+ if ( obj != parent() )
+ return false;
+ if ( e->type() == QEvent::Resize)
+ {
+ if (client->maximizeMode() == BaghiraClient::MaximizeFull)
+ move(client->width() - 16, client->height() - client->titleheight_ - 16);
+ else
+ move(client->width() - 2*BaghiraFactory::borderSize(client->currentStyle) - 16, client->height() - client->titleheight_ - BaghiraFactory::borderSize(client->currentStyle) - 16);
+// shape();
+ return FALSE;
+ }
+ return FALSE;
+}
+
+void ResizeHandle::mousePressEvent ( QMouseEvent * )
+{
+ client->performWindowOperation(/*Unrestricted*/KDecoration::ResizeOp);
+}
+void ResizeHandle::mouseReleaseEvent ( QMouseEvent * )
+{
+ client->performWindowOperation(KDecoration::NoOp);
+ repaint(TRUE);
+}
+void ResizeHandle::paintEvent ( QPaintEvent * )
+{
+ QPainter p(this);
+ p.drawPixmap(0,0,pix);
+}
+
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraFactory()
+// ---------------
+// Constructor
+
+BaghiraFactory::BaghiraFactory() {
+ helpMask = QBitmap( 14, 15, help_bits, true );
+ jaguarDownMask = QBitmap( 14, 15, jaguar2_bits, true );
+ jaguarMenuDownMask = QBitmap( 20, 15, jaguar_menu_down_bits, true );
+ jaguarMenuMask = QBitmap( 20, 15, jaguar_menu_bits, true );
+ jaguarMask = QBitmap( 14, 15, jaguar_bits, true );
+ milkMenuDownMask = QBitmap( 20, 15, milk_menu_down_bits, true );
+ milkMenuMask = QBitmap( 20, 15, milk_menu_bits, true );
+ milkMask = QBitmap( 14, 15, milk_bits, true );
+ pantherMenuMask = QBitmap( 20, 15, panther_menu_bits, true );
+ pantherMask = QBitmap( 14, 15, panther_bits, true );
+ milkDownMask = QBitmap( 14, 15, milk_pressed_bits, true );
+ arrowUp = QBitmap( 8, 4, arrowUp_bits, true );
+ arrowUp.setMask( arrowUp );
+ arrowDown = QBitmap( 8, 4, arrowDown_bits, true );
+ arrowDown.setMask( arrowDown );
+ readConfig();
+ createPixmaps();
+ initialized_ = true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// ~BaghiraFactory()
+// ----------------
+// Destructor
+
+BaghiraFactory::~BaghiraFactory()
+{
+ deMaximizer_.setClient(NULL);
+ initialized_ = false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// createDecoration()
+// ------------------
+// Create the decoration
+
+KDecoration* BaghiraFactory::createDecoration( KDecorationBridge* b ) {
+ return new BaghiraClient( b, this );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// reset()
+// -------
+// Reset the handler. Returns true if decorations need to be remade
+
+QString BaghiraFactory::indexedString(QString s, int i){
+ QString result;
+ result.setNum(i+1);
+ result.prepend("_");
+ result.prepend(s);
+// qWarning("%s",result.ascii());
+ return result;
+}
+
+bool BaghiraFactory::reset( unsigned long changed ) {
+ initialized_ = false;
+ changed |= readConfig();
+ if ( changed & ( SettingColors | SettingDecoration | SettingBorder ) ) {
+ createPixmaps();
+ }
+ initialized_ = true;
+
+ if ( changed & ( SettingColors | SettingDecoration | SettingFont |
+ SettingButtons | SettingBorder ) ) {
+ return true;
+ } else {
+ resetDecorations( changed );
+ return false;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// readConfig()
+// ------------
+// Read in the configuration file
+
+unsigned long BaghiraFactory::readConfig() {
+
+ QSettings config;
+ config.beginGroup("/baghira/Style");
+// KConfig config( "baghirarc" );
+// config.setGroup( "Style" );
+ bgStipple_ = config.readBoolEntry( "Design_StippleBackground", false);
+ contrast_ = config.readNumEntry( "Design_StippleContrast", 30 );
+ tintBrush_ = config.readBoolEntry( "Colors_TintBrushedMetal", false );
+ if (tintBrush_)
+ brushTint.setRgb( config.readNumEntry( "Colors_BrushTint"));
+
+ QColor oldcolor;
+ unsigned long changed = 0;
+ oldcolor = colors_[3][ Baghira::ColorTitleBar ][ false ];
+ colors_[3][ Baghira::ColorTitleBar ][ false ] = qApp->palette().active().background();
+ if ( oldcolor != colors_[3][ Baghira::ColorTitleBar ][ false ] )
+ changed |= SettingColors;
+
+ oldcolor = colors_[3][ Baghira::ColorTitleBlend ][ false ];
+ colors_[3][ Baghira::ColorTitleBlend ][ false ] = colors_[3][ Baghira::ColorTitleBar ][ false ].dark(100 + config.readNumEntry( "Design_StippleContrast", 3));
+ if ( oldcolor != colors_[3][ Baghira::ColorTitleBlend ][ false ] )
+ changed |= SettingColors;
+
+ config.endGroup();
+ config.beginGroup( "/baghira/Deco" );
+
+
+ // common settings
+
+ bool oldNoModalDeco = noModalDeco_;
+ noModalDeco_ = config.readBoolEntry( "NoModalDeco", false );
+ if (oldNoModalDeco != noModalDeco_)
+ changed |= SettingDecoration;
+
+ bool oldDelAppname = delAppname_;
+ delAppname_ = config.readBoolEntry( "RemoveAppname", true );
+ if (oldDelAppname != delAppname_)
+ changed |= SettingDecoration;
+
+ int oldMinTH = minimumTitleHeight_;
+ minimumTitleHeight_ = (ButtonStyle) config.readNumEntry( "minimumTitleHeight", 18 );
+ if ( oldMinTH != minimumTitleHeight_ )
+ {
+ QFontMetrics fm(options()->font(true, false));
+ TITLESIZE = QMAX(minimumTitleHeight_, fm.height());
+ changed |= SettingFont;
+ changed |= SettingDecoration;
+ }
+
+ bool allowEasyClosing__ = allowEasyClosing_;
+ allowEasyClosing_ = config.readBoolEntry( "allowEasyClosing", false );
+ if ( allowEasyClosing__ != allowEasyClosing_ )
+ changed |= SettingDecoration;
+
+ bool resizeGrip__ = resizeGrip_;
+ resizeGrip_ = config.readBoolEntry( "ResizeGrip", false );
+ if ( resizeGrip__ != resizeGrip_ )
+ changed |= SettingDecoration;
+
+ bool defaultMode__ = defaultMode_;
+ defaultMode_ = config.readNumEntry( "defaultMode", 1 );
+ if ( defaultMode__ != defaultMode_ )
+ changed |= SettingDecoration;
+
+ Qt::AlignmentFlags oldalign = titlealign_;
+ QString value = config.readEntry( "TitleAlignment", "AlignHCenter" );
+ showTitle_ = TRUE;
+ if ( value == "AlignLeft" )
+ titlealign_ = Qt::AlignLeft;
+ else if ( value == "AlignHCenter" )
+ titlealign_ = Qt::AlignHCenter;
+ else if ( value == "AlignRight" )
+ titlealign_ = Qt::AlignRight;
+ else if ( value == "noTitle" )
+ {
+ showTitle_ = FALSE;
+ titlealign_ = Qt::AlignAuto;
+ }
+ if ( oldalign != titlealign_ )
+ changed |= SettingFont;
+
+ bool oldComic = comicFrame_;
+ comicFrame_ = config.readBoolEntry( "DrawComicFrame", false );
+ if ( oldComic != comicFrame_ )
+ changed |= SettingBorder; changed |= SettingDecoration;
+
+ bool oldAutoSpacing = addAutoSpacing_;
+ addAutoSpacing_ = config.readBoolEntry( "AddAutoSpacing", true );
+ if ( oldAutoSpacing != addAutoSpacing_ )
+ changed |= SettingDecoration;
+
+ bool oldMaxResizable = maxResizable_;
+ maxResizable_ = config.readBoolEntry( "MaxResizable", true );
+ if ( oldMaxResizable != maxResizable_ )
+ changed |= SettingDecoration;
+
+ bool oldSpec = fullSpec_;
+ fullSpec_ = config.readBoolEntry( "FullSpec", false );
+ if ( oldSpec != fullSpec_ )
+ changed |= SettingDecoration;
+
+ // custom settings
+
+ for (int i = 0; i < 5; i++){
+
+ int oldbordersize = bordersize_[i];
+ bordersize_[i] = config.readNumEntry( indexedString("BorderSize",i), i == 2 ? 6 : 0 );
+ if ( oldbordersize != bordersize_[i] )
+ changed |= SettingBorder;
+
+ ButtonStyle oldButtons = buttonStyle_[i];
+ buttonStyle_[i] = (ButtonStyle) config.readNumEntry( indexedString("ButtonStyle",i), i == 0 ? 1 : 0 );
+ if ( oldButtons != buttonStyle_[i] )
+ changed |= SettingDecoration;
+
+
+ bool oldShUL = shape_ul[i];
+ shape_ul[i] = config.readBoolEntry( indexedString("ShapeUL",i), true );
+ if ( oldShUL != shape_ul[i] ){
+ changed |= SettingBorder; changed |= SettingDecoration;
+ }
+
+ bool oldShUR = shape_ur[i];
+ shape_ur[i] = config.readBoolEntry( indexedString("ShapeUR",i), true );
+ if ( oldShUR != shape_ur[i] ){
+ changed |= SettingBorder; changed |= SettingDecoration;
+ }
+
+ bool oldShLL = shape_ll[i];
+ shape_ll[i] = config.readBoolEntry( indexedString("ShapeLL",i), i == 2 );
+ if ( oldShLL != shape_ll[i] ){
+ changed |= SettingBorder; changed |= SettingDecoration;
+ }
+
+ bool oldShLR = shape_lr[i];
+ shape_lr[i] = config.readBoolEntry( indexedString("ShapeLR",i), i == 2 );
+ if ( oldShLR != shape_lr[i] ){
+ changed |= SettingBorder; changed |= SettingDecoration;
+ }
+
+
+ bool oldDrawIcon_ = drawIcon_[i];
+ drawIcon_[i] = config.readBoolEntry( indexedString("drawIcon",i), true );
+ if ( oldDrawIcon_ = drawIcon_[i] )
+ changed |= SettingFont;
+ changed |= SettingDecoration;
+
+ if (i != 3)
+ {
+ Baghira::TitlebarType oldeffect = effect_[i][1];
+ effect_[i][1] = ( Baghira::TitlebarType ) config.readNumEntry( indexedString("TitleEffect",i), i == 0 ? Baghira::Stipples : (i == 1 || i == 4) ? Baghira::Gradient : Baghira::Brushed);
+ // qWarning("%d",effect_[i]);
+ if ( oldeffect != effect_[i][1] )
+ changed |= SettingDecoration;
+
+ oldeffect = effect_[i][0];
+ effect_[i][0] = ( Baghira::TitlebarType ) config.readNumEntry( indexedString("inactiveTitleEffect",i), i == 0 ? Baghira::Stipples : (i == 1 || i == 4) ? Baghira::Gradient : Baghira::Brushed);
+ // qWarning("%d",effect_[i]);
+ if ( oldeffect != effect_[i][0] )
+ changed |= SettingDecoration;
+
+ int oldLineImpact = LineImpact_[i];
+ LineImpact_[i] = config.readNumEntry( indexedString("LineImpact",i), i == 2 ? 0 : 40 );
+ if ( oldLineImpact != LineImpact_[i] )
+ changed |= SettingDecoration;
+
+ oldcolor = colors_[i][ Baghira::ColorTitleBar ][ false ];
+ colors_[i][ Baghira::ColorTitleBar ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor1",i), i == 0 ? QColor(204,214,230).rgb() : i == 1 ? QColor(246,242,246).rgb() : i == 3 ? QColor(200,200,200).rgb() : QColor(230,230,230).rgb()));
+ if ( oldcolor != colors_[i][ Baghira::ColorTitleBar ][ false ] )
+ changed |= SettingColors;
+
+ oldcolor = colors_[i][ Baghira::ColorTitleBlend ][ false ];
+ colors_[i][ Baghira::ColorTitleBlend ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor2",i), i == 0 ? QColor(194,196,211).rgb() : i == 1 ? QColor(238,238,238).rgb() : i == 3 ? QColor(150,150,150).rgb() : QColor(250,250,250).rgb()));
+ if ( oldcolor != colors_[i][ Baghira::ColorTitleBlend ][ false ] )
+ changed |= SettingColors;
+ }
+ else
+ {
+ effect_[3][1] = Baghira::Gradient;
+ effect_[3][0] = Baghira::FlatStipples;
+ LineImpact_[3] = 0;
+ }
+
+ int old3DImpact = _3DImpact_[i];
+ _3DImpact_[i] = config.readNumEntry( indexedString("3DImpact",i), 20 );
+ if ( old3DImpact != _3DImpact_[i] )
+ changed |= SettingDecoration;
+
+ oldcolor = colors_[i][ Baghira::ColorTitleBar ][ true ];
+ colors_[i][ Baghira::ColorTitleBar ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor1",i), i == 0 ? QColor(255,255,255).rgb() : i == 1 ? QColor(238,238,238).rgb() : i == 2 ? QColor(202,202,202).rgb() : i == 3 ? QColor(238,238,238).rgb() : QColor(250,250,250).rgb()));
+ if ( oldcolor != colors_[i][ Baghira::ColorTitleBar ][ true ] )
+ changed |= SettingColors;
+
+ oldcolor = colors_[i][ Baghira::ColorTitleBlend ][ true ];
+ colors_[i][ Baghira::ColorTitleBlend ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor2",i), i == 0 ? QColor(238,234,238).rgb() : i == 1 ? QColor(205,202,205).rgb() : i == 2 ? QColor(150,150,150).rgb() : i == 3 ? QColor(211,208,211).rgb() : QColor(230,230,230).rgb()));
+ if ( oldcolor != colors_[i][ Baghira::ColorTitleBlend ][ true ] )
+ changed |= SettingColors;
+
+ }
+
+ oldcolor = ButtonColor_[MinButton];
+ ButtonColor_[MinButton].setRgb((unsigned int)config.readNumEntry( "MinButtonColor", QColor(230,155,40).rgb() ));
+ if ( oldcolor != ButtonColor_[MinButton] )
+ changed |= SettingColors;
+
+ oldcolor = ButtonColor_[MaxButton];
+ ButtonColor_[MaxButton].setRgb((unsigned int)config.readNumEntry( "MaxButtonColor", QColor(121,180,54).rgb() ));
+ if ( oldcolor != ButtonColor_[MaxButton] )
+ changed |= SettingColors;
+
+ oldcolor = ButtonColor_[CloseButton];
+ ButtonColor_[CloseButton].setRgb((unsigned int)config.readNumEntry( "CloseButtonColor", QColor(200,85,70).rgb() ));
+ if ( oldcolor != ButtonColor_[CloseButton] )
+ changed |= SettingColors;
+
+ oldcolor = ButtonColor_[StickyButton];
+ ButtonColor_[StickyButton].setRgb((unsigned int)config.readNumEntry( "StickyButtonColor", QColor(74,140,242).rgb() ));
+ if ( oldcolor != ButtonColor_[StickyButton] )
+ changed |= SettingColors;
+
+ oldcolor = ButtonColor_[AboveBelowButton];
+ ButtonColor_[AboveBelowButton].setRgb((unsigned int)config.readNumEntry( "AboveButtonColor", QColor(74,140,242).rgb() ));
+ if ( oldcolor != ButtonColor_[AboveBelowButton] )
+ changed |= SettingColors;
+ oldcolor = ButtonColor_[ShadeButton];
+ ButtonColor_[ShadeButton].setRgb((unsigned int)config.readNumEntry( "ShadeButtonColor", QColor(74,140,242).rgb() ));
+ if ( oldcolor != ButtonColor_[ShadeButton] )
+ changed |= SettingColors;
+
+ oldcolor = ButtonColor_[MenuButton];
+ ButtonColor_[MenuButton].setRgb((unsigned int)config.readNumEntry( "MenuButtonColor", QColor(74,140,242).rgb() ));
+ if ( oldcolor != ButtonColor_[MenuButton] )
+ changed |= SettingColors;
+
+ oldcolor = ButtonColor_[HelpButton];
+ ButtonColor_[HelpButton].setRgb((unsigned int)config.readNumEntry( "HelpButtonColor", QColor(0,0,0).rgb() ));
+ if ( oldcolor != ButtonColor_[HelpButton] )
+ changed |= SettingColors;
+
+ oldcolor = ButtonColor_[InactiveButton];
+ ButtonColor_[InactiveButton].setRgb((unsigned int)config.readNumEntry( "InactiveButtonColor", QColor(255,255,255).rgb() ));
+ if ( oldcolor != ButtonColor_[InactiveButton] )
+ changed |= SettingColors;
+
+
+ config.endGroup();
+ return changed;
+}
+
+QImage* BaghiraFactory::tintGlossy( const QImage &src, const QColor &c ) const
+{
+ QImage *dest = new QImage( src.width(), src.height(), 32);
+ dest->setAlphaBuffer( true );
+ unsigned int *data = ( unsigned int * ) src.bits();
+ unsigned int *destData = ( unsigned int* ) dest->bits();
+ int total = src.width() * src.height();
+ int u3rd = src.width()*4;
+ int red, green, blue;
+ int destR, destG, destB, alpha;
+ int srcR = c.red();
+ int srcG = c.green();
+ int srcB = c.blue();
+ int hue, s, v;
+ c.getHsv( &hue, &s, &v );
+ int sq = CLAMP((int)((45.0/128.0)*s+55),0,100);
+ // float srcPercent, destPercent;
+ for ( int current = 0 ; current < total ; ++current ) {
+ alpha = qAlpha( data[ current ] );
+ if (alpha < 230){
+ destData[ current ] = data[ current ];
+ continue; //do not handle translucent parts to not affect blending
+ }
+ red = qRed( data[ current ] );
+ green = qGreen( data[ current ] );
+ blue = qBlue( data[ current ] );
+ if ( current > u3rd || red < 223 ){
+ SATURATION_COLOR2(sq, red, green, blue, srcR, srcG, srcB)
+ } else {
+ SATURATION_COLOR2(sq, red, green, blue, 255, 255, 255);
+ }
+ // force back to valid colorspace !
+ COLOR_SPACE(destR, destG, destB);
+ destData[ current ] = qRgba( destR, destG, destB, alpha );
+ }
+ return ( dest );
+}
+
+QImage* BaghiraFactory::tintBrush( const QImage &img, const QColor &c ) const
+{
+
+// if ( img.depth() != 32 )
+// img = img.convertDepth( 32 );
+ QImage *dest = new QImage( img.width(), img.height(), 32);
+ unsigned int *data = ( unsigned int * ) img.bits();
+ unsigned int *destData = ( unsigned int* ) dest->bits();
+ int total = img.width() * img.height();
+ int current;
+ int delta;
+ int red, green, blue, grey, iGrey;
+ int destR, destG, destB, alpha;
+
+ int srcR = c.red();
+ int srcG = c.green();
+ int srcB = c.blue();
+
+ SATURATION_COLOR(180, 180, 180);
+ COLOR_SPACE(destR, destG, destB);
+ brushedMetalColor = QColor(destR, destG, destB);
+
+ // float srcPercent, destPercent;
+ for ( current = 0 ; current < total ; ++current ) {
+ alpha = qAlpha( data[ current ] );
+ blue = qBlue( data[ current ] );
+ red = qRed( data[ current ] );
+ green = qGreen( data[ current ] );
+ SATURATION_COLOR(red, green, blue);
+ // force back to valid colorspace !
+ COLOR_SPACE(destR, destG, destB);
+ destData[ current ] = qRgba( destR, destG, destB, alpha );
+ }
+ return ( dest );
+}
+
+void BaghiraFactory::createOS8Buttons(int style){
+ QPainter p;
+ QColor initColor;
+ for ( int active = 0; active <= 1; ++active ){
+ for (int t = 0; t < 3; t++){
+ initColor = QColor(color(style, Baghira::ColorTitleBar, active ).dark(100 + t*15));
+ nostalgia_[style][t][active] = QPixmap(BUTTONSIZE, BUTTONSIZE);
+ p.begin(&nostalgia_[style][t][active]);
+ p.setPen(color(style, Baghira::ColorTitleBar, active ));
+ p.drawPoint(0,BUTTONSIZE-1);
+ p.drawPoint(BUTTONSIZE-1,0);
+ p.setPen(initColor);
+ // dark color
+ // outer relief ===============================
+ p.drawLine(0,0,0,BUTTONSIZE-2);
+ p.drawLine(0,0,BUTTONSIZE-2,0);
+ // =============================================
+ // inner relief ================================
+ if (t < 2){
+ p.drawLine(3,BUTTONSIZE-3,BUTTONSIZE-3,BUTTONSIZE-3);
+ p.drawLine(BUTTONSIZE-3,3,BUTTONSIZE-3,BUTTONSIZE-3);
+ }
+ else{
+ p.drawLine(2,2,2,BUTTONSIZE-4);
+ p.drawLine(2,2,BUTTONSIZE-4,2);
+ }
+ // ========================================
+ for (int i = 0; i < BUTTONSIZE - 6; i++){
+ if (i == BUTTONSIZE - 7){
+ p.drawPoint(2, BUTTONSIZE - 3);
+ p.drawPoint(BUTTONSIZE - 3, 2);
+ }
+ for (int j = 0; j < i+1; j++){
+ p.setPen(initColor.light(100 + (i + j)*3));
+ p.drawPoint(i+3,j+3);
+ if (i != j) p.drawPoint(j+3,i+3);
+ }
+ }
+ // Color is now Bright ;-)
+ // inner relief ===============================
+ if (t < 2){
+ p.drawLine(2,2,2,BUTTONSIZE-4);
+ p.drawLine(2,2,BUTTONSIZE-4,2);
+ }
+ else{
+ p.drawLine(3,BUTTONSIZE-3,BUTTONSIZE-3,BUTTONSIZE-3);
+ p.drawLine(BUTTONSIZE-3,3,BUTTONSIZE-3,BUTTONSIZE-3);
+ }
+ // ================================
+ // outer relief ======================================
+ p.drawLine(1,BUTTONSIZE-1,BUTTONSIZE-1,BUTTONSIZE-1);
+ p.drawLine(BUTTONSIZE-1,1,BUTTONSIZE-1,BUTTONSIZE-1);
+ //==================================
+ // black frame
+ p.setPen(Qt::black);
+ p.drawRect(1,1,BUTTONSIZE-2,BUTTONSIZE-2);
+ p.end();
+ }
+ }
+}
+
+QPixmap &BaghiraFactory::ButtonPixmap( Baghira::WindowState wState,
+ Baghira::ButtonType type, Baghira::ButtonState state, int style, bool small ) {
+ return ButtonPixmap_[style][ wState ][ type ][ state ][small];
+}
+
+QImage* BaghiraFactory::DecoImage( QPixmap *pix, int x, int y, int width, int height ) {
+ QPixmap tmpPix( width, height );
+ bitBlt ( &tmpPix, 0, 0, pix, x, y, width, height );
+ QImage *returnImage = new QImage( tmpPix.convertToImage() );
+ return returnImage;
+}
+
+///////////////////////////////////////////////////////////////////////////
+// createGradient()
+// ----------------
+// Create a gradient
+
+void BaghiraFactory::createGradient(KPixmap &pix, const QColor &light, const QColor &dark, Baghira::TitlebarType effect)
+{
+ if (pix.width() == 0) return;
+
+ QPainter p;
+ switch( effect ){
+ case Baghira::Stipples:
+ KPixmapEffect::unbalancedGradient(pix, light, light.dark(110), KPixmapEffect::VerticalGradient, 0);
+ p.begin(&pix);
+ p.setPen(dark);
+ for( int i = 0; i < pix.height(); i+=4 ){
+ p.drawLine(0,i,pix.width(),i);
+ p.drawLine(0,i+1,pix.width(),i+1);
+ }
+ p.end();
+ break;
+ case Baghira::FlatStipples:
+ {
+ p.begin(&pix);
+ p.fillRect(pix.rect(),light);
+ QColor mid;
+ mid.setRgb((light.red()+2*dark.red())/3,(light.green()+2*dark.green())/3,(light.blue()+2*dark.blue())/3);
+ p.setPen(mid);
+ for( int i = pix.height() - 1; i > 0; i-=4 )
+ {
+ p.drawLine(0,i,pix.width(),i);
+ p.drawLine(0,i-2,pix.width(),i-2);
+ }
+ p.setPen(dark);
+ for( int i = pix.height() - 2; i > 0; i-=4 )
+ {
+ p.drawLine(0,i,pix.width(),i);
+ }
+ p.end();
+ break;
+ }
+ case Baghira::Nostalgia:
+ p.begin(&pix);
+ p.fillRect(pix.rect(),light);
+ p.setPen(light.light(120));
+ for (int i = (pix.height() - 1) / 4; i < (pix.height() - 1) / 4 * 3 + 1; i +=2)
+ p.drawLine(0,i,pix.width()-1,i);
+ p.setPen(light.dark(120));
+ for (int i = (pix.height() - 1) / 4; i < (pix.height() - 1) / 4 * 3 + 1; i +=2)
+ p.drawLine(0,i+1,pix.width()-1,i+1);
+ p.end();
+ break;
+ case Baghira::Gradient:
+ default:
+ KPixmapEffect::gradient(pix, light, dark, KPixmapEffect::VerticalGradient, 0);
+ break;
+ }
+}
+
+static bool blend( const QImage & upper, const QImage & lower, QImage & output)
+// adopted from kimageeffect::blend - what is not endian safe...
+{
+ if
+ (
+ upper.width() > lower.width() ||
+ upper.height() > lower.height() ||
+ upper.depth() != 32 ||
+ lower.depth() != 32
+ )
+ return false;
+
+ output = lower.copy();
+
+ register uchar *i, *o;
+ register int a;
+ register int col;
+ register int w = upper.width();
+ int row(upper.height() - 1);
+
+ do
+ {
+ i = upper.scanLine(row);
+ o = output.scanLine(row);
+
+ col = w << 2;
+
+ --col;
+
+ do
+ {
+#ifdef WORDS_BIGENDIAN
+ while (!(a = i[col-3]) && (col != 3))
+#else
+ while (!(a = i[col]) && (col != 3))
+#endif
+ {
+ --col; --col; --col; --col;
+ }
+#ifndef WORDS_BIGENDIAN
+ --col;
+#endif
+ o[col] += ((i[col] - o[col]) * a) >> 8;
+
+ --col;
+ o[col] += ((i[col] - o[col]) * a) >> 8;
+
+ --col;
+ o[col] += ((i[col] - o[col]) * a) >> 8;
+
+#ifdef WORDS_BIGENDIAN
+ --col;
+#endif
+
+ } while (col--);
+ } while (row--);
+ return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// createPixmaps()
+// ---------------
+// Create all our pixmaps
+void BaghiraFactory::createPixmaps() {
+// QPainter painter;
+ QColorGroup group;
+ QPainter icyAPainter;
+ QImage tmpResult;
+ QImage tmpResult2;
+ QImage tmpDeco;
+ QImage buttonImage;
+ QImage btnIcons[MenuButton];
+ btnIcons[AboveBelowButton] = QImage();
+ // load icon images - useless for nostalgia style, but i assume they'll be used at least once ;)
+ btnIcons[MinButton] = uic_findImage( "icon_minimize" );
+ btnIcons[MaxButton] = uic_findImage( "icon_maximize" );
+ btnIcons[CloseButton] = uic_findImage( "icon_close" );
+ btnIcons[StickyButton] = uic_findImage( "icon_sticky" );
+// btnIcons[AboveBelowButton] = uic_findImage( "icon_above" );
+ btnIcons[ShadeButton] = uic_findImage( "icon_shade" );
+
+ int B_3 = 0;
+ int B_6 = 0;
+// int bt, bs;
+ int xoff = 0;
+ int yoff = 1;
+ bool brushedMode;
+
+ for (int style = 0; style < 5; style++){
+ for ( int active = 0; active <= 1; ++active ) {
+ for ( int small = 0; small <= 1; ++small ) {
+ KPixmap &tbar = pix_[style][ TitleBar ][ active ][ small ];
+ KPixmap &tcenter = pix_[style][ TitleCenter ][ active ][ small ];
+ brushedMode = effect_[style][active] == Baghira::Brushed;
+
+ // create gradients and fills
+ // if (effect_ == Baghira::Gradient || effect_ == Baghira::Stipples /*|| effect_ == Baghira::Glossy * /
+ if (effect_[style][active] < Baghira::Glossy || effect_[style][active] == Baghira::FlatStipples){
+ // resize pixmap
+ tbar.resize( 100, small ? TITLESIZESMALL : TITLESIZE );
+ createGradient( tbar, color(style, Baghira::ColorTitleBar, active ), color(style, Baghira::ColorTitleBlend, active ), effect_[style][active] );
+ }
+ else if (brushedMode){
+ QPixmap brushTile;
+ QPixmap brushGradient;
+ if (tintBrush_){
+ brushTile = QPixmap(*tintBrush(uic_findImage( "brushed-tile" ), brushTint));
+ brushGradient = QPixmap(*tintBrush(uic_findImage( "brushed-gradient" ), brushTint));
+ }
+ else{
+ brushTile = uic_findImage( "brushed-tile" );
+ brushGradient = uic_findImage( "brushed-gradient" );
+ brushedMetalColor = QColor(180,180,180);
+ }
+ // resize pixmap
+ tbar.resize( 256, small ? TITLESIZESMALL : TITLESIZE );
+ tcenter.resize( 1024, small ? TITLESIZESMALL : TITLESIZE );
+ QPainter painter(&tbar);
+ painter.drawTiledPixmap( 0,0, tbar.width(), tbar.height(), brushTile );
+ painter.end();
+ painter.begin(&tcenter);
+ painter.drawTiledPixmap( 0,0, tcenter.width(), tcenter.height(), brushGradient );
+ }
+ else{
+ tbar.resize( 32, small ? TITLESIZESMALL : TITLESIZE);
+ KPixmap tmp = QPixmap(*tintGlossy(uic_findImage( "deco_glossy" ), color(style, Baghira::ColorTitleBar, active )));
+ if (tbar.height() > 18){
+ for (int i = 8; i < tbar.height() - 10; i++){
+ bitBlt(&tbar, 0, i, &tmp, 0, 8, 32, 1);
+ }
+ }
+ bitBlt(&tbar, 0, tbar.height() - 11, &tmp, 0, 9, 32, 10);
+ bitBlt(&tbar, 0, 0, &tmp, 0, 0, 32, 8);
+ }
+
+ switch ( buttonStyle_[style] ) {
+
+ // Load Jaguar Buttons =========================================================================
+
+ case Jaguar:
+
+ tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, BUTTONSIZE, BUTTONSIZE );
+
+ // unpressed buttons
+ buttonImage = uic_findImage( "button_jaguar");
+
+ for (int bt = MinButton; bt < MenuButton; bt++){
+ for (int bs = ButtonInactive; bs < Pressed; bs++){
+ tmpResult2 = *tintGlossy( buttonImage, bs == ButtonInactive ?
+ ButtonColor_[InactiveButton] :
+ ButtonColor_[bt] );
+ /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult );
+ if (bs > ButtonActive) blend( btnIcons[bt], tmpResult, tmpResult );
+ ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult );
+ }
+ }
+
+ // pressed buttons // as jaguar buttons shift
+ buttonImage = uic_findImage( "button_jaguar_down");
+
+ for (int bt = MinButton; bt < MenuButton; bt++){
+ tmpResult2 = *tintGlossy( buttonImage, ButtonColor_[bt].dark(120));
+ /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult );
+ KImageEffect::blendOnLower( xoff, yoff, btnIcons[bt], tmpResult); // must shift as well
+ ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = QPixmap( tmpResult );
+ }
+
+
+ // HelpButton
+ buttonImage = uic_findImage( "icon_help");
+ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){
+ tmpResult2 = *tintGlossy( buttonImage, bs == ButtonInactive ?
+ ButtonColor_[InactiveButton] :
+ bs == Hovered ?
+ ButtonColor_[HelpButton].light(120) :
+ bs == Pressed ?
+ ButtonColor_[HelpButton].dark(120) :
+ ButtonColor_[HelpButton] );
+ /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult );
+ }
+
+ tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE );
+
+ // MenuButton
+ buttonImage = uic_findImage( "button_jaguar_menu");
+ for (int bs = ButtonInactive; bs < Pressed; bs++){
+ tmpResult2 = *tintGlossy( buttonImage, bs < Hovered ?
+ ButtonColor_[InactiveButton] :
+ ButtonColor_[MenuButton] );
+ /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult );
+ }
+
+
+
+ // pressed MenuButton // as jaguar buttons shift
+ buttonImage = uic_findImage( "button_jaguar_menu_down");
+ tmpResult2 = *tintGlossy( buttonImage, ButtonColor_[MenuButton].dark(120));
+ /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = QPixmap( tmpResult );
+
+
+ break;
+
+ // Load Milk Buttons =========================================================================
+
+ case Milk:
+
+ tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, BUTTONSIZE, BUTTONSIZE );
+
+ // unpressed buttons
+ buttonImage = uic_findImage( "button_milk");
+
+
+ for (int bt = MinButton; bt < MenuButton; bt++){
+ for (int bs = ButtonInactive; bs < Pressed; bs++){
+ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult );
+ if (bs > ButtonActive) blend( btnIcons[bt], tmpResult, tmpResult );
+ ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult );
+ }
+ }
+
+ // pressed buttons // as pressed milk buttons differ
+ buttonImage = uic_findImage( "button_milk_down");
+ for (int bt = MinButton; bt < MenuButton; bt++){
+ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult );
+ blend( btnIcons[bt], tmpResult, tmpResult );
+ ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = QPixmap( tmpResult );
+ }
+
+ // HelpButton
+ buttonImage = uic_findImage( "icon_help");
+ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){
+ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult );
+ }
+
+ tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE );
+
+ // MenuButton
+ buttonImage = uic_findImage( "button_milk_menu");
+ for (int bs = ButtonInactive; bs < Pressed; bs++){
+ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult );
+ }
+
+ // pressed MenuButton // as pressed milk buttons differ
+ buttonImage = uic_findImage( "button_milk_menu_down");
+ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = QPixmap( tmpResult );
+
+ break;
+
+ // Create Nostalgia Buttons =========================================================================
+
+ case NostalgiaButton:
+ createOS8Buttons(style);
+ B_3 = (int)((BUTTONSIZE -1 )/ 3);
+ B_6 = B_3*2;
+
+ tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE );
+
+ for (int bt = MinButton; bt < ButtonTypeAmount; bt++){
+ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){
+ if (bs < Hovered)
+ ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][1][active] );
+ else if (bs == Hovered)
+ ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][0][active] );
+ else
+ ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][2][active] );
+ if (bs > ButtonInactive){
+ icyAPainter.begin(&ButtonPixmap_[style][ active ][ bt ][ bs ][small]);
+ icyAPainter.setPen(Qt::black);
+ if (bt == MinButton){
+ icyAPainter.drawLine(2,B_3,BUTTONSIZE - 3,B_3);
+ icyAPainter.drawLine(2,B_6,BUTTONSIZE - 3,B_6);
+ icyAPainter.end();
+ continue;
+ }
+ if (bt == MaxButton){
+ icyAPainter.drawLine(2,B_6,B_6,B_6);
+ icyAPainter.drawLine(B_6,2,B_6,B_6);
+ icyAPainter.end();
+ continue;
+ }
+ if (bt == StickyButton){
+ icyAPainter.fillRect(BUTTONSIZE/2-1,BUTTONSIZE/2-1,2,2,Qt::black);
+ icyAPainter.end();
+ continue;
+ }
+ if (bt == ShadeButton){
+ icyAPainter.drawLine(2,B_3,BUTTONSIZE-3,B_3);
+ icyAPainter.drawLine(2,B_3+3,BUTTONSIZE-3,B_3+3);
+ icyAPainter.drawLine(2,B_3+6,BUTTONSIZE-3,B_3+6);
+ icyAPainter.end();
+ continue;
+ }
+ if (bt == HelpButton){
+ QFont tmpFont = QFont(options() ->font( true, false ));
+ tmpFont.setPixelSize(BUTTONSIZE - 4);
+ icyAPainter.setFont(tmpFont);
+ icyAPainter.drawText( 0, 0, BUTTONSIZE, BUTTONSIZE, Qt::AlignHCenter | Qt::AlignVCenter, "?" );
+ icyAPainter.end();
+ continue;
+ }
+ if (bt == MenuButton){
+ icyAPainter.drawLine(2,B_3,BUTTONSIZE-3,B_3);
+ icyAPainter.end();
+
+ }
+ icyAPainter.end();
+ }
+ if (bt == MenuButton){
+ buttonImage = ButtonPixmap_[style][ active ][ bt ][ bs ][small].convertToImage();
+ blend( buttonImage , tmpDeco, tmpDeco );
+ ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap(tmpDeco);
+ }
+ }
+ }
+ break;
+
+ // Load Panther Buttons =========================================================================
+
+ case Panther:
+ default:
+
+ tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, BUTTONSIZE, BUTTONSIZE );
+
+ // unpressed buttons
+ buttonImage = uic_findImage( "button_panther");
+
+ for (int bt = MinButton; bt < MenuButton; bt++){
+ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){
+ tmpResult2 = *tintGlossy( buttonImage, bs == ButtonInactive ?
+ ButtonColor_[InactiveButton] :
+ bs == Pressed ?
+ ButtonColor_[bt].dark(120) :
+ ButtonColor_[bt] );
+ if (bs > ButtonActive) blend( btnIcons[bt], tmpResult2, tmpResult2 );
+ if (bt == MaxButton && bs > ButtonInactive) deMaximizer_.setPixmap(bs - 1, tmpResult2);
+ blend( tmpResult2, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult );
+ }
+ }
+
+
+ // HelpButton
+ buttonImage = uic_findImage( "icon_help");
+ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){
+ tmpResult2 = *tintGlossy( buttonImage, bs == ButtonInactive ?
+ ButtonColor_[InactiveButton] :
+ bs == Hovered ?
+ ButtonColor_[HelpButton].light(120) :
+ bs == Pressed ?
+ ButtonColor_[HelpButton].dark(120) :
+ ButtonColor_[HelpButton] );
+ /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult );
+ }
+
+ tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE );
+
+ // MenuButton
+ buttonImage = uic_findImage( "button_panther_menu");
+ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){
+ tmpResult2 = *tintGlossy( buttonImage, bs < Hovered ?
+ ButtonColor_[InactiveButton] :
+ bs == Pressed ?
+ ButtonColor_[MenuButton].dark(120) :
+ ButtonColor_[MenuButton] );
+ /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult );
+ ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult );
+ }
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// borderSizes()
+// -------------
+// Return list of valid border sizes
+
+QValueList<BaghiraFactory::BorderSize> BaghiraFactory::borderSizes() const {
+ return QValueList<BorderSize>() << BorderTiny << BorderNormal
+ << BorderLarge << BorderVeryLarge
+ << BorderHuge << BorderVeryHuge;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraButton Class //
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraButton()
+// --------------
+// Constructor
+
+BaghiraButton::BaghiraButton( BaghiraClient *parent, const char *name, const QString& tip, bool small, ButtonType type, int style )
+: QButton( parent->widget(), name ), client_( parent ), type_( type ), deco_( 0 ), icon_(), small_( small ), lastmouse_( 0 ), mouseover_( false ), _blocked(false) {
+ setBackgroundMode( NoBackground );
+ setCursor( arrowCursor );
+ QToolTip::add( this, tip );
+ down_ = false;
+ mouseover_ = false;
+ mask = NULL;
+ maskDown = NULL;
+
+ setFixedSize( type == Baghira::MenuButton ? MENUBUTTONWIDTH : BUTTONSIZE, BUTTONSIZE );
+ for ( int bs = Baghira::ButtonInactive; bs <= Baghira::Pressed; bs++ ) {
+ pixmap[ Baghira::WindowInactive ][ ( Baghira::ButtonState ) bs ] =
+ &BaghiraFactory::ButtonPixmap( Baghira::WindowInactive, type,
+ ( Baghira::ButtonState ) bs, style, small );
+ pixmap[ Baghira::WindowActive ][ ( Baghira::ButtonState ) bs ] =
+ &BaghiraFactory::ButtonPixmap( Baghira::WindowActive, type,
+ ( Baghira::ButtonState ) bs, style, small );
+ }
+}
+
+BaghiraButton::~BaghiraButton()
+{
+ if ( deco_ )
+ delete deco_;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// sizeHint()
+// ----------
+// Return size hint
+
+QSize BaghiraButton::sizeHint() const {
+ return QSize( BUTTONSIZE, BUTTONSIZE );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// enterEvent()
+// ------------
+// Mouse has entered the button
+
+void BaghiraButton::enterEvent( QEvent *e ) {
+#if 0
+ if (type_ == CloseButton)
+ {
+ _blocked = true;
+ QTimer::singleShot(250,this,SLOT(delayedEnterEvent()));
+ QButton::enterEvent( e );
+ return;
+ }
+#endif
+ mouseover_ = true;
+ repaint( false );
+ QButton::enterEvent( e );
+}
+
+void BaghiraButton::delayedEnterEvent()
+{
+ if (hasMouse())
+ {
+ _blocked = false;
+ mouseover_ = true;
+ repaint( false );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// leaveEvent()
+// ------------
+// Mouse has left the button
+
+void BaghiraButton::leaveEvent( QEvent *e )
+{
+ mouseover_ = false;
+ if ( type_ == Baghira::MenuButton )
+ down_ = false;
+ repaint( false );
+ QButton::leaveEvent( e );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// mousePressEvent()
+// -----------------
+// Button has been pressed
+
+void BaghiraButton::mousePressEvent( QMouseEvent* e )
+{
+ if (_blocked && !(e->state() & Qt::ControlButton))
+ return;
+ lastmouse_ = e->button();
+
+ //update mask
+ if (maskDown)
+ {
+ clearMask();
+ setMask(*maskDown);
+ }
+ // translate and pass on mouse event
+ int button = LeftButton;
+ if ( ( type_ != MaxButton ) && ( e->button() != LeftButton ) )
+ {
+ button = NoButton; // middle & right buttons inappropriate
+ }
+ down_ = true;
+ QMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() );
+ repaint( false );
+ QButton::mousePressEvent( &me );
+}
+
+// void BaghiraButton::setOn(bool on)
+// {
+// QButton::setOn(on);
+// }
+
+//////////////////////////////////////////////////////////////////////////////
+// mouseReleaseEvent()
+// -----------------
+// Button has been released
+
+void BaghiraButton::mouseReleaseEvent( QMouseEvent* e ) {
+ lastmouse_ = e->button();
+
+ if (mask){
+ clearMask();
+ setMask(*mask);
+ }
+ // translate and pass on mouse event
+ int button = LeftButton;
+ if ( ( type_ != MaxButton ) && ( e->button() != LeftButton ) ) {
+ button = NoButton; // middle & right buttons inappropriate
+ }
+ down_ = false;
+ QMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() );
+ repaint( false );
+ QButton::mouseReleaseEvent( &me );
+}
+
+inline ButtonState BaghiraButton::state() {
+ if ( down_ || isDown() )
+ return Pressed;
+ else if ( mouseover_ )
+ return Hovered;
+ else if ( client_->isActive() )
+ return ButtonActive;
+ else
+ return ButtonInactive;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// drawButton()
+// ------------
+// Draw the button
+
+void BaghiraButton::drawButton( QPainter *painter ) {
+ if ( !BaghiraFactory::initialized() )
+ return ;
+
+ bool active = client_->isActive();
+
+ if ( type_ == Baghira::StickyButton && client_->isOnAllDesktops() )
+ painter->drawPixmap( 0, 0, BaghiraFactory::ButtonPixmap( ( Baghira::WindowState ) active, type_, state() == Pressed ? Pressed : Hovered, client_->currentStyle, client_->isTool() ));
+ else
+ painter->drawPixmap( 0, 0, BaghiraFactory::ButtonPixmap( ( Baghira::WindowState ) active, type_, state() , client_->currentStyle, client_->isTool() ));
+
+ if (type_ == Baghira::AboveBelowButton)
+ {
+ if (client_->keepAbove())
+ {
+ painter->drawPixmap((width()-8)/2,height()/2-4,BaghiraFactory::arrowUp);
+ }
+ else if (client_->keepBelow())
+ {
+ painter->drawPixmap((width()-8)/2,height()/2,BaghiraFactory::arrowDown);
+ }
+ }
+}
+
+void BaghiraButton::setMasks(QBitmap *bitmask, QBitmap *bitmaskDown){
+ clearMask();
+ mask = bitmask;
+ maskDown = bitmaskDown;
+ if (mask) setMask(*mask);
+}
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraClient Class //
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraClient()
+// -------------
+// Constructor
+
+BaghiraClient::BaghiraClient( KDecorationBridge *b, KDecorationFactory *f )
+ : KDecoration( b, f )
+{
+ ;
+}
+
+BaghiraClient::~BaghiraClient()
+{
+ if (noDeco_)
+ return;
+ BaghiraFactory::deMaximizer().setClient(NULL);
+ for ( int n = 0; n < ButtonTypeAmount; n++ )
+ {
+ if ( button[ n ] )
+ delete button[ n ];
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// init()
+// ------
+// Real initialization
+
+void BaghiraClient::init()
+{
+ if (BaghiraFactory::noModalDeco() && isModal() && !isMinimizable() && !isResizable())
+ {
+ noDeco_ = true;
+ createMainWidget( WResizeNoErase | WRepaintNoErase );
+ widget() ->setBackgroundMode( NoBackground );
+ return;
+ }
+ noDeco_ = false;
+#if KDE_IS_VERSION(3,3,91)
+ //first try if there's an X setting
+ unsigned char *data = 0;
+ Atom actual;
+ int format, result;
+ unsigned long n, left;
+ currentStyle = BaghiraFactory::defaultMode();
+ result = XGetWindowProperty(qt_xdisplay(), windowId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data);
+ if (result == Success && data != None) // found set design
+ {
+ memcpy (&currentStyle, data, sizeof (unsigned int));
+ currentStyle = currentStyle>4?4:currentStyle;
+ }
+ else // try if there's a definition file
+ {
+ XClassHint classHint;
+ FILE *file = NULL;
+ if ( XGetClassHint( qt_xdisplay(), windowId(), &classHint ) )
+ {
+ QString tmpString;
+ // overwrite file from bab starter? - don't worry, if there's been one and deleted by the style we've got the X setting (much better as it will take care of all subwindows)
+ tmpString = QDir::homeDirPath() + "/.baghira/.bab/" + QString( classHint.res_class ).lower();
+ if( (file = fopen(tmpString.latin1(), "r")) != NULL )
+ {
+ fscanf(file,"%d\n%d\n", &format, &currentStyle);
+ fclose(file);
+ remove(tmpString.latin1()); // this is only temporary
+ }
+ else
+ {
+ tmpString = QDir::homeDirPath() + "/.baghira/" + QString( classHint.res_class ).lower();
+ if( (file = fopen(tmpString.latin1(), "r")) != NULL )
+ {
+ fscanf(file,"%d\n%d\n", &format, &currentStyle);
+ fclose(file);
+ }
+ }
+ XFree( classHint.res_name );
+ XFree( classHint.res_class );
+ }
+ if (file == NULL)
+ {
+ QString tmpString = QDir::homeDirPath() + "/.baghira/.bab/.deco";
+ if( (file = fopen(tmpString.latin1(), "r")) != NULL )
+ {
+ fscanf(file,"%d\n%d\n", &format, &currentStyle);
+ fclose(file);
+ }
+ }
+ }
+ if (currentStyle > 4)
+ currentStyle = BaghiraFactory::defaultMode();
+#else
+ QSettings config;
+ config.beginGroup("/baghira/Style");
+ if (config.readBoolEntry( "Design_Default", 1 ) == 2)
+ {
+ currentStyle = 2;
+ config.endGroup();
+ }
+ else
+ {
+ config.endGroup();
+ config.beginGroup("/baghira/Deco");
+ int tmp = config.readNumEntry( "defaultMode", 1 );
+ currentStyle = (tmp > -1 && tmp < 5) ? tmp : 1;
+ config.endGroup();
+ }
+#endif
+ createMainWidget( WResizeNoErase | WRepaintNoErase );
+ widget() ->installEventFilter( this );
+ widget() ->setBackgroundMode( NoBackground );
+
+ if ( isTool() ) // tool windows have tiny titlebars
+ titleheight_ = TITLESIZESMALL;
+ else
+ titleheight_ = TITLESIZE;
+
+ // setup layout
+ QVBoxLayout *mainlayout = new QVBoxLayout( widget() );
+ QHBoxLayout *titlelayout = new QHBoxLayout();
+ windowlayout = new QHBoxLayout();
+
+ titlebar_ = new QSpacerItem( 1, titleheight_, QSizePolicy::Expanding, QSizePolicy::Fixed );
+ mainlayout->setResizeMode( QLayout::FreeResize );
+ mainlayout->addLayout( titlelayout );
+ mainlayout->addLayout( windowlayout );
+
+ windowlayout->addSpacing( BaghiraFactory::borderSize(currentStyle) );
+ if ( isPreview() )
+ windowlayout->addWidget( new QLabel( i18n( "<b><center>Baghira preview</center></b>" ), widget() ) );
+ else
+ windowlayout->addItem( new QSpacerItem( 0, 18 ) );
+
+ windowlayout->addSpacing( BaghiraFactory::borderSize(currentStyle) );
+
+ leftClose = false;
+ rightClose = false;
+ performEasyClose = false;
+
+ // setup titlebar
+ for ( int n = 0; n < ButtonTypeAmount; n++ )
+ button[ n ] = 0;
+ plusminus = 1;
+ addButtons( titlelayout, options() ->titleButtonsLeft() );
+ titlelayout->addItem( titlebar_ );
+ plusminus = -1;
+ isFaded = false;
+ addButtons( titlelayout, options() ->titleButtonsRight() );
+#if KDE_IS_VERSION(3,3,91)
+ grip = 0;
+#endif
+
+ if (BaghiraFactory::effect(currentStyle, true) >= Baghira::Brushed || BaghiraFactory::effect(currentStyle, false) >= Baghira::Brushed)
+ HandlePix = QPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false ));
+ else if ( BaghiraFactory::bgStipple() )
+ {
+ HandlePix = QPixmap( 32, 32);
+ QPainter painter;
+ QColor c = widget()->colorGroup().background();
+ HandlePix.fill(c);
+ painter.begin( &HandlePix );
+ painter.setPen( c.dark( 100 + (BaghiraFactory::contrast()/2) ) );
+
+ for ( int i = 1; i < 32; i += 4 )
+ {
+ painter.drawLine( 0, i, 31, i );
+ painter.drawLine( 0, i+2, 31, i+2 );
+ }
+
+ painter.setPen( c.dark( 100 + BaghiraFactory::contrast() ) );
+
+ for ( int i = 2; i < 31; i += 4 )
+ painter.drawLine( 0, i, 31, i );
+
+ painter.end();
+ }
+}
+
+QString BaghiraClient::caption() const
+{
+ if (!BaghiraFactory::delAppname())
+ return KDecoration::caption();
+ if (caption_.isNull())
+ // generate first
+ {
+ const_cast<BaghiraClient*>( this )->caption_ = KDecoration::caption();
+ int pos;
+ if (caption_.startsWith( "tvtime" ))
+ {
+ pos = caption_.find(": ");
+ if (pos > -1)
+ const_cast<BaghiraClient*>( this )->caption_ = const_cast<BaghiraClient*>( this )->caption_.remove(0, pos+1);
+ }
+ else
+ {
+ pos = caption_.findRev(" - ");
+ if (pos > -1)
+ const_cast<BaghiraClient*>( this )->caption_ = caption_.left(pos);
+ }
+ }
+ return caption_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// addButtons()
+// ------------
+// Add buttons to title layout
+
+void BaghiraClient::addButtons( QBoxLayout *layout, const QString& s )
+{
+ if (noDeco_)
+ return;
+ // const unsigned char *bitmap;
+ QString tip;
+ QBitmap *m = NULL;
+ QBitmap *mn = NULL;
+ QBitmap *mD = NULL;
+ QBitmap *mnD = NULL;
+ QBitmap *mH = NULL;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed){
+ m = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ &BaghiraFactory::pantherMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkMask :
+ NULL;
+ mn = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ &BaghiraFactory::pantherMenuMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarMenuMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkMenuMask :
+ NULL;
+ mD = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ NULL :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarDownMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkDownMask :
+ NULL;
+ mnD = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ NULL :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarMenuDownMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkMenuDownMask :
+ NULL;
+ mH = &BaghiraFactory::helpMask;
+ }
+ if ( s.length() > 0 ) {
+// qWarning("%s",s.ascii());
+ layout->addSpacing( MARGIN );
+ excursion = excursion + plusminus * MARGIN;
+ bool buttonAdded;
+ for ( unsigned n = 0; n < s.length(); n++ ) {
+ buttonAdded = false;
+ switch ( s[ n ].latin1() ) {
+ case 'M': // Menu button
+ if ( !button[ MenuButton ] ) {
+ button[ MenuButton ] = new BaghiraButton( this, "menu",
+ i18n( "Menu" ), isTool(), MenuButton );
+ connect( button[ MenuButton ], SIGNAL( pressed() ), this,
+ SLOT( menuButtonPressed() ) );
+ layout->addWidget( button[ MenuButton ] );
+ buttonAdded = true;
+ excursion = excursion + plusminus * MENUBUTTONWIDTH;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ MenuButton ]->setMasks(mn, mnD);
+ }
+ break;
+
+ case 'S': // Sticky button
+ if ( !button[ StickyButton ] ) {
+ if ( isOnAllDesktops() ) {
+ tip = i18n( "Un-Sticky" );
+ } else {
+ tip = i18n( "Sticky" );
+ }
+ button[ StickyButton ] = new BaghiraButton( this, "sticky",
+ tip, isTool(), StickyButton );
+ connect( button[ StickyButton ], SIGNAL( clicked() ), this,
+ SLOT( toggleOnAllDesktops() ) );
+ layout->addWidget( button[ StickyButton ] );
+ buttonAdded = true;
+ excursion = excursion + plusminus * BUTTONSIZE;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ StickyButton ]->setMasks(m, mD);
+ }
+ break;
+
+ case 'H': // Help button
+ if ( ( !button[ HelpButton ] ) && providesContextHelp() ) {
+ button[ HelpButton ] = new BaghiraButton( this, "help",
+ i18n( "Help" ), isTool(), HelpButton );
+ connect( button[ HelpButton ], SIGNAL( clicked() ), this,
+ SLOT( showContextHelp() ) );
+ layout->addWidget( button[ HelpButton ] );
+ buttonAdded = true;
+ excursion = excursion + plusminus * BUTTONSIZE;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ HelpButton ]->setMasks(mH, NULL);
+ }
+ break;
+
+ case 'I': // Minimize button
+ if ( ( !button[ MinButton ] ) && isMinimizable() ) {
+ button[ MinButton ] = new BaghiraButton( this, "iconify",
+ i18n( "Minimize" ), isTool(), MinButton );
+ connect( button[ MinButton ], SIGNAL( clicked() ), this,
+ SLOT( minimize() ) );
+ layout->addWidget( button[ MinButton ] );
+ buttonAdded = true;
+ excursion = excursion + plusminus * BUTTONSIZE;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ MinButton ]->setMasks(m, mD);
+ }
+ break;
+
+ case 'A': // Maximize button
+ if ( ( !button[ MaxButton ] ) && isMaximizable() ) {
+ if ( maximizeMode() == MaximizeFull ) {
+ tip = i18n( "Restore" );
+ } else {
+ tip = i18n( "Maximize" );
+ }
+ button[ MaxButton ] = new BaghiraButton( this, "maximize",
+ tip, isTool(), MaxButton );
+ connect( button[ MaxButton ], SIGNAL( clicked() ), this,
+ SLOT( maxButtonPressed() ) );
+ layout->addWidget( button[ MaxButton ] );
+ buttonAdded = true;
+ excursion = excursion + plusminus * BUTTONSIZE;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ MaxButton ]->setMasks(m, mD);
+ }
+ break;
+
+ case 'X': // Close button
+ if ( ( !button[ CloseButton ] ) && isCloseable() ) {
+ button[ CloseButton ] = new BaghiraButton( this, "close",
+ i18n( "Close" ), isTool(), CloseButton );
+ connect( button[ CloseButton ], SIGNAL( clicked() ), this,
+ SLOT( closeWindow() ) );
+ layout->addWidget( button[ CloseButton ] );
+ buttonAdded = true;
+ excursion = excursion + plusminus * BUTTONSIZE;
+ if (plusminus == 1 && n == 0) // left Button
+ leftClose = true;
+ if (plusminus == -1 && n == s.length() - 1) // right Button
+ rightClose = true;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ CloseButton ]->setMasks(m, mD);
+ }
+ break;
+
+ case 'F': // Above button
+ case 'B': // Below button
+ if ((!button[AboveBelowButton]))
+ {
+ button[AboveBelowButton] = new BaghiraButton(this, "above", i18n("Keep Above/Below Others"), isTool(), AboveBelowButton);
+ button[AboveBelowButton]->setDown( keepAbove() || keepBelow() );
+ connect(button[AboveBelowButton], SIGNAL(clicked()), this, SLOT(aboveBelowButtonPressed()));
+ layout->addWidget(button[AboveBelowButton]);
+ buttonAdded = true;
+ excursion = excursion + plusminus * BUTTONSIZE;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ AboveBelowButton ]->setMasks(m, mD);
+ }
+ break;
+ case 'L': // Shade button
+ if ((!button[ShadeButton] && isShadeable())) {
+ button[ShadeButton] = new BaghiraButton(this, "shade", isSetShade() ? tip = i18n("Unshade") : tip = i18n("Shade"), isTool(), ShadeButton);
+ button[ShadeButton]->setDown( isShade() );
+ connect(button[ShadeButton], SIGNAL(clicked()), this, SLOT(shadeButtonPressed()));
+ layout->addWidget(button[ShadeButton]);
+ buttonAdded = true;
+ excursion = excursion + plusminus * BUTTONSIZE;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ ShadeButton ]->setMasks(m, mD);
+ }
+ break;
+// case 'R': // Shade button
+// if ((!button[ShadeButton] && isShadeable())) {
+// button[ShadeButton] = new BaghiraButton(this, "shade", isSetShade() ? tip = i18n("Unshade") : tip = i18n("Shade"), isTool(), ShadeButton);
+// button[ShadeButton]->setDown( isShade() );
+// connect(button[ShadeButton], SIGNAL(clicked()), this, SLOT(shadeButtonPressed()));
+// layout->addWidget(button[ShadeButton]);
+// buttonAdded = true;
+// excursion = excursion + plusminus * BUTTONSIZE;
+// if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed) button[ ShadeButton ]->setMasks(m, mD);
+// }
+// break;
+
+ case '_': // Spacer item
+ layout->addSpacing( MARGIN );
+ excursion = excursion + plusminus * MARGIN;
+ }
+ if (BaghiraFactory::addAutoSpacing() && buttonAdded){
+ layout->addSpacing( MARGIN );
+ excursion = excursion + plusminus * MARGIN;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// eventFilter()
+// -------------
+// Event filter
+
+bool BaghiraClient::eventFilter( QObject *obj, QEvent *e )
+{
+ if ( obj != widget() )
+ return false;
+
+ switch ( e->type() ) {
+ case QEvent::MouseButtonDblClick: {
+ mouseDoubleClickEvent( static_cast<QMouseEvent *>( e ) );
+ return true;
+ }
+ case QEvent::MouseButtonPress: {
+ if (titlebar_->geometry().contains( static_cast<QMouseEvent *>(e)->pos() ) && static_cast<QMouseEvent *>(e)->state() == Qt::ControlButton){
+ currentStyle < 4 ? currentStyle++ : currentStyle = 0;
+#if KDE_IS_VERSION(3,3,91)
+ unsigned long wmDesign = currentStyle;
+ XChangeProperty(qt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L);
+#endif
+ widget()->repaint();
+ QBitmap *m = NULL;
+ QBitmap *mn = NULL;
+ QBitmap *mD = NULL;
+ QBitmap *mnD = NULL;
+ QBitmap *mH = NULL;
+ if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed){
+ m = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ &BaghiraFactory::pantherMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkMask :
+ NULL;
+ mn = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ &BaghiraFactory::pantherMenuMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarMenuMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkMenuMask :
+ NULL;
+ mD = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ NULL :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarDownMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkDownMask :
+ NULL;
+ mnD = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ?
+ NULL :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Jaguar ?
+ &BaghiraFactory::jaguarMenuDownMask :
+ BaghiraFactory::buttonStyle(currentStyle) == Baghira::Milk ?
+ &BaghiraFactory::milkMenuDownMask :
+ NULL;
+ mH = &BaghiraFactory::helpMask;
+ }
+ for (int i = 0; i < ButtonTypeAmount; i++){
+ if (button[i]){
+ button[i]->setMasks(i < Baghira::MenuButton ? m :
+ i == Baghira::MenuButton ? mn :
+ mH, i < Baghira::MenuButton ? mD :
+ i == Baghira::MenuButton ? mnD :
+ NULL);
+ button[i]->repaint();
+ }
+ }
+#if KDE_IS_VERSION(3,3,91)
+ if (grip)
+ grip->updateLook(TRUE);
+#endif
+ doShape();
+ return true;
+ }
+ if (BaghiraFactory::allowEasyClosing()){
+ if (maximizeMode() == MaximizeFull && isActive() && (leftClose && static_cast<QMouseEvent *>( e )->x() == 0 && static_cast<QMouseEvent *>( e )->y() == 0) || (rightClose && static_cast<QMouseEvent *>( e )->x() == ((QWidget *)obj)->width() -1 && static_cast<QMouseEvent *>( e )->y() == 0))
+ performEasyClose = true;
+ else processMousePressEvent( static_cast<QMouseEvent *>( e ) );
+ }
+ else processMousePressEvent( static_cast<QMouseEvent *>( e ) );
+ return true;
+ }
+ case QEvent::MouseButtonRelease:{
+ if (performEasyClose && maximizeMode() == MaximizeFull && (leftClose && static_cast<QMouseEvent *>( e )->x() == 0 && static_cast<QMouseEvent *>( e )->y() == 0) || (rightClose && static_cast<QMouseEvent *>( e )->x() == ((QWidget *)obj)->width() -1 && static_cast<QMouseEvent *>( e )->y() == 0)){
+ closeWindow();
+ performEasyClose = false;
+ return true;
+ }
+ return FALSE;
+ }
+ case QEvent::Paint: {
+ paintEvent( static_cast<QPaintEvent *>( e ) );
+ return true;
+ }
+ case QEvent::Resize: {
+ resizeEvent( static_cast<QResizeEvent *>( e ) );
+ return true;
+ }
+ case QEvent::Show: {
+#if KDE_IS_VERSION(3,3,91)
+ if (!grip && BaghiraFactory::resizeGrip() && isResizable()) grip = new ResizeHandle(this);
+#endif
+ showEvent( static_cast<QShowEvent *>( e ) );
+ return true;
+ }
+ case QEvent::Hide: {
+ emit hide();
+ }
+ case QEvent::Wheel: {
+ wheelEvent(static_cast<QWheelEvent *>( e ));
+ return true;
+ }
+ default: {
+ return false;
+ }
+ }
+
+ return false;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// mouseCoubleClickEvent()
+// -----------------------
+// Doubleclick on title
+
+void BaghiraClient::mouseDoubleClickEvent( QMouseEvent *e )
+{
+ if ( titlebar_->geometry().contains( e->pos() ) )
+ titlebarDblClickOperation();
+}
+
+void BaghiraClient::wheelEvent( QWheelEvent *e )
+{
+ if (titlebar_->geometry().contains( e->pos() ) && e->state() == Qt::ControlButton){
+ // surf through the desktops :)
+ int target, cD;
+ if (e->delta() > 0){
+ (cD = KWin::currentDesktop()) == KWin::numberOfDesktops() ? target = 1 : target = cD + 1;
+ }
+ else{
+ (cD = KWin::currentDesktop()) == 1 ? target = KWin::numberOfDesktops() : target = cD - 1;
+ }
+ setDesktop (target);
+ KWin::setCurrentDesktop (target);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// paintEvent()
+// ------------
+// Repaint the window
+
+void BaghiraClient::paintEvent( QPaintEvent* )
+{
+ if ( !BaghiraFactory::initialized() || noDeco_)
+ return ;
+
+ QPainter painter( widget() );
+ QColorGroup group;
+
+ QRect title( 0, 0, width(), titlebar_->geometry().height() );
+ QRect left( 0, title.height(), BaghiraFactory::borderSize(currentStyle), height() -
+ title.height() );
+ QRect right( width() - BaghiraFactory::borderSize(currentStyle), title.height(),
+ BaghiraFactory::borderSize(currentStyle), height() - title.height() );
+ QRect handle( 0, height() - BaghiraFactory::borderSize(currentStyle),
+ width(), BaghiraFactory::borderSize(currentStyle) );
+
+ int x, y, x2, y2, h, w;
+
+ title.rect( &x, &y, &w, &h );
+
+ // draw title bar
+ if (BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Brushed)
+ {
+ if (w > 1024)
+ {
+ int w1 = (w - 1024)/2;
+ int w2 = w - 1024 - w1;
+ painter.drawTiledPixmap( 0,0, w1, h, BaghiraFactory::pix(currentStyle, TitleBar, isActive(), isTool() ),256-w1,0 );
+ painter.drawPixmap( w1, 0/*, 1024, h*/, BaghiraFactory::pix(currentStyle, TitleCenter, isActive(), isTool() ) );
+ painter.drawTiledPixmap( w1 + 1024, 0, w2, h, BaghiraFactory::pix(currentStyle, TitleBar, isActive(), isTool() ) );
+ }
+ else
+ painter.drawTiledPixmap( 0, 0, w, h, BaghiraFactory::pix(currentStyle, TitleCenter, isActive(), isTool() ), (1024-w)/2, 0 );
+ }
+ else
+ painter.drawTiledPixmap( title, BaghiraFactory::pix(currentStyle, TitleBar, isActive(), isTool() ) );
+
+ x2 = title.right();
+ y2 = title.bottom();
+ int shapeW = w;
+
+ const QColor *ttbar = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBar, isActive()));
+
+ int tmp3Dimpact_ = 100 + BaghiraFactory::_3DImpact(currentStyle);
+
+ painter.setPen( ttbar->light(tmp3Dimpact_));
+ painter.drawLine( x+1, y+1, x2-1, y+1 );
+
+ if (!(BaghiraFactory::allowEasyClosing() && maximizeMode() == MaximizeFull))
+ {
+ // draw around the corners ;-)
+ if (BaghiraFactory::shapeUL(currentStyle))
+ {
+ // Draw edge of top-left corner inside the area removed by the mask.
+ painter.drawPoint( 3, 2 );
+ painter.drawPoint( 4, 2 );
+ painter.drawPoint( 2, 3 );
+ painter.drawPoint( 2, 4 );
+ }
+ if (BaghiraFactory::shapeUR(currentStyle))
+ {
+ // Draw edge of top-right corner inside the area removed by the mask.
+ painter.drawPoint( shapeW - 5, 2 );
+ painter.drawPoint( shapeW - 4, 2 );
+ painter.drawPoint( shapeW - 3, 3 );
+ painter.drawPoint( shapeW - 3, 4 );
+ }
+ }
+
+
+ painter.setPen( ttbar->dark(tmp3Dimpact_) );
+ if (BaghiraFactory::drawComicFrame() && !(BaghiraFactory::allowEasyClosing() && maximizeMode() == MaximizeFull))
+ {
+ painter.drawLine(x,y,x, y2);
+ painter.drawLine(x2,y,x2, y2);
+ }
+ painter.drawLine( x, y, x2, y );
+
+ if (!(BaghiraFactory::allowEasyClosing() && maximizeMode() == MaximizeFull))
+ {
+ // draw around the corners ;-)
+ if (BaghiraFactory::shapeUL(currentStyle))
+ {
+ // Draw edge of top-left corner inside the area removed by the mask.
+ painter.drawPoint( 3, 1 );
+ painter.drawPoint( 4, 1 );
+ painter.drawPoint( 2, 2 );
+ painter.drawPoint( 1, 3 );
+ painter.drawPoint( 1, 4 );
+ }
+ if (BaghiraFactory::shapeUR(currentStyle))
+ {
+ // Draw edge of top-right corner inside the area removed by the mask.
+ painter.drawPoint( shapeW - 5, 1 );
+ painter.drawPoint( shapeW - 4, 1 );
+ painter.drawPoint( shapeW - 3, 2 );
+ painter.drawPoint( shapeW - 2, 3 );
+ painter.drawPoint( shapeW - 2, 4 );
+ }
+ }
+
+ const QColor *ttblend = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBlend, isActive()));
+
+ if (BaghiraFactory::LineImpact(currentStyle) > 0)
+ {
+ painter.setPen( ttblend->dark(100 + BaghiraFactory::LineImpact(currentStyle)) );
+ painter.drawLine( x, y2, x2, y2 );
+ }
+
+ // draw title text
+ titlebar_->geometry().rect( &x, &y, &w, &h );
+ int iconLeft;
+ int iconWidth;
+ if (BaghiraFactory::showTitle())
+ {
+ painter.setFont( options() ->font( isActive(), isTool() ) );
+ painter.setPen( options()->color( ColorFont, isActive() ) );
+ BaghiraFactory::drawIcon(currentStyle) ? iconWidth = 16 : iconWidth = 0;
+ if (BaghiraFactory::drawIcon(currentStyle) || BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Nostalgia)
+ {
+ QRect textBound = painter.boundingRect ( x + 2 * MARGIN + iconWidth, y, w - MARGIN * 2 - iconWidth, h, BaghiraFactory::titleAlign() | AlignVCenter, caption() );
+ iconLeft = textBound.x() - MARGIN - iconWidth;
+ if ( iconLeft < x + MARGIN ) iconLeft = x + MARGIN;
+
+ if (BaghiraFactory::drawIcon(currentStyle))
+ {
+ ICONX = iconLeft;
+ ICONY = y + ( titleheight_ - 16 ) / 2;
+ painter.drawPixmap( ICONX, ICONY, icon().pixmap( QIconSet::Small, QIconSet::Normal ) );
+ }
+
+ if (BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Nostalgia)
+ {
+ painter.fillRect( iconLeft - 5, y + 1, textBound.right() - iconLeft + 10, h - 2, BaghiraFactory::color(currentStyle, Baghira::ColorTitleBar, isActive() ) );
+ painter.fillRect( title.x(), y + 1, x - title.x()+5, h - 2, *ttbar );
+ painter.fillRect( x+w-5, y + 1, title.right() - w + 5, h - 2, *ttbar );
+ }
+ }
+ painter.drawText( x + 2 * MARGIN + iconWidth, y, w - MARGIN * 2 - iconWidth, h, BaghiraFactory::titleAlign() | AlignVCenter, caption() );
+ }
+ else if (BaghiraFactory::drawIcon(currentStyle))
+ {
+ iconLeft = (width()-16)/2;
+ if ( iconLeft < x + MARGIN )
+ iconLeft = x + MARGIN;
+ ICONX = iconLeft;
+ ICONY = y + ( titleheight_ - 16 ) / 2;
+ painter.drawPixmap( ICONX, ICONY, icon().pixmap( QIconSet::Small, QIconSet::Normal ) );
+ }
+
+ // draw outer frame
+ if ( !isShade() )
+ {
+ QColor background = widget() ->colorGroup().background();
+
+ // left side
+ left.rect( &x, &y, &w, &h );
+ if (w > 0){
+ if (BaghiraFactory::effect(currentStyle,isActive()) == Baghira::Brushed)
+ {
+ width() > 1024 ?
+ painter.drawTiledPixmap( x, y, w, h, BaghiraFactory::pix(currentStyle, TitleBar, isActive(), isTool() ) ) :
+ painter.drawTiledPixmap( x, y, w, h, BaghiraFactory::pix(currentStyle, TitleCenter, isActive(), isTool() ), (1024-width())/2 );
+ }
+ else
+ {
+ BaghiraFactory::bgStipple() ?
+ painter.drawTiledPixmap( x, y, w, h, HandlePix ) :
+ painter.fillRect( x, y, w, h, background );
+ }
+ }
+
+ // right side
+ right.rect( &x, &y, &w, &h );
+ if (w > 0){
+ if (BaghiraFactory::effect(currentStyle,isActive()) == Baghira::Brushed)
+ {
+ width() > 1024 ?
+ painter.drawTiledPixmap( x, y, w, h, BaghiraFactory::pix(currentStyle, TitleBar, isActive(), isTool() ) ) :
+ painter.drawTiledPixmap( x, y, w, h, BaghiraFactory::pix(currentStyle, TitleCenter, isActive(), isTool() ), (1024-width())/2+width()-w );
+ }
+ else
+ {
+ BaghiraFactory::bgStipple() ?
+ painter.drawTiledPixmap( x, y, w, h, HandlePix ) :
+ painter.fillRect( x, y, w, h, background );
+ }
+ }
+
+ // draw handle =====================================================
+ // bottom bar
+ // handle middle
+ handle.rect( &x, &y, &w, &h );
+ if (BaghiraFactory::effect(currentStyle,isActive()) == Baghira::Brushed){
+ if (w > 1024){
+ int w1 = (w - 1024)/2;
+ int w2 = w - 1024 - w1;
+ painter.drawTiledPixmap( 0, y, w1, h, BaghiraFactory::pix(currentStyle, TitleBar, isActive(), isTool() ) );
+ painter.drawPixmap( w1, y, BaghiraFactory::pix(currentStyle, TitleCenter, isActive(), isTool() ) );
+ painter.drawTiledPixmap( w1 + 1024, y, w2, h, BaghiraFactory::pix(currentStyle, TitleBar, isActive(), isTool() ) );
+ }
+ else{
+ painter.drawPixmap( x, y, BaghiraFactory::pix(currentStyle, TitleCenter, isActive(), isTool() ), (1024-w)/2, 0, w, h );
+ }
+
+ int b = handle.bottom() - 1;
+// painter.setPen( ttbar->light(tmp3Dimpact_));
+ painter.setPen( ttbar->dark(tmp3Dimpact_*1.1) );
+ painter.drawLine( x, b, w-1, b );
+ if (maximizeMode() != MaximizeFull)
+ {
+ if (BaghiraFactory::shapeLL(currentStyle)){
+ // Draw edge of bottom-left corner inside the area removed by the mask.
+ painter.drawPoint(3, b);
+ painter.drawPoint(4, b);
+ painter.drawPoint(2, b-1);
+ painter.drawPoint(1, b-2);
+ painter.drawPoint(1, b-3);
+ painter.drawPoint(0, b-4);
+ }
+ if (BaghiraFactory::shapeLR(currentStyle)){
+ // Draw edge of bottom-right corner inside the area removed by the mask.
+ painter.drawPoint(shapeW - 5, b);
+ painter.drawPoint(shapeW - 4, b);
+ painter.drawPoint(shapeW - 3, b-1);
+ painter.drawPoint(shapeW - 2, b-2);
+ painter.drawPoint(shapeW - 2, b-3);
+ painter.drawPoint(shapeW - 1, b-4);
+ }
+ }
+ painter.setPen( ttbar->dark(tmp3Dimpact_*1.3) );
+ painter.drawLine( x+1, b+1, w-2, b+1 );
+ if (maximizeMode() != MaximizeFull)
+ {
+ if (BaghiraFactory::shapeLL(currentStyle)){
+ // Draw edge of bottom-left corner inside the area removed by the mask.
+ painter.drawPoint(4, b);
+ painter.drawPoint(5, b);
+ painter.drawPoint(3, b-1);
+ painter.drawPoint(2, b-2);
+// painter.drawPoint(2, b-3);
+ }
+ if (BaghiraFactory::shapeLR(currentStyle)){
+ // Draw edge of bottom-right corner inside the area removed by the mask.
+ painter.drawPoint(shapeW - 6, b);
+ painter.drawPoint(shapeW - 5, b);
+ painter.drawPoint(shapeW - 4, b-1);
+ painter.drawPoint(shapeW - 3, b-2);
+// painter.drawPoint(shapeW - 3, b-3);
+ }
+ }
+ if (BaghiraFactory::drawComicFrame())
+ {
+ painter.drawLine(x,title.y(),x, b);
+ painter.drawLine(handle.right(),title.y(),x2, b);
+ }
+ }
+ else{
+ BaghiraFactory::bgStipple() ? painter.drawTiledPixmap( x, y, w, h, HandlePix ) :
+ painter.fillRect( x, y, w, h, background );
+
+ x2 = handle.right();
+ y2 = handle.bottom();
+ if (BaghiraFactory::drawComicFrame() && maximizeMode() != MaximizeFull){
+ painter.setPen(ttblend->dark(tmp3Dimpact_));
+ painter.drawLine( handle.x()/*+7*/, y2, x2/*-7*/, y2 );
+ painter.drawLine(0,title.bottom(),0, y2);
+ painter.drawLine(x2,title.bottom(),x2, y2);
+ }
+ }
+ if (BaghiraFactory::drawComicFrame() && maximizeMode() != MaximizeFull){
+ int b = handle.bottom() - 1;
+ if (BaghiraFactory::shapeLL(currentStyle)){
+ // Draw edge of bottom-left corner inside the area removed by the mask.
+ painter.drawPoint(3, b);
+ painter.drawPoint(4, b);
+ painter.drawPoint(2, b-1);
+ painter.drawPoint(1, b-2);
+ painter.drawPoint(1, b-3);
+ }
+ if (BaghiraFactory::shapeLR(currentStyle)){
+ // Draw edge of bottom-right corner inside the area removed by the mask.
+ painter.drawPoint(shapeW - 5, b);
+ painter.drawPoint(shapeW - 4, b);
+ painter.drawPoint(shapeW - 3, b-1);
+ painter.drawPoint(shapeW - 2, b-2);
+ painter.drawPoint(shapeW - 2, b-3);
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// resizeEvent()
+// -------------
+// Window is being resized
+
+void BaghiraClient::resizeEvent( QResizeEvent* )
+{
+ if (noDeco_)
+ return;
+ /*if ( widget() ->isShown() ) {
+ QRegion region = widget() ->rect();
+ region = region.subtract( titlebar_->geometry() );
+ widget() ->erase( region );
+ }*/
+// widget()->repaint();
+ doShape();
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// shape Corners
+// =) ==================================================================0
+
+void BaghiraClient::doShape()
+{
+// return;
+ QRegion mask;
+
+ if (!(BaghiraFactory::allowEasyClosing() && maximizeMode() == MaximizeFull)){
+ int r = width();
+ int b = height() - 1;
+ mask = QRegion( 0, 0, r, b+1 );
+
+ if (BaghiraFactory::shapeUL(currentStyle)){
+ // Remove top-left corner.
+ mask -= QRegion( 0, 0, 5, 1 );
+ mask -= QRegion( 0, 1, 3, 1 );
+ mask -= QRegion( 0, 2, 2, 1 );
+ mask -= QRegion( 0, 3, 1, 2 );
+ }
+ if (BaghiraFactory::shapeUR(currentStyle)){
+ // Remove top-right corner.
+ mask -= QRegion( r - 5, 0, 5, 1 );
+ mask -= QRegion( r - 3, 1, 3, 1 );
+ mask -= QRegion( r - 2, 2, 2, 1 );
+ mask -= QRegion( r - 1, 3, 1, 2 );
+ }
+
+ if (BaghiraFactory::shapeLL(currentStyle)){
+ // Remove bottom-left corner.
+ mask -= QRegion(0, b-0, 5, 1);
+ mask -= QRegion(0, b-1, 3, 1);
+ mask -= QRegion(0, b-2, 2, 1);
+ mask -= QRegion(0, b-4, 1, 2);
+ }
+ if (BaghiraFactory::shapeLR(currentStyle)){
+ // Remove bottom-right corner.
+ mask -= QRegion(r - 5, b-0, 5, 1);
+ mask -= QRegion(r - 3, b-1, 3, 1);
+ mask -= QRegion(r - 2, b-2, 2, 1);
+ mask -= QRegion(r - 1, b-4, 1, 2);
+ }
+ }
+ setMask( mask, 1 );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// showEvent()
+// -----------
+// Window is being shown
+
+void BaghiraClient::showEvent( QShowEvent* )
+{
+ if (noDeco_)
+ return;
+ doShape();
+ widget() ->repaint();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// activeChange()
+// --------------
+// window active state has changed
+
+void BaghiraClient::activeChange()
+{
+ if (noDeco_)
+ return;
+ if (BaghiraFactory::fullSpec() && maximizeMode() == MaximizeFull)
+ {
+ if (isActive())
+ {
+ BaghiraFactory::deMaximizer().show();
+ BaghiraFactory::deMaximizer().setClient(this);
+ }
+ }
+ else
+ {
+ BaghiraFactory::deMaximizer().hide();
+ for ( int n = 0; n < ButtonTypeAmount; n++ )
+ {
+ if ( button[ n ] )
+ {
+ button[n]->setAutoMask( BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Brushed);
+ button[ n ] ->reset();
+ }
+ }
+ widget() ->repaint( false );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// captionChange()
+// ---------------
+// The title has changed
+
+void BaghiraClient::captionChange()
+{
+ if (noDeco_)
+ return;
+ if (BaghiraFactory::showTitle())
+ {
+ if (BaghiraFactory::delAppname())
+ {
+ caption_ = KDecoration::caption();
+ int pos;
+ if (caption_.startsWith( "tvtime" ))
+ {
+ pos = caption_.find(": ");
+ if (pos > -1)
+ caption_ = caption_.remove(0, pos+1);
+ }
+ else
+ {
+ pos = caption_.findRev(" - ");
+ if (pos > -1)
+ caption_ = caption_.left(pos);
+ }
+ }
+ widget() ->repaint( titlebar_->geometry(), false );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// desktopChange()
+// ---------------
+// Sticky state has changed
+
+void BaghiraClient::desktopChange()
+{
+ if (noDeco_)
+ return;
+ bool d = isOnAllDesktops();
+ if ( button[ StickyButton ] )
+ {
+ QToolTip::remove
+ ( button[ StickyButton ] );
+ QToolTip::add
+ ( button[ StickyButton ], d ? i18n( "Un-Sticky" ) : i18n( "Sticky" ) );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// iconChange()
+// ------------
+// The title has changed
+
+void BaghiraClient::iconChange()
+{
+ if (noDeco_)
+ return;
+ if (BaghiraFactory::drawIcon(currentStyle)) widget()->repaint(ICONX, ICONY, 16, 16, false);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// maximizeChange()
+// ----------------
+// Maximized state has changed
+
+void BaghiraClient::maximizeChange()
+{
+ if (noDeco_) //shouldn't happen - windo's not maximizable
+ return;
+ bool m = ( maximizeMode() == MaximizeFull );
+ if (BaghiraFactory::fullSpec() && m){
+ if (isActive()){
+ BaghiraFactory::deMaximizer().show();
+ BaghiraFactory::deMaximizer().setClient(this);
+ }
+ }
+ else {
+ BaghiraFactory::deMaximizer().setClient(NULL);
+ BaghiraFactory::deMaximizer().hide();
+ }
+ if ( button[ MaxButton ] ) {
+ QToolTip::remove
+ ( button[ MaxButton ] );
+ QToolTip::add
+ ( button[ MaxButton ], m ? i18n( "Restore" ) : i18n( "Maximize" ) );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// shadeChange()
+// -------------
+// Called when window shading changes
+
+void BaghiraClient::shadeChange() {
+ ;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// borders()
+// ----------
+// Get the size of the borders
+
+void BaghiraClient::borders( int &l, int &r, int &t, int &b ) const
+{
+ if (noDeco_)
+ {
+ l = r = t = b = 0;
+ return;
+ }
+ bool m = ( maximizeMode() == MaximizeFull);
+ t = (BaghiraFactory::fullSpec() && m) ? 0 : titleheight_;
+ if (m || maximizeMode() == MaximizeHorizontal)
+ l = r = BaghiraFactory::maxResizable() ? 1 : 0;
+ else
+ l = r = BaghiraFactory::borderSize(currentStyle);
+ if ( m || isShade() || (maximizeMode() == MaximizeVertical))
+ b = BaghiraFactory::maxResizable() ? 1 : 0;
+ else
+ b = BaghiraFactory::borderSize(currentStyle);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// resize()
+// --------
+// Called to resize the window
+
+void BaghiraClient::resize( const QSize &size )
+{
+ if (noDeco_)
+ return;
+ widget() ->resize( size );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// minimumSize()
+// -------------
+// Return the minimum allowable size for this decoration
+
+QSize BaghiraClient::minimumSize() const
+{
+ return QSize( 100, 60 );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// mousePosition()
+// ---------------
+// Return mouse position (for resizing)
+
+KDecoration::Position BaghiraClient::mousePosition( const QPoint &point ) const
+{
+ if (noDeco_)
+ return PositionCenter;
+ Position pos = PositionCenter;
+ if ( point.y() < ( height() - BaghiraFactory::borderSize(currentStyle) ) ) { // inside client
+ pos = KDecoration::mousePosition( point );
+ } else {
+ if ( point.x() >= ( width() - 16 ) )
+ pos = PositionBottomRight;
+ else if ( point.x() <= 16 )
+ pos = PositionBottomLeft;
+ else
+ pos = PositionBottom;
+ }
+ return pos;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// maxButtonPressed()
+// -----------------
+// Max button was pressed
+
+
+void BaghiraClient::demaxButtonPressed() {
+ maxButtonPressed();
+}
+
+void BaghiraClient::maxButtonPressed() {
+ if ( !BaghiraFactory::fullSpec() || (maximizeMode() != MaximizeFull) && button[ MaxButton ]) {
+ switch ( button[ MaxButton ] ->lastMousePress() ) {
+ case MidButton:
+ maximize( maximizeMode() ^ MaximizeVertical );
+ break;
+ case RightButton:
+ maximize( maximizeMode() ^ MaximizeHorizontal );
+ break;
+ default:
+ if ( maximizeMode() == MaximizeFull ) {
+ maximize( MaximizeRestore );
+ }
+ else {
+ maximize( MaximizeFull );
+ }
+ }
+ }
+ else{
+ maximize( MaximizeRestore );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// menuButtonPressed()
+// -------------------
+// Menu button was pressed
+
+void BaghiraClient::menuButtonPressed() {
+ if ( button[ MenuButton ] ) {
+ QPoint pt( button[ MenuButton ] ->rect().bottomLeft().x(),
+ button[ MenuButton ] ->rect().bottomLeft().y() + 4 );
+ KDecorationFactory* f = factory();
+ showWindowMenu( button[ MenuButton ] ->mapToGlobal( pt ) );
+ if ( !f->exists( this ) )
+ return ; // we have been destroyed
+ button[ MenuButton ] ->setDown( false );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// new stuff
+
+void BaghiraClient::aboveBelowButtonPressed()
+{
+ if (keepAbove())
+ {
+ button[ AboveBelowButton ] ->setDown(true);
+ setKeepAbove(false );
+ setKeepBelow(true );
+ button[ AboveBelowButton ] ->repaint( false );
+ }
+ else if (keepBelow())
+ {
+ button[ AboveBelowButton ] ->setDown(false);
+ setKeepBelow(false );
+ setKeepAbove(false );
+ button[ AboveBelowButton ] ->repaint( false );
+ }
+ else
+ {
+ button[ AboveBelowButton ] ->setDown(true);
+ setKeepBelow(false );
+ setKeepAbove(true );
+ button[ AboveBelowButton ] ->repaint( false );
+ }
+}
+
+void BaghiraClient::shadeButtonPressed(){
+ button[ ShadeButton ]->setDown(!isShade());
+ setShade( !isShade() );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// isTool()
+// --------
+// Is this a tool window?
+
+bool BaghiraClient::isTool() const {
+ static const unsigned long winmask = NET::DesktopMask | NET::DialogMask |
+ NET::DockMask | NET::MenuMask |
+ NET::NormalMask | NET::OverrideMask |
+ NET::SplashMask | NET::ToolbarMask |
+ NET::TopMenuMask | NET::UtilityMask;
+
+ NET::WindowType type = windowType( winmask );
+ return ( type == NET::Menu || type == NET::Toolbar || type == NET::Utility );
+}
+
+#include "baghiraclient.moc"
diff --git a/deco/baghiraclient.h b/deco/baghiraclient.h
new file mode 100644
index 0000000..c77ea0d
--- /dev/null
+++ b/deco/baghiraclient.h
@@ -0,0 +1,445 @@
+//////////////////////////////////////////////////////////////////////////////
+// baghiraclient.h
+// -------------------
+// Baghira window decoration for KDE
+// -------------------
+// Copyright (c) 2004, 2005 Thomas Lübking
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BAGHIRACLIENT_H
+#define BAGHIRACLIENT_H
+
+#include <qcolor.h>
+#include <qbutton.h>
+#include <kdecoration.h>
+#include <kdecorationfactory.h>
+#include <kpixmap.h>
+#include <kdeversion.h>
+/*
+#define BUTTONSIZE 15;
+#define MENUBUTTONWIDTH 20;
+#define DECOSIZE 8;
+#define TITLESIZESMALL 18;
+#define MARGIN 4;*/
+
+class QSpacerItem;
+class QPoint;
+class QBitmap;
+class KWinModule;
+
+namespace Baghira {
+
+
+enum PixmapType {
+ TitleBar = 0,
+ TitleCenter,
+ PixmapTypeCount
+};
+
+enum ColorType {
+ ColorTitleBar=0,
+ ColorTitleBlend,
+ ColorTypeCount
+};
+
+enum ButtonType{
+ MinButton = 0,
+ MaxButton,
+ CloseButton,
+ StickyButton,
+ ShadeButton,
+ AboveBelowButton,
+ MenuButton,
+ HelpButton,
+ ButtonTypeAmount,
+ InactiveButton = ButtonTypeAmount
+};
+
+enum ButtonStyle{
+ Panther = 0,
+ Jaguar,
+ Milk,
+ NostalgiaButton
+};
+
+enum ButtonState{
+ ButtonInactive,
+ ButtonActive,
+ Hovered,
+ Pressed,
+ ButtonStateAmount
+};
+
+enum WindowState{
+ WindowInactive,
+ WindowActive,
+ WindowStateAmount
+};
+
+enum TitlebarType{
+ Gradient,
+ Stipples,
+ Nostalgia,
+ Glossy,
+ Brushed,
+ FlatStipples
+};
+
+class BaghiraClient;
+
+// #if KDE_IS_VERSION(3,3,91)
+class ResizeHandle : public QWidget
+{
+//#if KDE_IS_VERSION(3,3,91)
+friend class BaghiraClient;
+ Q_OBJECT
+#if KDE_IS_VERSION(3,3,91)
+public:
+ ResizeHandle(BaghiraClient *parent);
+protected:
+ virtual void mousePressEvent ( QMouseEvent * );
+ virtual void mouseReleaseEvent ( QMouseEvent * );
+ virtual void paintEvent ( QPaintEvent * );
+ void updateLook(bool rp = FALSE);
+private:
+ bool eventFilter(QObject *obj, QEvent *e);
+ void shape();
+ BaghiraClient *client;
+ QPixmap pix;
+#endif
+};
+// #endif
+
+class DeMaximizer : public QWidget
+{
+friend class BaghiraClient;
+friend class BaghiraFactory;
+ Q_OBJECT
+public:
+ DeMaximizer();
+ void setClient(BaghiraClient *);
+protected:
+ void mouseReleaseEvent( QMouseEvent * e );
+ void mousePressEvent ( QMouseEvent * e );
+ void enterEvent ( QEvent * e );
+ void leaveEvent ( QEvent * e );
+ void setPixmap(int i, QImage &image);
+private:
+ BaghiraClient *client_;
+ QPixmap pixmap[5];
+ void setState(int i);
+};
+
+// BaghiraFactory //////////////////////////////////////////////////////////////
+
+class BaghiraFactory: public KDecorationFactory
+{
+public:
+ BaghiraFactory();
+ virtual ~BaghiraFactory();
+ virtual KDecoration *createDecoration(KDecorationBridge *b);
+ virtual bool reset(unsigned long changed);
+ virtual QValueList<BorderSize> borderSizes() const;
+ static QPixmap &ButtonPixmap(Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int current, bool small);
+ QImage* DecoImage(QPixmap *pix, int x, int y, int width, int height);
+
+ static QBitmap helpMask, jaguarDownMask, jaguarMenuDownMask,
+ jaguarMenuMask, jaguarMask, milkMenuDownMask,
+ milkMenuMask, milkMask, pantherMenuMask, pantherMask, milkDownMask, arrowUp, arrowDown;
+
+ static bool initialized();
+ static bool noModalDeco();
+ static bool delAppname();
+ static QColor &color(int current, Baghira::ColorType c, bool active=true);
+ static KPixmap &pix(int current, PixmapType p, bool active=true, bool small=false);
+ static TitlebarType &effect(int current, bool active);
+ static ButtonStyle buttonStyle(int current);
+ static Qt::AlignmentFlags titleAlign();
+ static int borderSize(int current);
+ static int contrast();
+ static int _3DImpact(int current);
+ static int LineImpact(int current);
+ static bool bgStipple();
+ static bool resizeGrip();
+ static uint defaultMode();
+ static bool drawComicFrame();
+ static bool shapeUL(int current);
+ static bool shapeUR(int current);
+ static bool shapeLL(int current);
+ static bool shapeLR(int current);
+ static bool drawIcon(int current);
+ static bool showTitle();
+ static bool allowEasyClosing();
+ static bool addAutoSpacing();
+ static bool maxResizable();
+ TitlebarType titleEffect();
+ static DeMaximizer &deMaximizer();
+ static bool fullSpec();
+ static QColor &BrushedMetalColor();
+
+private:
+// bool blend( const QImage & upper, const QImage & lower, QImage & output);
+ unsigned long readConfig();
+ void createPixmaps();
+ void createGradient(KPixmap &pix, const QColor &light, const QColor &dark, Baghira::TitlebarType effect);
+ void createOS8Buttons(int style);
+ QString indexedString(QString s, int index);
+ QImage* tintBrush( const QImage &img, const QColor &c ) const;
+ QImage* tintGlossy(const QImage &src, const QColor &c ) const;
+
+private:
+
+ static bool initialized_;
+ static bool noModalDeco_;
+ static bool delAppname_;
+ static bool bgStipple_;
+ static bool comicFrame_;
+ static bool resizeGrip_;
+ static bool shape_ul[5], shape_ur[5], shape_ll[5], shape_lr[5];
+ static bool allowEasyClosing_;
+ static bool addAutoSpacing_;
+ static bool maxResizable_;
+ static bool drawIcon_[5];
+ static ButtonStyle buttonStyle_[5];
+ static TitlebarType effect_[5][2];
+ static Qt::AlignmentFlags titlealign_;
+ static QColor colors_[5][ColorTypeCount][2];
+ static KPixmap pix_[5][PixmapTypeCount][2][2];
+ static QPixmap ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2];
+ static QColor ButtonColor_[ButtonTypeAmount+1];
+ static QColor brushedMetalColor;
+ static QPixmap nostalgia_[5][3][2];
+
+ static int contrast_;
+ static int bordersize_[5];
+ static uint defaultMode_;
+ static int minimumTitleHeight_;
+ static int _3DImpact_[5];
+ static int LineImpact_[5];
+
+ static bool tintBrush_;
+ static bool showTitle_;
+ static QColor brushTint;
+ static DeMaximizer deMaximizer_;
+ static bool fullSpec_;
+
+};
+
+inline bool BaghiraFactory::fullSpec()
+ { return fullSpec_; }
+inline bool BaghiraFactory::noModalDeco()
+{ return noModalDeco_; }
+inline bool BaghiraFactory::delAppname()
+{ return delAppname_; }
+
+inline DeMaximizer &BaghiraFactory::deMaximizer()
+ { return deMaximizer_; }
+
+inline bool BaghiraFactory::shapeUL(int current)
+ { return shape_ul[current]; }
+inline bool BaghiraFactory::shapeUR(int current)
+ { return shape_ur[current]; }
+inline bool BaghiraFactory::shapeLL(int current)
+ { return shape_ll[current]; }
+inline bool BaghiraFactory::shapeLR(int current)
+ { return shape_lr[current]; }
+
+inline bool BaghiraFactory::allowEasyClosing()
+ { return allowEasyClosing_; }
+
+inline bool BaghiraFactory::addAutoSpacing()
+ { return addAutoSpacing_; }
+
+inline bool BaghiraFactory::maxResizable()
+ { return maxResizable_; }
+
+inline bool BaghiraFactory::resizeGrip()
+ { return resizeGrip_; }
+
+inline uint BaghiraFactory::defaultMode()
+ { return defaultMode_; }
+
+inline bool BaghiraFactory::drawIcon(int current)
+ { return drawIcon_[current]; }
+
+inline bool BaghiraFactory::showTitle()
+{ return showTitle_; }
+
+inline int BaghiraFactory::contrast()
+ { return contrast_; }
+
+inline int BaghiraFactory::_3DImpact(int current)
+ { return _3DImpact_[current]; }
+
+inline int BaghiraFactory::LineImpact(int current)
+ { return LineImpact_[current]; }
+
+inline bool BaghiraFactory::drawComicFrame()
+ { return comicFrame_; }
+
+inline bool BaghiraFactory::bgStipple()
+ { return bgStipple_; }
+
+inline ButtonStyle BaghiraFactory::buttonStyle(int current)
+ { return BaghiraFactory::buttonStyle_[current]; }
+
+inline bool BaghiraFactory::initialized()
+ { return initialized_; }
+
+inline QColor &BaghiraFactory::BrushedMetalColor()
+ { return brushedMetalColor; }
+
+inline QColor &BaghiraFactory::color(int current, Baghira::ColorType c, bool active)
+ { return colors_[current][c][active]; }
+
+inline KPixmap &BaghiraFactory::pix(int current, PixmapType p, bool active, bool small)
+ { return pix_[current][p][active][small]; }
+
+inline Baghira::TitlebarType &BaghiraFactory::effect(int current, bool active)
+ { return effect_[current][active]; }
+
+inline Qt::AlignmentFlags BaghiraFactory::titleAlign()
+ { return titlealign_; }
+
+inline int BaghiraFactory::borderSize(int current)
+{ return bordersize_[current]; }
+
+// BaghiraButton ///////////////////////////////////////////////////////////////
+
+class BaghiraButton : public QButton
+{
+ Q_OBJECT
+public:
+ BaghiraButton(BaghiraClient *parent=0, const char *name=0, const QString &tip=NULL, bool small=false, ButtonType type=MinButton, int style=0);
+ ~BaghiraButton();
+
+ QSize sizeHint() const;
+ int lastMousePress() const;
+ void reset();
+ inline void setMasks(QBitmap *bitmask, QBitmap *bitmaskDown);
+ Baghira::ButtonState state();
+ inline void setType(Baghira::ButtonType type)
+ {type_ = type; }
+ QBitmap *mask;
+ QBitmap *maskDown;
+
+private:
+ void enterEvent(QEvent *e);
+ void leaveEvent(QEvent *e);
+ void mousePressEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void drawButton(QPainter *painter);
+
+private slots:
+ void delayedEnterEvent();
+
+private:
+ bool _blocked;
+ BaghiraClient *client_;
+ ButtonType type_;
+ QBitmap *deco_;
+ QPixmap *pixmap[2][5];
+ KPixmap icon_;
+ bool small_;
+ int lastmouse_;
+ bool mouseover_;
+ bool down_;
+};
+
+inline int BaghiraButton::lastMousePress() const
+ { return lastmouse_; }
+
+inline void BaghiraButton::reset()
+ { repaint(false); }
+
+// BaghiraClient ///////////////////////////////////////////////////////////////
+
+class BaghiraClient : public KDecoration
+{
+friend class BaghiraButton;
+friend class ResizeHandle;
+ Q_OBJECT
+public:
+ BaghiraClient(KDecorationBridge *b, KDecorationFactory *f);
+ virtual ~BaghiraClient();
+
+ virtual void init();
+ QString caption() const;
+
+ virtual void activeChange();
+ virtual void desktopChange();
+ virtual void captionChange();
+ virtual void iconChange();
+ virtual void maximizeChange();
+ virtual void shadeChange();
+ void demaxButtonPressed();
+
+ virtual void borders(int &l, int &r, int &t, int &b) const;
+ virtual void resize(const QSize &size);
+ virtual QSize minimumSize() const;
+ virtual Position mousePosition(const QPoint &point) const;
+ uint currentStyle;
+
+signals:
+ void hide();
+
+protected:
+ bool isTool() const;
+ int titleheight_;
+
+private:
+ void addButtons(QBoxLayout* layout, const QString& buttons);
+
+ bool eventFilter(QObject *obj, QEvent *e);
+ void mouseDoubleClickEvent(QMouseEvent *e);
+ void wheelEvent(QWheelEvent *e);
+ void paintEvent(QPaintEvent *);
+ void resizeEvent(QResizeEvent *);
+ void showEvent(QShowEvent *);
+
+private slots:
+ void doShape();
+ void maxButtonPressed();
+ void menuButtonPressed();
+ void aboveBelowButtonPressed();
+ void shadeButtonPressed();
+
+private:
+ BaghiraButton *button[ButtonTypeAmount];
+
+ QSpacerItem *titlebar_;
+ QPixmap HandlePix;
+ int excursion; // skewness because of unequality of left/right buttons - bad for center aligned titles...
+ int plusminus;
+ bool isFaded;
+ bool leftClose;
+ bool rightClose;
+ bool performEasyClose;
+ bool noDeco_;
+ QHBoxLayout *windowlayout;
+ int ICONX, ICONY;
+ ResizeHandle *grip;
+ QString caption_;
+};
+
+} // namespace Baghira
+
+#endif // BAGHIRACLIENT_H
diff --git a/deco/config/Makefile.am b/deco/config/Makefile.am
new file mode 100644
index 0000000..b9b97ae
--- /dev/null
+++ b/deco/config/Makefile.am
@@ -0,0 +1,23 @@
+AUTOMAKE_OPTIONS = foreign
+
+KDE_CXXFLAGS = -DQT_PLUGIN
+
+INCLUDES = $(all_includes) -I$(srcdir)/../../config
+
+noinst_HEADERS = baghiraconfig.h aquariusbutton.h colorpicker.h pixmaps.h
+
+kde_module_LTLIBRARIES = kwin_baghira_config.la
+kwin_baghira_config_la_SOURCES = baghiraconfig.cc aquariusbutton.cc colorpicker.cc configdialog.ui
+kwin_baghira_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kwin_baghira_config_la_LIBADD = $(LIB_KDEUI)
+kwin_baghira_config_la_METASOURCES = AUTO
+
+DISTCLEANFILES = $(kwin_baghira_config_la_METASOURCES)
+
+messages:
+ $(XGETTEXT) *.cpp -o $(podir)/kwin_baghira_config.pot
+
+pixmaps.h: $(srcdir)/generatePixmaps.sh
+ $(SHELL) $(srcdir)/generatePixmaps.sh $(top_srcdir)
+CLEANFILES = pixmaps.h
+baghiraconfig.lo: pixmaps.h
diff --git a/deco/config/aquariusbutton.cc b/deco/config/aquariusbutton.cc
new file mode 100644
index 0000000..6201abc
--- /dev/null
+++ b/deco/config/aquariusbutton.cc
@@ -0,0 +1,162 @@
+#include "aquariusbutton.h"
+#include <qcolor.h>
+#include <qpixmap.h>
+#include <qpainter.h>
+#include <kimageeffect.h>
+#include "config.h"
+
+
+#define COLOR_SPACE(R,G,B) \
+ if ( R < 0 ) R = 0; else if ( R > 255 ) R = 255; \
+ if ( G < 0 ) G = 0; else if ( G > 255 ) G = 255; \
+ if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255;
+
+#define SATURATION_COLOR(R,G,B) \
+ grey = (299 * R + 587 * G + 114 * B) / 1000; \
+ delta = 255 - grey; \
+ grey = (grey *(10 - 5)) / 10; \
+ iGrey = 255 - grey;\
+ destR = (iGrey * (srcR - delta) + grey * R) / 255; \
+ destG = (iGrey * (srcG - delta) + grey * G) / 255; \
+ destB = (iGrey * (srcB - delta) + grey * B) / 255;
+
+#define CLAMP(x,l,u) x < l ? l :\
+ x > u ? u :\
+ x
+
+#define SATURATION_COLOR2(S,R,G,B) \
+ int max = 255+0.65*(100-S); \
+ destR = CLAMP((srcR + R - 128), 0, max); \
+ destG = CLAMP((srcG + G - 128), 0, max); \
+ destB = CLAMP((srcB + B - 128), 0, max); \
+ destR = (S*destR + (100-S)*R)/100; \
+ destG = (S*destG + (100-S)*G)/100; \
+ destB = (S*destB + (100-S)*B)/100;
+
+static bool blend( const QImage & upper, const QImage & lower, QImage & output)
+// adopted from kimageeffect::blend - what is not endian safe...
+{
+ if
+ (
+ upper.width() > lower.width() ||
+ upper.height() > lower.height() ||
+ upper.depth() != 32 ||
+ lower.depth() != 32
+ )
+ return false;
+
+ output = lower.copy();
+
+ register uchar *i, *o;
+ register int a;
+ register int col;
+ register int w = upper.width();
+ int row(upper.height() - 1);
+
+ do
+ {
+ i = upper.scanLine(row);
+ o = output.scanLine(row);
+
+ col = w << 2;
+
+ --col;
+
+ do
+ {
+#ifdef WORDS_BIGENDIAN
+ while (!(a = i[col-3]) && (col != 3))
+#else
+ while (!(a = i[col]) && (col != 3))
+#endif
+ {
+ --col; --col; --col; --col;
+ }
+#ifndef WORDS_BIGENDIAN
+ --col;
+#endif
+ o[col] += ((i[col] - o[col]) * a) >> 8;
+
+ --col;
+ o[col] += ((i[col] - o[col]) * a) >> 8;
+
+ --col;
+ o[col] += ((i[col] - o[col]) * a) >> 8;
+
+#ifdef WORDS_BIGENDIAN
+ --col;
+#endif
+
+ } while (col--);
+ } while (row--);
+ return true;
+}
+
+AquariusButton::AquariusButton( QPixmap &pixmap, QWidget* parent, const char* name) : QWidget( parent, name){
+ pixmap = pixmap;
+ image = pixmap.convertToImage();
+ setFixedSize( pixmap.size() );
+}
+
+AquariusButton::~AquariusButton(){
+}
+
+QColor AquariusButton::Color(){
+ return color;
+}
+
+void AquariusButton::setColor(QColor c){
+ color = c;
+ tint(color);
+ repaint(false);
+}
+
+void AquariusButton::tint(QColor &c){
+ QImage dest( image.width(), image.height(), 32, 0 );
+ dest.setAlphaBuffer( true );
+ unsigned int *data = ( unsigned int * ) image.bits();
+ unsigned int *destData = ( unsigned int* ) dest.bits();
+ int total = image.width() * image.height();
+ int red, green, blue;
+ int destR, destG, destB, alpha;
+ int srcR = c.red();
+ int srcG = c.green();
+ int srcB = c.blue();
+ int hue, s, v;
+ c.getHsv( &hue, &s, &v );
+ int sq = CLAMP((int)((45.0/128.0)*s+55),0,100);
+ // float srcPercent, destPercent;
+ for ( int current = 0 ; current < total ; ++current ) {
+ alpha = qAlpha( data[ current ] );
+ if (alpha < 230){
+ destData[ current ] = data[ current ];
+ continue; //do not handle translucent parts to not affect blending
+ }
+ red = qRed( data[ current ] );
+ green = qGreen( data[ current ] );
+ blue = qBlue( data[ current ] );
+ SATURATION_COLOR2(sq, red, green, blue);
+ // force back to valid colorspace !
+ COLOR_SPACE(destR, destG, destB);
+ destData[ current ] = qRgba( destR, destG, destB, alpha );
+ }
+ QPixmap backPix = QPixmap(dest.size());
+ QPainter tmpPainter(&backPix);
+ tmpPainter.fillRect(0, 0, dest.width(),dest.height(), backgroundBrush());
+ tmpPainter.end();
+ QImage back = backPix.convertToImage();
+ blend(dest,back,back);
+ pixmap = QPixmap(back);
+}
+
+void AquariusButton::mousePressEvent( QMouseEvent *e ){
+ emit clicked();
+}
+
+void AquariusButton::paintEvent( QPaintEvent *e){
+ QPainter tmpPainter(this);
+ tmpPainter.drawPixmap(0,0, pixmap);
+}
+
+// void AquariusButton::clicked(){
+// }
diff --git a/deco/config/aquariusbutton.h b/deco/config/aquariusbutton.h
new file mode 100644
index 0000000..04fec0d
--- /dev/null
+++ b/deco/config/aquariusbutton.h
@@ -0,0 +1,37 @@
+#ifndef AQUARIUSBUTTON_H
+#define AQUARIUSBUTTON_H
+
+//#include <qvariant.h>
+#include <qwidget.h>
+#include <qimage.h>
+
+class QPixmap;
+class QColor;
+
+class AquariusButton : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AquariusButton( QPixmap &pixmap, QWidget* parent = 0, const char* name = 0);
+ ~AquariusButton();
+ QColor Color();
+
+public slots:
+ void setColor(QColor c);
+
+protected:
+ QPixmap pixmap;
+ QImage image;
+ QColor color;
+ void tint(QColor &c);
+ void mousePressEvent( QMouseEvent *e );
+ void paintEvent( QPaintEvent *e);
+
+
+signals:
+ void clicked();
+
+};
+
+#endif // AQUARIUSBUTTON_H
diff --git a/deco/config/baghiraconfig.cc b/deco/config/baghiraconfig.cc
new file mode 100644
index 0000000..2054976
--- /dev/null
+++ b/deco/config/baghiraconfig.cc
@@ -0,0 +1,729 @@
+//////////////////////////////////////////////////////////////////////////////
+// baghiraconfig.cc
+// -------------------
+// Config module for Baghira window decoration
+// -------------------
+// Copyright (c) 2004 Thomas Lübking
+// Please see the header file for copyright and license information.
+//////////////////////////////////////////////////////////////////////////////
+
+#include <kconfig.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kcolorbutton.h>
+#include <qbutton.h>
+#include <qbuttongroup.h>
+#include <qcombobox.h>
+#include <qcheckbox.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qfont.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qsettings.h>
+#include <qspinbox.h>
+#include <qwhatsthis.h>
+
+#include "baghiraconfig.h"
+#include "configdialog.h"
+#include "pixmaps.h"
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraConfig Class //
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraConfig()
+// -------------
+// Constructor
+
+BaghiraConfig::BaghiraConfig(KConfig*, QWidget* parent)
+ : QObject(parent), /*config_(0),*/ dialog_(0)
+{
+// config_ = new KConfig("baghirarc");
+// config_ = new QSettings;
+// config_->beginGroup("/baghira/Deco");
+ KGlobal::locale()->insertCatalogue("kwin_baghira_config");
+
+ dialog_ = new ConfigDialog(parent);
+ buttonDialog_ = new ButtonColors(parent, "Button Colors");
+ load(0L);
+
+ dialog_->show();
+
+ connect(dialog_->ButtonColorConfig, SIGNAL(clicked()), buttonDialog_, SLOT(exec()));
+ connect(buttonDialog_->ok, SIGNAL(clicked()), SIGNAL(changed()));
+
+ // connections
+ connect(dialog_->titlealign, SIGNAL(clicked(int)), SIGNAL(changed()));
+ connect(dialog_->drawComicFrame, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->addAutoSpacing, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->allowEasyClosing, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->ResizeGrip, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->maxResizable, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->fullSpec, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->noModalDeco, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->delAppname, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->defaultMode, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->minTH, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_J, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_J, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_J, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_J, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_J, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_J, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_P, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_P, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_P, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_P, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_P, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_P, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_B, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_B, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_B, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_B, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_B, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_B, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_T, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_T, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_T, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_T, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_T, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_S, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_S, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_S, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_S, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_S, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_S, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+// config_->endGroup();
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// ~BaghiraConfig()
+// --------------
+// Destructor
+
+BaghiraConfig::~BaghiraConfig()
+{
+ if (dialog_) delete dialog_;
+// if (config_) delete config_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// load()
+// ------
+// Load configuration data
+
+void BaghiraConfig::load(KConfig*)
+{
+ QSettings *config_ = new QSettings;
+ config_->beginGroup("/baghira/Deco");
+
+ QString value = config_->readEntry("TitleAlignment", "AlignHCenter");
+ QRadioButton *button = (QRadioButton*)dialog_->titlealign->
+ child((const char *)value.latin1());
+ if (button) button->setChecked(true);
+
+ dialog_->minTH->setValue(config_->readNumEntry("minimumTitleHeight",18));
+ dialog_->ResizeGrip->setChecked(config_->readBoolEntry("ResizeGrip",false));
+ dialog_->allowEasyClosing->setChecked(config_->readBoolEntry("allowEasyClosing",false));
+ dialog_->drawComicFrame->setChecked(config_->readBoolEntry("DrawComicFrame",false));
+ dialog_->maxResizable->setChecked(config_->readBoolEntry("MaxResizable",false));
+ dialog_->fullSpec->setChecked(config_->readBoolEntry("FullSpec",false));
+ dialog_->addAutoSpacing->setChecked(config_->readBoolEntry("AddAutoSpacing",true));
+ dialog_->defaultMode->setCurrentItem(config_->readNumEntry("defaultMode",1));
+ dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false));
+ dialog_->delAppname->setChecked(config_->readBoolEntry("RemoveAppname",false));
+
+ dialog_->activeColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_1",QColor(255,255,255).rgb())));
+ dialog_->inactiveColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_1",QColor(204,214,230).rgb())));
+ dialog_->activeColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_1",QColor(238,234,238).rgb())));
+ dialog_->inactiveColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_1",QColor(194,196,211).rgb())));
+ dialog_->buttonStyle_J->setCurrentItem(config_->readNumEntry("ButtonStyle_1",1));
+ dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1));
+ dialog_->i_titleeffect_J->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_1", 1));
+ dialog_->shapeUL_J->setChecked(config_->readBoolEntry("ShapeUL_1",true));
+ dialog_->shapeUR_J->setChecked(config_->readBoolEntry("ShapeUR_1",true));
+ dialog_->shapeLL_J->setChecked(config_->readBoolEntry("ShapeLL_1",false));
+ dialog_->shapeLR_J->setChecked(config_->readBoolEntry("ShapeLR_1",false));
+ dialog_->drawIcon_J->setChecked(config_->readBoolEntry("drawIcon_1",true));
+ dialog_->_3DImpact_J->setValue(config_->readNumEntry("3DImpact_1",20));
+ dialog_->LineImpact_J->setValue(config_->readNumEntry("LineImpact_1",40));
+ dialog_->borderSize_J->setValue(config_->readNumEntry("BorderSize_1",0));
+
+ dialog_->activeColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_2",QColor(238,238,238).rgb())));
+ dialog_->inactiveColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_2",QColor(246,242,246).rgb())));
+ dialog_->activeColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_2",QColor(205,202,205).rgb())));
+ dialog_->inactiveColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_2",QColor(238,238,238).rgb())));
+ dialog_->buttonStyle_P->setCurrentItem(config_->readNumEntry("ButtonStyle_2",0));
+ dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0));
+ dialog_->i_titleeffect_P->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_2", 0));
+ dialog_->shapeUL_P->setChecked(config_->readBoolEntry("ShapeUL_2",true));
+ dialog_->shapeUR_P->setChecked(config_->readBoolEntry("ShapeUR_2",true));
+ dialog_->shapeLL_P->setChecked(config_->readBoolEntry("ShapeLL_2",false));
+ dialog_->shapeLR_P->setChecked(config_->readBoolEntry("ShapeLR_2",false));
+ dialog_->drawIcon_P->setChecked(config_->readBoolEntry("drawIcon_2",true));
+ dialog_->_3DImpact_P->setValue(config_->readNumEntry("3DImpact_2",20));
+ dialog_->LineImpact_P->setValue(config_->readNumEntry("LineImpact_2",40));
+ dialog_->borderSize_P->setValue(config_->readNumEntry("BorderSize_2",0));
+
+ dialog_->activeColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_3",QColor(202,202,202).rgb())));
+ dialog_->inactiveColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_3",QColor(200,200,200).rgb())));
+ dialog_->activeColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_3",QColor(150,150,150).rgb())));
+ dialog_->inactiveColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_3",QColor(150,150,150).rgb())));
+ dialog_->buttonStyle_B->setCurrentItem(config_->readNumEntry("ButtonStyle_3",0));
+ dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4));
+ dialog_->i_titleeffect_B->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_3", 4));
+ dialog_->shapeUL_B->setChecked(config_->readBoolEntry("ShapeUL_3",true));
+ dialog_->shapeUR_B->setChecked(config_->readBoolEntry("ShapeUR_3",true));
+ dialog_->shapeLL_B->setChecked(config_->readBoolEntry("ShapeLL_3",true));
+ dialog_->shapeLR_B->setChecked(config_->readBoolEntry("ShapeLR_3",true));
+ dialog_->drawIcon_B->setChecked(config_->readBoolEntry("drawIcon_3",true));
+ dialog_->_3DImpact_B->setValue(config_->readNumEntry("3DImpact_3",20));
+ dialog_->LineImpact_B->setValue(config_->readNumEntry("LineImpact_3",0));
+ dialog_->borderSize_B->setValue(config_->readNumEntry("BorderSize_3",6));
+
+ dialog_->activeColor1_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_4",QColor(238,238,238).rgb())));
+ dialog_->activeColor2_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_4",QColor(205,202,205).rgb())));
+ dialog_->buttonStyle_T->setCurrentItem(config_->readNumEntry("ButtonStyle_4",0));
+ dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true));
+ dialog_->shapeUR_T->setChecked(config_->readBoolEntry("ShapeUR_4",true));
+ dialog_->shapeLL_T->setChecked(config_->readBoolEntry("ShapeLL_4",false));
+ dialog_->shapeLR_T->setChecked(config_->readBoolEntry("ShapeLR_4",false));
+ dialog_->drawIcon_T->setChecked(config_->readBoolEntry("drawIcon_4",true));
+ dialog_->_3DImpact_T->setValue(config_->readNumEntry("3DImpact_4",20));
+ dialog_->borderSize_T->setValue(config_->readNumEntry("BorderSize_4",0));
+
+ dialog_->activeColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_5",QColor(250,250,250).rgb())));
+ dialog_->inactiveColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_5",QColor(230,230,230).rgb())));
+ dialog_->activeColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_5",QColor(230,230,230).rgb())));
+ dialog_->inactiveColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_5",QColor(250,250,250).rgb())));
+ dialog_->buttonStyle_S->setCurrentItem(config_->readNumEntry("ButtonStyle_5",0));
+ dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0));
+ dialog_->i_titleeffect_S->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_5", 0));
+ dialog_->shapeUL_S->setChecked(config_->readBoolEntry("ShapeUL_5",true));
+ dialog_->shapeUR_S->setChecked(config_->readBoolEntry("ShapeUR_5",true));
+ dialog_->shapeLL_S->setChecked(config_->readBoolEntry("ShapeLL_5",false));
+ dialog_->shapeLR_S->setChecked(config_->readBoolEntry("ShapeLR_5",false));
+ dialog_->drawIcon_S->setChecked(config_->readBoolEntry("drawIcon_5",true));
+ dialog_->_3DImpact_S->setValue(config_->readNumEntry("3DImpact_5",20));
+ dialog_->LineImpact_S->setValue(config_->readNumEntry("LineImpact_5",30));
+ dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0));
+
+ buttonDialog_->inactiveColor->setColor(QColor((unsigned int)config_->readNumEntry("InactiveButtonColor", QColor(255,255,255).rgb())));
+ buttonDialog_->closeColor->setColor(QColor((unsigned int)config_->readNumEntry("CloseButtonColor", QColor(200,85,70).rgb())));
+ buttonDialog_->minColor->setColor(QColor((unsigned int)config_->readNumEntry("MinButtonColor", QColor(230,155,40).rgb())));
+ buttonDialog_-> maxColor->setColor(QColor((unsigned int)config_->readNumEntry("MaxButtonColor", QColor(121,180,54).rgb())));
+ buttonDialog_->menuColor->setColor(QColor((unsigned int)config_->readNumEntry("MenuButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->helpColor->setColor(QColor((unsigned int)config_->readNumEntry("HelpButtonColor", QColor(0,0,0).rgb())));
+ buttonDialog_->stickyColor->setColor(QColor((unsigned int)config_->readNumEntry("StickyButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->aboveColor->setColor(QColor((unsigned int)config_->readNumEntry("AboveButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->behindColor->setColor(QColor((unsigned int)config_->readNumEntry("BehindButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->shadeColor->setColor(QColor((unsigned int)config_->readNumEntry("ShadeButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->init();
+ config_->endGroup();
+ delete config_;
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// save()
+// ------
+// Save configuration data
+
+void BaghiraConfig::save(KConfig*)
+{
+ QSettings *config_ = new QSettings;
+ config_->beginGroup("/baghira/Deco");
+
+ QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected();
+ if (button) config_->writeEntry("TitleAlignment", QString(button->name()));
+ config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked());
+ config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked());
+ config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked());
+ config_->writeEntry("allowEasyClosing", dialog_->allowEasyClosing->isChecked());
+ config_->writeEntry("MaxResizable", dialog_->maxResizable->isChecked());
+ config_->writeEntry("FullSpec", dialog_->fullSpec->isChecked());
+ config_->writeEntry("defaultMode", dialog_->defaultMode->currentItem());
+ config_->writeEntry("minimumTitleHeight", dialog_->minTH->value());
+ config_->writeEntry("NoModalDeco", dialog_->noModalDeco->isChecked());
+ config_->writeEntry("RemoveAppname", dialog_->delAppname->isChecked());
+
+ config_->writeEntry("activeColor1_1", (int)dialog_->activeColor1_J->color().rgb());
+ config_->writeEntry("activeColor2_1", (int)dialog_->activeColor2_J->color().rgb());
+ config_->writeEntry("inactiveColor1_1", (int)dialog_->inactiveColor1_J->color().rgb());
+ config_->writeEntry("inactiveColor2_1", (int)dialog_->inactiveColor2_J->color().rgb());
+ config_->writeEntry("ButtonStyle_1", dialog_->buttonStyle_J->currentItem());
+ config_->writeEntry("TitleEffect_1", dialog_->titleeffect_J->currentItem());
+ config_->writeEntry("inactiveTitleEffect_1", dialog_->i_titleeffect_J->currentItem());
+ config_->writeEntry("ShapeUL_1", dialog_->shapeUL_J->isChecked());
+ config_->writeEntry("ShapeUR_1", dialog_->shapeUR_J->isChecked());
+ config_->writeEntry("ShapeLL_1", dialog_->shapeLL_J->isChecked());
+ config_->writeEntry("ShapeLR_1", dialog_->shapeLR_J->isChecked());
+ config_->writeEntry("drawIcon_1", dialog_->drawIcon_J->isChecked());
+ config_->writeEntry("3DImpact_1", dialog_->_3DImpact_J->value());
+ config_->writeEntry("LineImpact_1", dialog_->LineImpact_J->value());
+ config_->writeEntry("BorderSize_1", dialog_->borderSize_J->value());
+
+ config_->writeEntry("activeColor1_2", (int)dialog_->activeColor1_P->color().rgb());
+ config_->writeEntry("activeColor2_2", (int)dialog_->activeColor2_P->color().rgb());
+ config_->writeEntry("inactiveColor1_2", (int)dialog_->inactiveColor1_P->color().rgb());
+ config_->writeEntry("inactiveColor2_2", (int)dialog_->inactiveColor2_P->color().rgb());
+ config_->writeEntry("ButtonStyle_2", dialog_->buttonStyle_P->currentItem());
+ config_->writeEntry("TitleEffect_2", dialog_->titleeffect_P->currentItem());
+ config_->writeEntry("inactiveTitleEffect_2", dialog_->i_titleeffect_P->currentItem());
+ config_->writeEntry("ShapeUL_2", dialog_->shapeUL_P->isChecked());
+ config_->writeEntry("ShapeUR_2", dialog_->shapeUR_P->isChecked());
+ config_->writeEntry("ShapeLL_2", dialog_->shapeLL_P->isChecked());
+ config_->writeEntry("ShapeLR_2", dialog_->shapeLR_P->isChecked());
+ config_->writeEntry("drawIcon_2", dialog_->drawIcon_P->isChecked());
+ config_->writeEntry("3DImpact_2", dialog_->_3DImpact_P->value());
+ config_->writeEntry("LineImpact_2", dialog_->LineImpact_P->value());
+ config_->writeEntry("BorderSize_2", dialog_->borderSize_P->value());
+
+ config_->writeEntry("activeColor1_3", (int)dialog_->activeColor1_B->color().rgb());
+ config_->writeEntry("activeColor2_3", (int)dialog_->activeColor2_B->color().rgb());
+ config_->writeEntry("inactiveColor1_3", (int)dialog_->inactiveColor1_B->color().rgb());
+ config_->writeEntry("inactiveColor2_3", (int)dialog_->inactiveColor2_B->color().rgb());
+ config_->writeEntry("ButtonStyle_3", dialog_->buttonStyle_B->currentItem());
+ config_->writeEntry("TitleEffect_3", dialog_->titleeffect_B->currentItem());
+ config_->writeEntry("inactiveTitleEffect_3", dialog_->i_titleeffect_B->currentItem());
+ config_->writeEntry("ShapeUL_3", dialog_->shapeUL_B->isChecked());
+ config_->writeEntry("ShapeUR_3", dialog_->shapeUR_B->isChecked());
+ config_->writeEntry("ShapeLL_3", dialog_->shapeLL_B->isChecked());
+ config_->writeEntry("ShapeLR_3", dialog_->shapeLR_B->isChecked());
+ config_->writeEntry("drawIcon_3", dialog_->drawIcon_B->isChecked());
+ config_->writeEntry("3DImpact_3", dialog_->_3DImpact_B->value());
+ config_->writeEntry("LineImpact_3", dialog_->LineImpact_B->value());
+ config_->writeEntry("BorderSize_3", dialog_->borderSize_B->value());
+
+ config_->writeEntry("activeColor1_4", (int)dialog_->activeColor1_T->color().rgb());
+ config_->writeEntry("activeColor2_4", (int)dialog_->activeColor2_T->color().rgb());
+ config_->writeEntry("ButtonStyle_4", dialog_->buttonStyle_T->currentItem());
+ config_->writeEntry("ShapeUL_4", dialog_->shapeUL_T->isChecked());
+ config_->writeEntry("ShapeUR_4", dialog_->shapeUR_T->isChecked());
+ config_->writeEntry("ShapeLL_4", dialog_->shapeLL_T->isChecked());
+ config_->writeEntry("ShapeLR_4", dialog_->shapeLR_T->isChecked());
+ config_->writeEntry("drawIcon_4", dialog_->drawIcon_T->isChecked());
+ config_->writeEntry("3DImpact_4", dialog_->_3DImpact_T->value());
+ config_->writeEntry("BorderSize_4", dialog_->borderSize_T->value());
+
+ config_->writeEntry("activeColor1_5", (int)dialog_->activeColor1_S->color().rgb());
+ config_->writeEntry("activeColor2_5", (int)dialog_->activeColor2_S->color().rgb());
+ config_->writeEntry("inactiveColor1_5", (int)dialog_->inactiveColor1_S->color().rgb());
+ config_->writeEntry("inactiveColor2_5", (int)dialog_->inactiveColor2_S->color().rgb());
+ config_->writeEntry("ButtonStyle_5", dialog_->buttonStyle_S->currentItem());
+ config_->writeEntry("TitleEffect_5", dialog_->titleeffect_S->currentItem());
+ config_->writeEntry("inactiveTitleEffect_5", dialog_->i_titleeffect_S->currentItem());
+ config_->writeEntry("ShapeUL_5", dialog_->shapeUL_S->isChecked());
+ config_->writeEntry("ShapeUR_5", dialog_->shapeUR_S->isChecked());
+ config_->writeEntry("ShapeLL_5", dialog_->shapeLL_S->isChecked());
+ config_->writeEntry("ShapeLR_5", dialog_->shapeLR_S->isChecked());
+ config_->writeEntry("drawIcon_5", dialog_->drawIcon_S->isChecked());
+ config_->writeEntry("3DImpact_5", dialog_->_3DImpact_S->value());
+ config_->writeEntry("LineImpact_5", dialog_->LineImpact_S->value());
+ config_->writeEntry("BorderSize_5", dialog_->borderSize_S->value());
+
+ if (buttonDialog_->save){
+ config_->writeEntry("InactiveButtonColor", (int)buttonDialog_->inactiveColor->Color().rgb());
+ config_->writeEntry("CloseButtonColor", (int)buttonDialog_->closeColor->Color().rgb());
+ config_->writeEntry("MinButtonColor", (int)buttonDialog_->minColor->Color().rgb());
+ config_->writeEntry("MaxButtonColor", (int)buttonDialog_->maxColor->Color().rgb());
+ config_->writeEntry("MenuButtonColor", (int)buttonDialog_->menuColor->Color().rgb());
+ config_->writeEntry("HelpButtonColor", (int)buttonDialog_->helpColor->Color().rgb());
+ config_->writeEntry("StickyButtonColor", (int)buttonDialog_->stickyColor->Color().rgb());
+ config_->writeEntry("AboveButtonColor", (int)buttonDialog_->aboveColor->Color().rgb());
+ config_->writeEntry("BehindButtonColor", (int)buttonDialog_->behindColor->Color().rgb());
+ config_->writeEntry("ShadeButtonColor", (int)buttonDialog_->shadeColor->Color().rgb());
+ }
+ config_->endGroup();
+ delete config_;
+
+// config_->sync();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// defaults()
+// ----------
+// Set configuration defaults
+
+void BaghiraConfig::defaults()
+{
+ QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter");
+ if (button) button->setChecked(true);
+ dialog_->allowEasyClosing->setChecked(false);
+ dialog_->minTH->setValue(22);
+ dialog_->ResizeGrip->setChecked(false);
+ dialog_->drawComicFrame->setChecked(false);
+ dialog_->addAutoSpacing->setChecked(true);
+ dialog_->maxResizable->setChecked(false);
+ dialog_->fullSpec->setChecked(false);
+ dialog_->defaultMode->setCurrentItem(1);
+ dialog_->noModalDeco->setChecked(false);
+ dialog_->delAppname->setChecked(false);
+
+ dialog_->activeColor1_J->setColor(QColor(255,255,255));
+ dialog_->inactiveColor1_J->setColor(QColor(204,214,230));
+ dialog_->activeColor2_J->setColor(QColor(238,234,238));
+ dialog_->inactiveColor2_J->setColor(QColor(194,196,211));
+ dialog_->buttonStyle_J->setCurrentItem(1);
+ dialog_->titleeffect_J->setCurrentItem(1);
+ dialog_->i_titleeffect_J->setCurrentItem(1);
+ dialog_->shapeUL_J->setChecked(true);
+ dialog_->shapeUR_J->setChecked(true);
+ dialog_->shapeLL_J->setChecked(false);
+ dialog_->shapeLR_J->setChecked(false);
+ dialog_->drawIcon_J->setChecked(true);
+ dialog_->_3DImpact_J->setValue(20);
+ dialog_->LineImpact_J->setValue(40);
+ dialog_->borderSize_J->setValue(0);
+
+ dialog_->activeColor1_P->setColor(QColor(238,238,238));
+ dialog_->inactiveColor1_P->setColor(QColor(246,242,246));
+ dialog_->activeColor2_P->setColor(QColor(205,202,205));
+ dialog_->inactiveColor2_P->setColor(QColor(238,238,238));
+ dialog_->buttonStyle_P->setCurrentItem(0);
+ dialog_->titleeffect_P->setCurrentItem(0);
+ dialog_->i_titleeffect_P->setCurrentItem(0);
+ dialog_->shapeUL_P->setChecked(true);
+ dialog_->shapeUR_P->setChecked(true);
+ dialog_->shapeLL_P->setChecked(false);
+ dialog_->shapeLR_P->setChecked(false);
+ dialog_->drawIcon_P->setChecked(true);
+ dialog_->_3DImpact_P->setValue(20);
+ dialog_->LineImpact_P->setValue(30);
+ dialog_->borderSize_P->setValue(0);
+
+ dialog_->activeColor1_B->setColor(QColor(210,210,210));
+ dialog_->inactiveColor1_B->setColor(QColor(200,200,200));
+ dialog_->activeColor2_B->setColor(QColor(150,150,150));
+ dialog_->inactiveColor2_B->setColor(QColor(140,140,140));
+ dialog_->buttonStyle_B->setCurrentItem(0);
+ dialog_->titleeffect_B->setCurrentItem(4);
+ dialog_->i_titleeffect_B->setCurrentItem(4);
+ dialog_->shapeUL_B->setChecked(true);
+ dialog_->shapeUR_B->setChecked(true);
+ dialog_->shapeLL_B->setChecked(false);
+ dialog_->shapeLR_B->setChecked(false);
+ dialog_->drawIcon_B->setChecked(true);
+ dialog_->_3DImpact_B->setValue(20);
+ dialog_->LineImpact_B->setValue(0);
+ dialog_->borderSize_B->setValue(6);
+
+ dialog_->activeColor1_T->setColor(QColor(238,238,238));
+ dialog_->activeColor2_T->setColor(QColor(211,208,211));
+ dialog_->buttonStyle_T->setCurrentItem(0);
+ dialog_->shapeUL_T->setChecked(true);
+ dialog_->shapeUR_T->setChecked(true);
+ dialog_->shapeLL_T->setChecked(false);
+ dialog_->shapeLR_T->setChecked(false);
+ dialog_->drawIcon_T->setChecked(true);
+ dialog_->_3DImpact_T->setValue(20);
+ dialog_->borderSize_T->setValue(0);
+
+ dialog_->activeColor1_S->setColor(QColor(250,250,250));
+ dialog_->inactiveColor1_S->setColor(QColor(230,230,230));
+ dialog_->activeColor2_S->setColor(QColor(230,230,230));
+ dialog_->inactiveColor2_S->setColor(QColor(250,250,250));
+ dialog_->buttonStyle_S->setCurrentItem(0);
+ dialog_->titleeffect_S->setCurrentItem(0);
+ dialog_->i_titleeffect_S->setCurrentItem(0);
+ dialog_->shapeUL_S->setChecked(true);
+ dialog_->shapeUR_S->setChecked(true);
+ dialog_->shapeLL_S->setChecked(false);
+ dialog_->shapeLR_S->setChecked(false);
+ dialog_->drawIcon_S->setChecked(true);
+ dialog_->_3DImpact_S->setValue(20);
+ dialog_->LineImpact_S->setValue(30);
+ dialog_->borderSize_S->setValue(0);
+
+// buttonDialog_->defaults();
+
+
+}
+
+enum ColorPresets{Aqua = 0, Graphite, GraphiteDark, NUMBEROFCOLORS};
+
+const char * presetColorName[NUMBEROFCOLORS] = {"Aqua", "Graphite", "Graphite (Dark)" };
+
+typedef int ColorTable[10][3];
+
+const int aquaPreset[10][3] = {{255,255,255},{200,85,70},{230,155,40},{121,180,54},{74,140,242},{0,0,0},{74,140,242},{74,140,242},{74,140,242},{74,140,242}};
+const int graphitePreset[10][3] = {{255,255,255},{130,170,190},{130,170,190},{130,170,190},{130,170,190},{0,0,0},{130,170,190},{130,170,190},{130,170,190},{130,170,190}};
+const int graphiteDarkPreset[10][3] = {{255,255,255},{103,118,134},{103,118,134},{103,118,134},{103,118,134},{0,0,0},{103,118,134},{103,118,134},{103,118,134},{103,118,134}};
+const ColorTable* presetColors[NUMBEROFCOLORS] = {&aquaPreset, &graphitePreset, &graphiteDarkPreset};
+
+
+ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, name){
+ save = false;
+ layout = new QGridLayout(this,2,2,11,6, "Grid");
+ buttonLayout = new QVBoxLayout(0,0,6);
+
+ QPixmap tmpPix = QPixmap(uic_findImage("preview"));
+ inactiveButton = new AquariusButton(tmpPix,this, "Inactive Button");
+ buttonLayout->addWidget(inactiveButton);
+ closeButton = new AquariusButton(tmpPix,this, "Close Button");
+ buttonLayout->addWidget(closeButton);
+ minButton = new AquariusButton(tmpPix,this, "Minimize Button");
+ buttonLayout->addWidget(minButton);
+ maxButton = new AquariusButton(tmpPix,this, "Maximize Button");
+ buttonLayout->addWidget(maxButton);
+ stickyButton = new AquariusButton(tmpPix,this, "Sticky Button");
+ buttonLayout->addWidget(stickyButton);
+ aboveButton = new AquariusButton(tmpPix,this, "Above Button");
+ buttonLayout->addWidget(aboveButton);
+ behindButton = new AquariusButton(tmpPix,this, "Behind Button");
+ buttonLayout->addWidget(behindButton);
+ shadeButton = new AquariusButton(tmpPix,this, "Shade Button");
+ buttonLayout->addWidget(shadeButton);
+ tmpPix = QPixmap(uic_findImage("preview-menu"));
+ menuButton = new AquariusButton(tmpPix,this, "Menu Button");
+ buttonLayout->addWidget(menuButton);
+ tmpPix = QPixmap(uic_findImage("icon_help"));
+ helpButton = new AquariusButton(tmpPix,this, "Help Button");
+ buttonLayout->addWidget(helpButton);
+
+
+ twoButts = new QHBoxLayout(0,0,6);
+ presets_ = new QComboBox(this);
+ for (int i = 0; i < NUMBEROFCOLORS; i++)
+ presets_->insertItem ( presetColorName[i], i );
+ twoButts->addWidget(presets_);
+ cancel = new QPushButton("Cancel", this);
+ cancel->setDefault( true );
+ twoButts->addWidget(cancel);
+ twoButts->addStretch();
+ layout->addLayout(twoButts,1,0);
+ ok = new QPushButton("OK", this);
+ layout->addWidget(ok,1,1);
+
+ layout->addLayout(buttonLayout,0,1);
+
+ pickerLayout = new QVBoxLayout(0,0,6,0);
+
+ indicator = new QLabel(inactiveButton->name(), this);
+ indicator->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter | Qt::ExpandTabs);
+ QFont tmpFont = font();
+ tmpFont.setBold( true );
+ tmpFont.setPointSize( 24 );
+ indicator->setFont(tmpFont);
+ pickerLayout->addWidget(indicator);
+
+ inactiveColor = new ColorPicker(this);
+ pickerLayout->addWidget(inactiveColor);
+ currentPicker = inactiveColor;
+ closeColor = new ColorPicker(this);
+ pickerLayout->addWidget(closeColor);
+ closeColor->hide();
+ minColor = new ColorPicker(this);
+ pickerLayout->addWidget(minColor);
+ minColor->hide();
+ maxColor = new ColorPicker(this);
+ pickerLayout->addWidget(maxColor);
+ maxColor->hide();
+ menuColor = new ColorPicker(this);
+ pickerLayout->addWidget(menuColor);
+ menuColor->hide();
+ helpColor = new ColorPicker(this);
+ pickerLayout->addWidget(helpColor);
+ helpColor->hide();
+ stickyColor = new ColorPicker(this);
+ pickerLayout->addWidget(stickyColor);
+ stickyColor->hide();
+ aboveColor = new ColorPicker(this);
+ pickerLayout->addWidget(aboveColor);
+ aboveColor->hide();
+ behindColor = new ColorPicker(this);
+ pickerLayout->addWidget(behindColor);
+ behindColor->hide();
+ shadeColor = new ColorPicker(this);
+ pickerLayout->addWidget(shadeColor);
+ shadeColor->hide();
+
+ indicator->lower();
+
+ layout->addLayout(pickerLayout,0,0);
+
+ resize( QSize(485, 177).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+
+ connect(presets_,SIGNAL(activated(int)), this, SLOT(setColorGroup(int)));
+ connect(ok, SIGNAL(clicked()), this, SLOT(setSave()));
+ connect(ok, SIGNAL(clicked()), this, SLOT(close()) );
+ connect(ok, SIGNAL(clicked()), this, SLOT(init()) );
+ connect(cancel, SIGNAL(clicked()), this, SLOT(close()) );
+ connect(cancel, SIGNAL(clicked()), this, SLOT(reset()) );
+
+ connect(inactiveButton, SIGNAL(clicked()), this, SLOT(activateInactive()) );
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(activateClose()) );
+ connect(minButton, SIGNAL(clicked()), this, SLOT(activateMin()) );
+ connect(maxButton, SIGNAL(clicked()), this, SLOT(activateMax()) );
+ connect(menuButton, SIGNAL(clicked()), this, SLOT(activateMenu()) );
+ connect(helpButton, SIGNAL(clicked()), this, SLOT(activateHelp()) );
+ connect(stickyButton, SIGNAL(clicked()), this, SLOT(activateSticky()) );
+ connect(aboveButton, SIGNAL(clicked()), this, SLOT(activateAbove()) );
+ connect(behindButton, SIGNAL(clicked()), this, SLOT(activateBehind()) );
+ connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) );
+
+ connect(inactiveColor, SIGNAL(colorChanged(QColor)), inactiveButton, SLOT(setColor(QColor)) );
+ connect(closeColor, SIGNAL(colorChanged(QColor)), closeButton, SLOT(setColor(QColor)) );
+ connect(minColor, SIGNAL(colorChanged(QColor)), minButton, SLOT(setColor(QColor)) );
+ connect(maxColor, SIGNAL(colorChanged(QColor)), maxButton, SLOT(setColor(QColor)) );
+ connect(menuColor, SIGNAL(colorChanged(QColor)), menuButton, SLOT(setColor(QColor)) );
+ connect(helpColor, SIGNAL(colorChanged(QColor)), helpButton, SLOT(setColor(QColor)) );
+ connect(stickyColor, SIGNAL(colorChanged(QColor)), stickyButton, SLOT(setColor(QColor)) );
+ connect(aboveColor, SIGNAL(colorChanged(QColor)), aboveButton, SLOT(setColor(QColor)) );
+ connect(behindColor, SIGNAL(colorChanged(QColor)), behindButton, SLOT(setColor(QColor)) );
+ connect(shadeColor, SIGNAL(colorChanged(QColor)), shadeButton, SLOT(setColor(QColor)) );
+
+}
+
+ButtonColors::~ButtonColors(){
+}
+
+void ButtonColors::setColorGroup(int i){
+ inactiveColor->setColor(QColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb());
+ closeColor->setColor(QColor((*presetColors[i])[1][0],(*presetColors[i])[1][1],(*presetColors[i])[1][2]).rgb());
+ minColor->setColor(QColor((*presetColors[i])[2][0],(*presetColors[i])[2][1],(*presetColors[i])[2][2]).rgb());
+ maxColor->setColor(QColor((*presetColors[i])[3][0],(*presetColors[i])[3][1],(*presetColors[i])[3][2]).rgb());
+ menuColor->setColor(QColor((*presetColors[i])[4][0],(*presetColors[i])[4][1],(*presetColors[i])[4][2]).rgb());
+ helpColor->setColor(QColor((*presetColors[i])[5][0],(*presetColors[i])[5][1],(*presetColors[i])[5][2]).rgb());
+ stickyColor->setColor(QColor((*presetColors[i])[6][0],(*presetColors[i])[6][1],(*presetColors[i])[6][2]).rgb());
+ aboveColor->setColor(QColor((*presetColors[i])[7][0],(*presetColors[i])[7][1],(*presetColors[i])[7][2]).rgb());
+ behindColor->setColor(QColor((*presetColors[i])[8][0],(*presetColors[i])[8][1],(*presetColors[i])[8][2]).rgb());
+ shadeColor->setColor(QColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb());
+}
+
+void ButtonColors::setPicker(ColorPicker *picker){
+ if (currentPicker) currentPicker->hide();
+ currentPicker = picker;
+ currentPicker->show();
+}
+
+void ButtonColors::activateInactive(){
+ setPicker(inactiveColor);
+ indicator->setText( inactiveButton->name() );
+}
+void ButtonColors::activateClose(){
+ setPicker(closeColor);
+ indicator->setText( closeButton->name() );
+}
+void ButtonColors::activateMin(){
+ setPicker(minColor);
+ indicator->setText( minButton->name() );
+}
+void ButtonColors::activateMax(){
+ setPicker(maxColor);
+ indicator->setText( maxButton->name() );
+}
+void ButtonColors::activateMenu(){
+ setPicker(menuColor);
+ indicator->setText( menuButton->name() );
+}
+void ButtonColors::activateHelp(){
+ setPicker(helpColor);
+ indicator->setText( helpButton->name() );
+}
+void ButtonColors::activateSticky(){
+ setPicker(stickyColor);
+ indicator->setText( stickyButton->name() );
+}
+void ButtonColors::activateAbove(){
+ setPicker(aboveColor);
+ indicator->setText( aboveButton->name() );
+}
+void ButtonColors::activateBehind(){
+ setPicker(behindColor);
+ indicator->setText( behindButton->name() );
+}
+void ButtonColors::activateShade(){
+ setPicker(shadeColor);
+ indicator->setText( shadeButton->name() );
+}
+
+void ButtonColors::reset(){
+ inactiveColor->reset();
+ closeColor->reset();
+ minColor->reset();
+ maxColor->reset();
+ menuColor->reset();
+ helpColor->reset();
+ stickyColor->reset();
+ aboveColor->reset();
+ behindColor->reset();
+ shadeColor->reset();
+}
+
+void ButtonColors::init(){
+ inactiveColor->init();
+ closeColor->init();
+ minColor->init();
+ maxColor->init();
+ menuColor->init();
+ helpColor->init();
+ stickyColor->init();
+ aboveColor->init();
+ behindColor->init();
+ shadeColor->init();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Plugin Stuff //
+//////////////////////////////////////////////////////////////////////////////
+
+extern "C"
+{
+ QObject* allocate_config(KConfig* config, QWidget* parent) {
+ return(new BaghiraConfig(config, parent));
+ }
+}
+
+#include "baghiraconfig.moc"
diff --git a/deco/config/baghiraconfig.cc.new b/deco/config/baghiraconfig.cc.new
new file mode 100644
index 0000000..8d83666
--- /dev/null
+++ b/deco/config/baghiraconfig.cc.new
@@ -0,0 +1,730 @@
+//////////////////////////////////////////////////////////////////////////////
+// baghiraconfig.cc
+// -------------------
+// Config module for Baghira window decoration
+// -------------------
+// Copyright (c) 2004 Thomas Lübking
+// Please see the header file for copyright and license information.
+//////////////////////////////////////////////////////////////////////////////
+
+#include <kconfig.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kcolorbutton.h>
+#include <qbutton.h>
+#include <qbuttongroup.h>
+#include <qcombobox.h>
+#include <qcheckbox.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qfont.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qsettings.h>
+#include <qspinbox.h>
+#include <qwhatsthis.h>
+
+#include "baghiraconfig.h"
+#include "configdialog.h"
+#include "customdecosettings.h"
+#include "pixmaps.h"
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraConfig Class //
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// BaghiraConfig()
+// -------------
+// Constructor
+
+BaghiraConfig::BaghiraConfig(KConfig*, QWidget* parent)
+ : QObject(parent), /*config_(0),*/ dialog_(0)
+{
+// config_ = new KConfig("baghirarc");
+// config_ = new QSettings;
+// config_->beginGroup("/baghira/Deco");
+ KGlobal::locale()->insertCatalogue("kwin_baghira_config");
+
+ dialog_ = new ConfigDialog(parent);
+ buttonDialog_ = new ButtonColors(parent, "Button Colors");
+ load(0L);
+
+ dialog_->show();
+
+ connect(dialog_->ButtonColorConfig, SIGNAL(clicked()), buttonDialog_, SLOT(exec()));
+ connect(buttonDialog_->ok, SIGNAL(clicked()), SIGNAL(changed()));
+
+ // connections
+ connect(dialog_->titlealign, SIGNAL(clicked(int)), SIGNAL(changed()));
+ connect(dialog_->drawComicFrame, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->addAutoSpacing, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->allowEasyClosing, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->ResizeGrip, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->maxResizable, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->fullSpec, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->noModalDeco, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->delAppname, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->defaultMode, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->minTH, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_J, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_J, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_J, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_J, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_J, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_J, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_J, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_J, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_P, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_P, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_P, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_P, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_P, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_P, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_P, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_P, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_B, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_B, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_B, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_B, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_B, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_B, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_B, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_B, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_T, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_T, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_T, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_T, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_T, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_T, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+
+ connect(dialog_->activeColor1_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->activeColor2_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor1_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->inactiveColor2_S, SIGNAL(clicked()), SIGNAL(changed()));
+ connect(dialog_->buttonStyle_S, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->shapeUL_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeUR_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLL_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->shapeLR_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->drawIcon_S, SIGNAL(toggled(bool)), SIGNAL(changed()));
+ connect(dialog_->titleeffect_S, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->i_titleeffect_S, SIGNAL(activated(int)), SIGNAL(changed()));
+ connect(dialog_->_3DImpact_S, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->LineImpact_S, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+ connect(dialog_->borderSize_S, SIGNAL(valueChanged(int)), SIGNAL(changed()));
+// config_->endGroup();
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// ~BaghiraConfig()
+// --------------
+// Destructor
+
+BaghiraConfig::~BaghiraConfig()
+{
+ if (dialog_) delete dialog_;
+// if (config_) delete config_;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// load()
+// ------
+// Load configuration data
+
+void BaghiraConfig::load(KConfig*)
+{
+ QSettings *config_ = new QSettings;
+ config_->beginGroup("/baghira/Deco");
+
+ QString value = config_->readEntry("TitleAlignment", "AlignHCenter");
+ QRadioButton *button = (QRadioButton*)dialog_->titlealign->
+ child((const char *)value.latin1());
+ if (button) button->setChecked(true);
+
+ dialog_->minTH->setValue(config_->readNumEntry("minimumTitleHeight",18));
+ dialog_->ResizeGrip->setChecked(config_->readBoolEntry("ResizeGrip",false));
+ dialog_->allowEasyClosing->setChecked(config_->readBoolEntry("allowEasyClosing",false));
+ dialog_->drawComicFrame->setChecked(config_->readBoolEntry("DrawComicFrame",false));
+ dialog_->maxResizable->setChecked(config_->readBoolEntry("MaxResizable",false));
+ dialog_->fullSpec->setChecked(config_->readBoolEntry("FullSpec",false));
+ dialog_->addAutoSpacing->setChecked(config_->readBoolEntry("AddAutoSpacing",true));
+ dialog_->defaultMode->setCurrentItem(config_->readNumEntry("defaultMode",1));
+ dialog_->noModalDeco->setChecked(config_->readBoolEntry("NoModalDeco",false));
+ dialog_->delAppname->setChecked(config_->readBoolEntry("RemoveAppname",false));
+
+ dialog_->activeColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_1",QColor(255,255,255).rgb())));
+ dialog_->inactiveColor1_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_1",QColor(204,214,230).rgb())));
+ dialog_->activeColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_1",QColor(238,234,238).rgb())));
+ dialog_->inactiveColor2_J->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_1",QColor(194,196,211).rgb())));
+ dialog_->buttonStyle_J->setCurrentItem(config_->readNumEntry("ButtonStyle_1",1));
+ dialog_->titleeffect_J->setCurrentItem(config_->readNumEntry("TitleEffect_1", 1));
+ dialog_->i_titleeffect_J->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_1", 1));
+ dialog_->shapeUL_J->setChecked(config_->readBoolEntry("ShapeUL_1",true));
+ dialog_->shapeUR_J->setChecked(config_->readBoolEntry("ShapeUR_1",true));
+ dialog_->shapeLL_J->setChecked(config_->readBoolEntry("ShapeLL_1",false));
+ dialog_->shapeLR_J->setChecked(config_->readBoolEntry("ShapeLR_1",false));
+ dialog_->drawIcon_J->setChecked(config_->readBoolEntry("drawIcon_1",true));
+ dialog_->_3DImpact_J->setValue(config_->readNumEntry("3DImpact_1",20));
+ dialog_->LineImpact_J->setValue(config_->readNumEntry("LineImpact_1",40));
+ dialog_->borderSize_J->setValue(config_->readNumEntry("BorderSize_1",0));
+
+ dialog_->activeColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_2",QColor(238,238,238).rgb())));
+ dialog_->inactiveColor1_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_2",QColor(246,242,246).rgb())));
+ dialog_->activeColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_2",QColor(205,202,205).rgb())));
+ dialog_->inactiveColor2_P->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_2",QColor(238,238,238).rgb())));
+ dialog_->buttonStyle_P->setCurrentItem(config_->readNumEntry("ButtonStyle_2",0));
+ dialog_->titleeffect_P->setCurrentItem(config_->readNumEntry("TitleEffect_2", 0));
+ dialog_->i_titleeffect_P->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_2", 0));
+ dialog_->shapeUL_P->setChecked(config_->readBoolEntry("ShapeUL_2",true));
+ dialog_->shapeUR_P->setChecked(config_->readBoolEntry("ShapeUR_2",true));
+ dialog_->shapeLL_P->setChecked(config_->readBoolEntry("ShapeLL_2",false));
+ dialog_->shapeLR_P->setChecked(config_->readBoolEntry("ShapeLR_2",false));
+ dialog_->drawIcon_P->setChecked(config_->readBoolEntry("drawIcon_2",true));
+ dialog_->_3DImpact_P->setValue(config_->readNumEntry("3DImpact_2",20));
+ dialog_->LineImpact_P->setValue(config_->readNumEntry("LineImpact_2",40));
+ dialog_->borderSize_P->setValue(config_->readNumEntry("BorderSize_2",0));
+
+ dialog_->activeColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_3",QColor(202,202,202).rgb())));
+ dialog_->inactiveColor1_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_3",QColor(200,200,200).rgb())));
+ dialog_->activeColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_3",QColor(150,150,150).rgb())));
+ dialog_->inactiveColor2_B->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_3",QColor(150,150,150).rgb())));
+ dialog_->buttonStyle_B->setCurrentItem(config_->readNumEntry("ButtonStyle_3",0));
+ dialog_->titleeffect_B->setCurrentItem(config_->readNumEntry("TitleEffect_3", 4));
+ dialog_->i_titleeffect_B->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_3", 4));
+ dialog_->shapeUL_B->setChecked(config_->readBoolEntry("ShapeUL_3",true));
+ dialog_->shapeUR_B->setChecked(config_->readBoolEntry("ShapeUR_3",true));
+ dialog_->shapeLL_B->setChecked(config_->readBoolEntry("ShapeLL_3",true));
+ dialog_->shapeLR_B->setChecked(config_->readBoolEntry("ShapeLR_3",true));
+ dialog_->drawIcon_B->setChecked(config_->readBoolEntry("drawIcon_3",true));
+ dialog_->_3DImpact_B->setValue(config_->readNumEntry("3DImpact_3",20));
+ dialog_->LineImpact_B->setValue(config_->readNumEntry("LineImpact_3",0));
+ dialog_->borderSize_B->setValue(config_->readNumEntry("BorderSize_3",6));
+
+ dialog_->activeColor1_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_4",QColor(238,238,238).rgb())));
+ dialog_->activeColor2_T->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_4",QColor(205,202,205).rgb())));
+ dialog_->buttonStyle_T->setCurrentItem(config_->readNumEntry("ButtonStyle_4",0));
+ dialog_->shapeUL_T->setChecked(config_->readBoolEntry("ShapeUL_4",true));
+ dialog_->shapeUR_T->setChecked(config_->readBoolEntry("ShapeUR_4",true));
+ dialog_->shapeLL_T->setChecked(config_->readBoolEntry("ShapeLL_4",false));
+ dialog_->shapeLR_T->setChecked(config_->readBoolEntry("ShapeLR_4",false));
+ dialog_->drawIcon_T->setChecked(config_->readBoolEntry("drawIcon_4",true));
+ dialog_->_3DImpact_T->setValue(config_->readNumEntry("3DImpact_4",20));
+ dialog_->borderSize_T->setValue(config_->readNumEntry("BorderSize_4",0));
+
+ dialog_->activeColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor1_5",QColor(250,250,250).rgb())));
+ dialog_->inactiveColor1_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor1_5",QColor(230,230,230).rgb())));
+ dialog_->activeColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("activeColor2_5",QColor(230,230,230).rgb())));
+ dialog_->inactiveColor2_S->setColor(QColor((unsigned int)config_->readNumEntry("inactiveColor2_5",QColor(250,250,250).rgb())));
+ dialog_->buttonStyle_S->setCurrentItem(config_->readNumEntry("ButtonStyle_5",0));
+ dialog_->titleeffect_S->setCurrentItem(config_->readNumEntry("TitleEffect_5", 0));
+ dialog_->i_titleeffect_S->setCurrentItem(config_->readNumEntry("inactiveTitleEffect_5", 0));
+ dialog_->shapeUL_S->setChecked(config_->readBoolEntry("ShapeUL_5",true));
+ dialog_->shapeUR_S->setChecked(config_->readBoolEntry("ShapeUR_5",true));
+ dialog_->shapeLL_S->setChecked(config_->readBoolEntry("ShapeLL_5",false));
+ dialog_->shapeLR_S->setChecked(config_->readBoolEntry("ShapeLR_5",false));
+ dialog_->drawIcon_S->setChecked(config_->readBoolEntry("drawIcon_5",true));
+ dialog_->_3DImpact_S->setValue(config_->readNumEntry("3DImpact_5",20));
+ dialog_->LineImpact_S->setValue(config_->readNumEntry("LineImpact_5",30));
+ dialog_->borderSize_S->setValue(config_->readNumEntry("BorderSize_5",0));
+
+ buttonDialog_->inactiveColor->setColor(QColor((unsigned int)config_->readNumEntry("InactiveButtonColor", QColor(255,255,255).rgb())));
+ buttonDialog_->closeColor->setColor(QColor((unsigned int)config_->readNumEntry("CloseButtonColor", QColor(200,85,70).rgb())));
+ buttonDialog_->minColor->setColor(QColor((unsigned int)config_->readNumEntry("MinButtonColor", QColor(230,155,40).rgb())));
+ buttonDialog_-> maxColor->setColor(QColor((unsigned int)config_->readNumEntry("MaxButtonColor", QColor(121,180,54).rgb())));
+ buttonDialog_->menuColor->setColor(QColor((unsigned int)config_->readNumEntry("MenuButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->helpColor->setColor(QColor((unsigned int)config_->readNumEntry("HelpButtonColor", QColor(0,0,0).rgb())));
+ buttonDialog_->stickyColor->setColor(QColor((unsigned int)config_->readNumEntry("StickyButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->aboveColor->setColor(QColor((unsigned int)config_->readNumEntry("AboveButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->behindColor->setColor(QColor((unsigned int)config_->readNumEntry("BehindButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->shadeColor->setColor(QColor((unsigned int)config_->readNumEntry("ShadeButtonColor", QColor(74,140,242).rgb())));
+ buttonDialog_->init();
+ config_->endGroup();
+ delete config_;
+
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// save()
+// ------
+// Save configuration data
+
+void BaghiraConfig::save(KConfig*)
+{
+ QSettings *config_ = new QSettings;
+ config_->beginGroup("/baghira/Deco");
+
+ QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected();
+ if (button) config_->writeEntry("TitleAlignment", QString(button->name()));
+ config_->writeEntry("DrawComicFrame", dialog_->drawComicFrame->isChecked());
+ config_->writeEntry("AddAutoSpacing", dialog_->addAutoSpacing->isChecked());
+ config_->writeEntry("ResizeGrip", dialog_->ResizeGrip->isChecked());
+ config_->writeEntry("allowEasyClosing", dialog_->allowEasyClosing->isChecked());
+ config_->writeEntry("MaxResizable", dialog_->maxResizable->isChecked());
+ config_->writeEntry("FullSpec", dialog_->fullSpec->isChecked());
+ config_->writeEntry("defaultMode", dialog_->defaultMode->currentItem());
+ config_->writeEntry("minimumTitleHeight", dialog_->minTH->value());
+ config_->writeEntry("NoModalDeco", dialog_->noModalDeco->isChecked());
+ config_->writeEntry("RemoveAppname", dialog_->delAppname->isChecked());
+
+ config_->writeEntry("activeColor1_1", (int)dialog_->activeColor1_J->color().rgb());
+ config_->writeEntry("activeColor2_1", (int)dialog_->activeColor2_J->color().rgb());
+ config_->writeEntry("inactiveColor1_1", (int)dialog_->inactiveColor1_J->color().rgb());
+ config_->writeEntry("inactiveColor2_1", (int)dialog_->inactiveColor2_J->color().rgb());
+ config_->writeEntry("ButtonStyle_1", dialog_->buttonStyle_J->currentItem());
+ config_->writeEntry("TitleEffect_1", dialog_->titleeffect_J->currentItem());
+ config_->writeEntry("inactiveTitleEffect_1", dialog_->i_titleeffect_J->currentItem());
+ config_->writeEntry("ShapeUL_1", dialog_->shapeUL_J->isChecked());
+ config_->writeEntry("ShapeUR_1", dialog_->shapeUR_J->isChecked());
+ config_->writeEntry("ShapeLL_1", dialog_->shapeLL_J->isChecked());
+ config_->writeEntry("ShapeLR_1", dialog_->shapeLR_J->isChecked());
+ config_->writeEntry("drawIcon_1", dialog_->drawIcon_J->isChecked());
+ config_->writeEntry("3DImpact_1", dialog_->_3DImpact_J->value());
+ config_->writeEntry("LineImpact_1", dialog_->LineImpact_J->value());
+ config_->writeEntry("BorderSize_1", dialog_->borderSize_J->value());
+
+ config_->writeEntry("activeColor1_2", (int)dialog_->activeColor1_P->color().rgb());
+ config_->writeEntry("activeColor2_2", (int)dialog_->activeColor2_P->color().rgb());
+ config_->writeEntry("inactiveColor1_2", (int)dialog_->inactiveColor1_P->color().rgb());
+ config_->writeEntry("inactiveColor2_2", (int)dialog_->inactiveColor2_P->color().rgb());
+ config_->writeEntry("ButtonStyle_2", dialog_->buttonStyle_P->currentItem());
+ config_->writeEntry("TitleEffect_2", dialog_->titleeffect_P->currentItem());
+ config_->writeEntry("inactiveTitleEffect_2", dialog_->i_titleeffect_P->currentItem());
+ config_->writeEntry("ShapeUL_2", dialog_->shapeUL_P->isChecked());
+ config_->writeEntry("ShapeUR_2", dialog_->shapeUR_P->isChecked());
+ config_->writeEntry("ShapeLL_2", dialog_->shapeLL_P->isChecked());
+ config_->writeEntry("ShapeLR_2", dialog_->shapeLR_P->isChecked());
+ config_->writeEntry("drawIcon_2", dialog_->drawIcon_P->isChecked());
+ config_->writeEntry("3DImpact_2", dialog_->_3DImpact_P->value());
+ config_->writeEntry("LineImpact_2", dialog_->LineImpact_P->value());
+ config_->writeEntry("BorderSize_2", dialog_->borderSize_P->value());
+
+ config_->writeEntry("activeColor1_3", (int)dialog_->activeColor1_B->color().rgb());
+ config_->writeEntry("activeColor2_3", (int)dialog_->activeColor2_B->color().rgb());
+ config_->writeEntry("inactiveColor1_3", (int)dialog_->inactiveColor1_B->color().rgb());
+ config_->writeEntry("inactiveColor2_3", (int)dialog_->inactiveColor2_B->color().rgb());
+ config_->writeEntry("ButtonStyle_3", dialog_->buttonStyle_B->currentItem());
+ config_->writeEntry("TitleEffect_3", dialog_->titleeffect_B->currentItem());
+ config_->writeEntry("inactiveTitleEffect_3", dialog_->i_titleeffect_B->currentItem());
+ config_->writeEntry("ShapeUL_3", dialog_->shapeUL_B->isChecked());
+ config_->writeEntry("ShapeUR_3", dialog_->shapeUR_B->isChecked());
+ config_->writeEntry("ShapeLL_3", dialog_->shapeLL_B->isChecked());
+ config_->writeEntry("ShapeLR_3", dialog_->shapeLR_B->isChecked());
+ config_->writeEntry("drawIcon_3", dialog_->drawIcon_B->isChecked());
+ config_->writeEntry("3DImpact_3", dialog_->_3DImpact_B->value());
+ config_->writeEntry("LineImpact_3", dialog_->LineImpact_B->value());
+ config_->writeEntry("BorderSize_3", dialog_->borderSize_B->value());
+
+ config_->writeEntry("activeColor1_4", (int)dialog_->activeColor1_T->color().rgb());
+ config_->writeEntry("activeColor2_4", (int)dialog_->activeColor2_T->color().rgb());
+ config_->writeEntry("ButtonStyle_4", dialog_->buttonStyle_T->currentItem());
+ config_->writeEntry("ShapeUL_4", dialog_->shapeUL_T->isChecked());
+ config_->writeEntry("ShapeUR_4", dialog_->shapeUR_T->isChecked());
+ config_->writeEntry("ShapeLL_4", dialog_->shapeLL_T->isChecked());
+ config_->writeEntry("ShapeLR_4", dialog_->shapeLR_T->isChecked());
+ config_->writeEntry("drawIcon_4", dialog_->drawIcon_T->isChecked());
+ config_->writeEntry("3DImpact_4", dialog_->_3DImpact_T->value());
+ config_->writeEntry("BorderSize_4", dialog_->borderSize_T->value());
+
+ config_->writeEntry("activeColor1_5", (int)dialog_->activeColor1_S->color().rgb());
+ config_->writeEntry("activeColor2_5", (int)dialog_->activeColor2_S->color().rgb());
+ config_->writeEntry("inactiveColor1_5", (int)dialog_->inactiveColor1_S->color().rgb());
+ config_->writeEntry("inactiveColor2_5", (int)dialog_->inactiveColor2_S->color().rgb());
+ config_->writeEntry("ButtonStyle_5", dialog_->buttonStyle_S->currentItem());
+ config_->writeEntry("TitleEffect_5", dialog_->titleeffect_S->currentItem());
+ config_->writeEntry("inactiveTitleEffect_5", dialog_->i_titleeffect_S->currentItem());
+ config_->writeEntry("ShapeUL_5", dialog_->shapeUL_S->isChecked());
+ config_->writeEntry("ShapeUR_5", dialog_->shapeUR_S->isChecked());
+ config_->writeEntry("ShapeLL_5", dialog_->shapeLL_S->isChecked());
+ config_->writeEntry("ShapeLR_5", dialog_->shapeLR_S->isChecked());
+ config_->writeEntry("drawIcon_5", dialog_->drawIcon_S->isChecked());
+ config_->writeEntry("3DImpact_5", dialog_->_3DImpact_S->value());
+ config_->writeEntry("LineImpact_5", dialog_->LineImpact_S->value());
+ config_->writeEntry("BorderSize_5", dialog_->borderSize_S->value());
+
+ if (buttonDialog_->save){
+ config_->writeEntry("InactiveButtonColor", (int)buttonDialog_->inactiveColor->Color().rgb());
+ config_->writeEntry("CloseButtonColor", (int)buttonDialog_->closeColor->Color().rgb());
+ config_->writeEntry("MinButtonColor", (int)buttonDialog_->minColor->Color().rgb());
+ config_->writeEntry("MaxButtonColor", (int)buttonDialog_->maxColor->Color().rgb());
+ config_->writeEntry("MenuButtonColor", (int)buttonDialog_->menuColor->Color().rgb());
+ config_->writeEntry("HelpButtonColor", (int)buttonDialog_->helpColor->Color().rgb());
+ config_->writeEntry("StickyButtonColor", (int)buttonDialog_->stickyColor->Color().rgb());
+ config_->writeEntry("AboveButtonColor", (int)buttonDialog_->aboveColor->Color().rgb());
+ config_->writeEntry("BehindButtonColor", (int)buttonDialog_->behindColor->Color().rgb());
+ config_->writeEntry("ShadeButtonColor", (int)buttonDialog_->shadeColor->Color().rgb());
+ }
+ config_->endGroup();
+ delete config_;
+
+// config_->sync();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// defaults()
+// ----------
+// Set configuration defaults
+
+void BaghiraConfig::defaults()
+{
+ QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter");
+ if (button) button->setChecked(true);
+ dialog_->allowEasyClosing->setChecked(false);
+ dialog_->minTH->setValue(22);
+ dialog_->ResizeGrip->setChecked(false);
+ dialog_->drawComicFrame->setChecked(false);
+ dialog_->addAutoSpacing->setChecked(true);
+ dialog_->maxResizable->setChecked(false);
+ dialog_->fullSpec->setChecked(false);
+ dialog_->defaultMode->setCurrentItem(1);
+ dialog_->noModalDeco->setChecked(false);
+ dialog_->delAppname->setChecked(false);
+
+ dialog_->activeColor1_J->setColor(QColor(255,255,255));
+ dialog_->inactiveColor1_J->setColor(QColor(204,214,230));
+ dialog_->activeColor2_J->setColor(QColor(238,234,238));
+ dialog_->inactiveColor2_J->setColor(QColor(194,196,211));
+ dialog_->buttonStyle_J->setCurrentItem(1);
+ dialog_->titleeffect_J->setCurrentItem(1);
+ dialog_->i_titleeffect_J->setCurrentItem(1);
+ dialog_->shapeUL_J->setChecked(true);
+ dialog_->shapeUR_J->setChecked(true);
+ dialog_->shapeLL_J->setChecked(false);
+ dialog_->shapeLR_J->setChecked(false);
+ dialog_->drawIcon_J->setChecked(true);
+ dialog_->_3DImpact_J->setValue(20);
+ dialog_->LineImpact_J->setValue(40);
+ dialog_->borderSize_J->setValue(0);
+
+ dialog_->activeColor1_P->setColor(QColor(238,238,238));
+ dialog_->inactiveColor1_P->setColor(QColor(246,242,246));
+ dialog_->activeColor2_P->setColor(QColor(205,202,205));
+ dialog_->inactiveColor2_P->setColor(QColor(238,238,238));
+ dialog_->buttonStyle_P->setCurrentItem(0);
+ dialog_->titleeffect_P->setCurrentItem(0);
+ dialog_->i_titleeffect_P->setCurrentItem(0);
+ dialog_->shapeUL_P->setChecked(true);
+ dialog_->shapeUR_P->setChecked(true);
+ dialog_->shapeLL_P->setChecked(false);
+ dialog_->shapeLR_P->setChecked(false);
+ dialog_->drawIcon_P->setChecked(true);
+ dialog_->_3DImpact_P->setValue(20);
+ dialog_->LineImpact_P->setValue(30);
+ dialog_->borderSize_P->setValue(0);
+
+ dialog_->activeColor1_B->setColor(QColor(210,210,210));
+ dialog_->inactiveColor1_B->setColor(QColor(200,200,200));
+ dialog_->activeColor2_B->setColor(QColor(150,150,150));
+ dialog_->inactiveColor2_B->setColor(QColor(140,140,140));
+ dialog_->buttonStyle_B->setCurrentItem(0);
+ dialog_->titleeffect_B->setCurrentItem(4);
+ dialog_->i_titleeffect_B->setCurrentItem(4);
+ dialog_->shapeUL_B->setChecked(true);
+ dialog_->shapeUR_B->setChecked(true);
+ dialog_->shapeLL_B->setChecked(false);
+ dialog_->shapeLR_B->setChecked(false);
+ dialog_->drawIcon_B->setChecked(true);
+ dialog_->_3DImpact_B->setValue(20);
+ dialog_->LineImpact_B->setValue(0);
+ dialog_->borderSize_B->setValue(6);
+
+ dialog_->activeColor1_T->setColor(QColor(238,238,238));
+ dialog_->activeColor2_T->setColor(QColor(211,208,211));
+ dialog_->buttonStyle_T->setCurrentItem(0);
+ dialog_->shapeUL_T->setChecked(true);
+ dialog_->shapeUR_T->setChecked(true);
+ dialog_->shapeLL_T->setChecked(false);
+ dialog_->shapeLR_T->setChecked(false);
+ dialog_->drawIcon_T->setChecked(true);
+ dialog_->_3DImpact_T->setValue(20);
+ dialog_->borderSize_T->setValue(0);
+
+ dialog_->activeColor1_S->setColor(QColor(250,250,250));
+ dialog_->inactiveColor1_S->setColor(QColor(230,230,230));
+ dialog_->activeColor2_S->setColor(QColor(230,230,230));
+ dialog_->inactiveColor2_S->setColor(QColor(250,250,250));
+ dialog_->buttonStyle_S->setCurrentItem(0);
+ dialog_->titleeffect_S->setCurrentItem(0);
+ dialog_->i_titleeffect_S->setCurrentItem(0);
+ dialog_->shapeUL_S->setChecked(true);
+ dialog_->shapeUR_S->setChecked(true);
+ dialog_->shapeLL_S->setChecked(false);
+ dialog_->shapeLR_S->setChecked(false);
+ dialog_->drawIcon_S->setChecked(true);
+ dialog_->_3DImpact_S->setValue(20);
+ dialog_->LineImpact_S->setValue(30);
+ dialog_->borderSize_S->setValue(0);
+
+// buttonDialog_->defaults();
+
+
+}
+
+enum ColorPresets{Aqua = 0, Graphite, GraphiteDark, NUMBEROFCOLORS};
+
+const char * presetColorName[NUMBEROFCOLORS] = {"Aqua", "Graphite", "Graphite (Dark)" };
+
+typedef int ColorTable[10][3];
+
+const int aquaPreset[10][3] = {{255,255,255},{200,85,70},{230,155,40},{121,180,54},{74,140,242},{0,0,0},{74,140,242},{74,140,242},{74,140,242},{74,140,242}};
+const int graphitePreset[10][3] = {{255,255,255},{130,170,190},{130,170,190},{130,170,190},{130,170,190},{0,0,0},{130,170,190},{130,170,190},{130,170,190},{130,170,190}};
+const int graphiteDarkPreset[10][3] = {{255,255,255},{103,118,134},{103,118,134},{103,118,134},{103,118,134},{0,0,0},{103,118,134},{103,118,134},{103,118,134},{103,118,134}};
+const ColorTable* presetColors[NUMBEROFCOLORS] = {&aquaPreset, &graphitePreset, &graphiteDarkPreset};
+
+
+ButtonColors::ButtonColors(QWidget *parent, const char * name) : QDialog(parent, name){
+ save = false;
+ layout = new QGridLayout(this,2,2,11,6, "Grid");
+ buttonLayout = new QVBoxLayout(0,0,6);
+
+ QPixmap tmpPix = QPixmap(uic_findImage("preview"));
+ inactiveButton = new AquariusButton(tmpPix,this, "Inactive Button");
+ buttonLayout->addWidget(inactiveButton);
+ closeButton = new AquariusButton(tmpPix,this, "Close Button");
+ buttonLayout->addWidget(closeButton);
+ minButton = new AquariusButton(tmpPix,this, "Minimize Button");
+ buttonLayout->addWidget(minButton);
+ maxButton = new AquariusButton(tmpPix,this, "Maximize Button");
+ buttonLayout->addWidget(maxButton);
+ stickyButton = new AquariusButton(tmpPix,this, "Sticky Button");
+ buttonLayout->addWidget(stickyButton);
+ aboveButton = new AquariusButton(tmpPix,this, "Above Button");
+ buttonLayout->addWidget(aboveButton);
+ behindButton = new AquariusButton(tmpPix,this, "Behind Button");
+ buttonLayout->addWidget(behindButton);
+ shadeButton = new AquariusButton(tmpPix,this, "Shade Button");
+ buttonLayout->addWidget(shadeButton);
+ tmpPix = QPixmap(uic_findImage("preview-menu"));
+ menuButton = new AquariusButton(tmpPix,this, "Menu Button");
+ buttonLayout->addWidget(menuButton);
+ tmpPix = QPixmap(uic_findImage("icon_help"));
+ helpButton = new AquariusButton(tmpPix,this, "Help Button");
+ buttonLayout->addWidget(helpButton);
+
+
+ twoButts = new QHBoxLayout(0,0,6);
+ presets_ = new QComboBox(this);
+ for (int i = 0; i < NUMBEROFCOLORS; i++)
+ presets_->insertItem ( presetColorName[i], i );
+ twoButts->addWidget(presets_);
+ cancel = new QPushButton("Cancel", this);
+ cancel->setDefault( true );
+ twoButts->addWidget(cancel);
+ twoButts->addStretch();
+ layout->addLayout(twoButts,1,0);
+ ok = new QPushButton("OK", this);
+ layout->addWidget(ok,1,1);
+
+ layout->addLayout(buttonLayout,0,1);
+
+ pickerLayout = new QVBoxLayout(0,0,6,0);
+
+ indicator = new QLabel(inactiveButton->name(), this);
+ indicator->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter | Qt::ExpandTabs);
+ QFont tmpFont = font();
+ tmpFont.setBold( true );
+ tmpFont.setPointSize( 24 );
+ indicator->setFont(tmpFont);
+ pickerLayout->addWidget(indicator);
+
+ inactiveColor = new ColorPicker(this);
+ pickerLayout->addWidget(inactiveColor);
+ currentPicker = inactiveColor;
+ closeColor = new ColorPicker(this);
+ pickerLayout->addWidget(closeColor);
+ closeColor->hide();
+ minColor = new ColorPicker(this);
+ pickerLayout->addWidget(minColor);
+ minColor->hide();
+ maxColor = new ColorPicker(this);
+ pickerLayout->addWidget(maxColor);
+ maxColor->hide();
+ menuColor = new ColorPicker(this);
+ pickerLayout->addWidget(menuColor);
+ menuColor->hide();
+ helpColor = new ColorPicker(this);
+ pickerLayout->addWidget(helpColor);
+ helpColor->hide();
+ stickyColor = new ColorPicker(this);
+ pickerLayout->addWidget(stickyColor);
+ stickyColor->hide();
+ aboveColor = new ColorPicker(this);
+ pickerLayout->addWidget(aboveColor);
+ aboveColor->hide();
+ behindColor = new ColorPicker(this);
+ pickerLayout->addWidget(behindColor);
+ behindColor->hide();
+ shadeColor = new ColorPicker(this);
+ pickerLayout->addWidget(shadeColor);
+ shadeColor->hide();
+
+ indicator->lower();
+
+ layout->addLayout(pickerLayout,0,0);
+
+ resize( QSize(485, 177).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+
+ connect(presets_,SIGNAL(activated(int)), this, SLOT(setColorGroup(int)));
+ connect(ok, SIGNAL(clicked()), this, SLOT(setSave()));
+ connect(ok, SIGNAL(clicked()), this, SLOT(close()) );
+ connect(ok, SIGNAL(clicked()), this, SLOT(init()) );
+ connect(cancel, SIGNAL(clicked()), this, SLOT(close()) );
+ connect(cancel, SIGNAL(clicked()), this, SLOT(reset()) );
+
+ connect(inactiveButton, SIGNAL(clicked()), this, SLOT(activateInactive()) );
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(activateClose()) );
+ connect(minButton, SIGNAL(clicked()), this, SLOT(activateMin()) );
+ connect(maxButton, SIGNAL(clicked()), this, SLOT(activateMax()) );
+ connect(menuButton, SIGNAL(clicked()), this, SLOT(activateMenu()) );
+ connect(helpButton, SIGNAL(clicked()), this, SLOT(activateHelp()) );
+ connect(stickyButton, SIGNAL(clicked()), this, SLOT(activateSticky()) );
+ connect(aboveButton, SIGNAL(clicked()), this, SLOT(activateAbove()) );
+ connect(behindButton, SIGNAL(clicked()), this, SLOT(activateBehind()) );
+ connect(shadeButton, SIGNAL(clicked()), this, SLOT(activateShade()) );
+
+ connect(inactiveColor, SIGNAL(colorChanged(QColor)), inactiveButton, SLOT(setColor(QColor)) );
+ connect(closeColor, SIGNAL(colorChanged(QColor)), closeButton, SLOT(setColor(QColor)) );
+ connect(minColor, SIGNAL(colorChanged(QColor)), minButton, SLOT(setColor(QColor)) );
+ connect(maxColor, SIGNAL(colorChanged(QColor)), maxButton, SLOT(setColor(QColor)) );
+ connect(menuColor, SIGNAL(colorChanged(QColor)), menuButton, SLOT(setColor(QColor)) );
+ connect(helpColor, SIGNAL(colorChanged(QColor)), helpButton, SLOT(setColor(QColor)) );
+ connect(stickyColor, SIGNAL(colorChanged(QColor)), stickyButton, SLOT(setColor(QColor)) );
+ connect(aboveColor, SIGNAL(colorChanged(QColor)), aboveButton, SLOT(setColor(QColor)) );
+ connect(behindColor, SIGNAL(colorChanged(QColor)), behindButton, SLOT(setColor(QColor)) );
+ connect(shadeColor, SIGNAL(colorChanged(QColor)), shadeButton, SLOT(setColor(QColor)) );
+
+}
+
+ButtonColors::~ButtonColors(){
+}
+
+void ButtonColors::setColorGroup(int i){
+ inactiveColor->setColor(QColor((*presetColors[i])[0][0],(*presetColors[i])[0][1],(*presetColors[i])[0][2]).rgb());
+ closeColor->setColor(QColor((*presetColors[i])[1][0],(*presetColors[i])[1][1],(*presetColors[i])[1][2]).rgb());
+ minColor->setColor(QColor((*presetColors[i])[2][0],(*presetColors[i])[2][1],(*presetColors[i])[2][2]).rgb());
+ maxColor->setColor(QColor((*presetColors[i])[3][0],(*presetColors[i])[3][1],(*presetColors[i])[3][2]).rgb());
+ menuColor->setColor(QColor((*presetColors[i])[4][0],(*presetColors[i])[4][1],(*presetColors[i])[4][2]).rgb());
+ helpColor->setColor(QColor((*presetColors[i])[5][0],(*presetColors[i])[5][1],(*presetColors[i])[5][2]).rgb());
+ stickyColor->setColor(QColor((*presetColors[i])[6][0],(*presetColors[i])[6][1],(*presetColors[i])[6][2]).rgb());
+ aboveColor->setColor(QColor((*presetColors[i])[7][0],(*presetColors[i])[7][1],(*presetColors[i])[7][2]).rgb());
+ behindColor->setColor(QColor((*presetColors[i])[8][0],(*presetColors[i])[8][1],(*presetColors[i])[8][2]).rgb());
+ shadeColor->setColor(QColor((*presetColors[i])[9][0],(*presetColors[i])[9][1],(*presetColors[i])[9][2]).rgb());
+}
+
+void ButtonColors::setPicker(ColorPicker *picker){
+ if (currentPicker) currentPicker->hide();
+ currentPicker = picker;
+ currentPicker->show();
+}
+
+void ButtonColors::activateInactive(){
+ setPicker(inactiveColor);
+ indicator->setText( inactiveButton->name() );
+}
+void ButtonColors::activateClose(){
+ setPicker(closeColor);
+ indicator->setText( closeButton->name() );
+}
+void ButtonColors::activateMin(){
+ setPicker(minColor);
+ indicator->setText( minButton->name() );
+}
+void ButtonColors::activateMax(){
+ setPicker(maxColor);
+ indicator->setText( maxButton->name() );
+}
+void ButtonColors::activateMenu(){
+ setPicker(menuColor);
+ indicator->setText( menuButton->name() );
+}
+void ButtonColors::activateHelp(){
+ setPicker(helpColor);
+ indicator->setText( helpButton->name() );
+}
+void ButtonColors::activateSticky(){
+ setPicker(stickyColor);
+ indicator->setText( stickyButton->name() );
+}
+void ButtonColors::activateAbove(){
+ setPicker(aboveColor);
+ indicator->setText( aboveButton->name() );
+}
+void ButtonColors::activateBehind(){
+ setPicker(behindColor);
+ indicator->setText( behindButton->name() );
+}
+void ButtonColors::activateShade(){
+ setPicker(shadeColor);
+ indicator->setText( shadeButton->name() );
+}
+
+void ButtonColors::reset(){
+ inactiveColor->reset();
+ closeColor->reset();
+ minColor->reset();
+ maxColor->reset();
+ menuColor->reset();
+ helpColor->reset();
+ stickyColor->reset();
+ aboveColor->reset();
+ behindColor->reset();
+ shadeColor->reset();
+}
+
+void ButtonColors::init(){
+ inactiveColor->init();
+ closeColor->init();
+ minColor->init();
+ maxColor->init();
+ menuColor->init();
+ helpColor->init();
+ stickyColor->init();
+ aboveColor->init();
+ behindColor->init();
+ shadeColor->init();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Plugin Stuff //
+//////////////////////////////////////////////////////////////////////////////
+
+extern "C"
+{
+ QObject* allocate_config(KConfig* config, QWidget* parent) {
+ return(new BaghiraConfig(config, parent));
+ }
+}
+
+#include "baghiraconfig.moc"
diff --git a/deco/config/baghiraconfig.h b/deco/config/baghiraconfig.h
new file mode 100644
index 0000000..07b04a5
--- /dev/null
+++ b/deco/config/baghiraconfig.h
@@ -0,0 +1,145 @@
+//////////////////////////////////////////////////////////////////////////////
+// baghiraconfig.h
+// -------------------
+// Config module for Baghira window decoration
+// -------------------
+// Copyright (c) 2004 Thomas Lübking
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BAGHIRACONFIG_H
+#define BAGHIRACONFIG_H
+
+#include <qobject.h>
+#include <qdialog.h>
+#include "colorpicker.h"
+#include "aquariusbutton.h"
+
+class KConfig;
+class QSettings;
+class ConfigDialog;
+class QLabel;
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QPushButton;
+class QComboBox;
+
+class ButtonColors : public QDialog
+{
+ Q_OBJECT
+public:
+ ButtonColors(QWidget* parent, const char * name = 0);
+ ~ButtonColors();
+ ColorPicker *inactiveColor;
+ ColorPicker *closeColor;
+ ColorPicker *minColor;
+ ColorPicker *maxColor;
+ ColorPicker *menuColor;
+ ColorPicker *helpColor;
+ ColorPicker *stickyColor;
+ ColorPicker *aboveColor;
+ ColorPicker *behindColor;
+ ColorPicker *shadeColor;
+ ColorPicker *currentPicker;
+
+ AquariusButton *inactiveButton;
+ AquariusButton *closeButton;
+ AquariusButton *minButton;
+ AquariusButton *maxButton;
+ AquariusButton *menuButton;
+ AquariusButton *helpButton;
+ AquariusButton *stickyButton;
+ AquariusButton *aboveButton;
+ AquariusButton *behindButton;
+ AquariusButton *shadeButton;
+
+ QHBoxLayout *twoButts;
+ QPushButton *cancel;
+ QPushButton *ok;
+ QComboBox *presets_;
+ bool save;
+
+public slots:
+// void defaults();
+ void setColorGroup(int);
+ void init();
+
+
+private:
+
+/*
+ |------------|---|
+ | Indicator | B |
+ |------------|---|
+ | | T |
+ | Picker |---|
+ | | N |
+ |------------|---|
+*/
+
+ QVBoxLayout *buttonLayout;
+ QVBoxLayout *pickerLayout;
+ QGridLayout *layout;
+ QLabel *indicator;
+
+ void setPicker(ColorPicker *picker);
+
+private slots:
+ void activateInactive();
+ void activateClose();
+ void activateMin();
+ void activateMax();
+ void activateMenu();
+ void activateHelp();
+ void activateSticky();
+ void activateAbove();
+ void activateBehind();
+ void activateShade();
+ void setSave(){
+ save = true;
+ }
+ void reset();
+};
+
+
+class BaghiraConfig : public QObject
+{
+ Q_OBJECT
+public:
+ BaghiraConfig(KConfig* config, QWidget* parent);
+ ~BaghiraConfig();
+
+signals:
+ void changed();
+
+public slots:
+ void load(KConfig* conf);
+ void save(KConfig* conf);
+ void defaults();
+
+private:
+// QSettings *config_;
+ ConfigDialog *dialog_;
+ ButtonColors *buttonDialog_;
+};
+
+
+#endif // BAGHIRACONFIG_H
diff --git a/deco/config/baghiraconfig.h.new b/deco/config/baghiraconfig.h.new
new file mode 100644
index 0000000..0f75139
--- /dev/null
+++ b/deco/config/baghiraconfig.h.new
@@ -0,0 +1,149 @@
+//////////////////////////////////////////////////////////////////////////////
+// baghiraconfig.h
+// -------------------
+// Config module for Baghira window decoration
+// -------------------
+// Copyright (c) 2004 Thomas Lübking
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BAGHIRACONFIG_H
+#define BAGHIRACONFIG_H
+
+#include <qobject.h>
+#include <qdialog.h>
+#include <qvaluelist.h>
+#include "colorpicker.h"
+#include "aquariusbutton.h"
+
+class KConfig;
+class QSettings;
+class ConfigDialog;
+class QLabel;
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QPushButton;
+class QComboBox;
+
+class ButtonColors : public QDialog
+{
+ Q_OBJECT
+public:
+ ButtonColors(QWidget* parent, const char * name = 0);
+ ~ButtonColors();
+ ColorPicker *inactiveColor;
+ ColorPicker *closeColor;
+ ColorPicker *minColor;
+ ColorPicker *maxColor;
+ ColorPicker *menuColor;
+ ColorPicker *helpColor;
+ ColorPicker *stickyColor;
+ ColorPicker *aboveColor;
+ ColorPicker *behindColor;
+ ColorPicker *shadeColor;
+ ColorPicker *currentPicker;
+
+ AquariusButton *inactiveButton;
+ AquariusButton *closeButton;
+ AquariusButton *minButton;
+ AquariusButton *maxButton;
+ AquariusButton *menuButton;
+ AquariusButton *helpButton;
+ AquariusButton *stickyButton;
+ AquariusButton *aboveButton;
+ AquariusButton *behindButton;
+ AquariusButton *shadeButton;
+
+ QHBoxLayout *twoButts;
+ QPushButton *cancel;
+ QPushButton *ok;
+ QComboBox *presets_;
+ bool save;
+
+public slots:
+// void defaults();
+ void setColorGroup(int);
+ void init();
+
+
+private:
+
+/*
+ |------------|---|
+ | Indicator | B |
+ |------------|---|
+ | | T |
+ | Picker |---|
+ | | N |
+ |------------|---|
+*/
+
+ QVBoxLayout *buttonLayout;
+ QVBoxLayout *pickerLayout;
+ QGridLayout *layout;
+ QLabel *indicator;
+
+ void setPicker(ColorPicker *picker);
+
+private slots:
+ void activateInactive();
+ void activateClose();
+ void activateMin();
+ void activateMax();
+ void activateMenu();
+ void activateHelp();
+ void activateSticky();
+ void activateAbove();
+ void activateBehind();
+ void activateShade();
+ void setSave(){
+ save = true;
+ }
+ void reset();
+};
+
+class CustomDecoSettings;
+
+class BaghiraConfig : public QObject
+{
+ Q_OBJECT
+public:
+ BaghiraConfig(KConfig* config, QWidget* parent);
+ ~BaghiraConfig();
+
+signals:
+ void changed();
+
+public slots:
+ void load(KConfig* conf);
+ void save(KConfig* conf);
+ void defaults();
+
+private:
+// QSettings *config_;
+ ConfigDialog *dialog_;
+ ButtonColors *buttonDialog_;
+ typedef QValueList<CustomDecoSettings> DecoList;
+ DecoList decoList;
+};
+
+
+#endif // BAGHIRACONFIG_H
diff --git a/deco/config/colorpicker.cc b/deco/config/colorpicker.cc
new file mode 100644
index 0000000..5e11312
--- /dev/null
+++ b/deco/config/colorpicker.cc
@@ -0,0 +1,124 @@
+#include "colorpicker.h"
+#include <qcolor.h>
+#include <qlayout.h>
+#include <qslider.h>
+#include <qspinbox.h>
+
+ColorPicker::ColorPicker(QWidget* parent, const char* name) : QGroupBox( parent, name){
+// box = new QGroupBox(parent);
+// setFrameShape(QFrame::GroupBoxPanel);
+// setFrameShadow(QFrame::Sunken);
+ setColumnLayout(0, Qt::Vertical );
+ layout()->setSpacing( 6 );
+ layout()->setMargin( 11 );
+
+ QVBoxLayout *vLayout = new QVBoxLayout(layout());
+// gridLayout->setAlignment( Qt::AlignTop );
+
+ QHBoxLayout *redLayout = new QHBoxLayout();
+ redSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "redSlider");
+ redLayout->addWidget(redSlider);
+
+ redValue = new QSpinBox(0,255,1,this);
+ redValue->setValue(0);
+ redLayout->addWidget(redValue);
+
+ vLayout->addLayout(redLayout);
+
+ QHBoxLayout *greenLayout = new QHBoxLayout();
+ greenSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "greenSlider");
+ greenLayout->addWidget(greenSlider);
+
+ greenValue = new QSpinBox(0,255,1,this);
+ greenValue->setValue(0);
+ greenLayout->addWidget(greenValue);
+
+ vLayout->addLayout(greenLayout);
+
+ QHBoxLayout *blueLayout = new QHBoxLayout();
+ blueSlider = new QSlider(0, 255, 1, 0, Qt::Horizontal, this, "blueSlider");
+ blueLayout->addWidget(blueSlider);
+
+ blueValue = new QSpinBox(0,255,1,this);
+ blueValue->setValue(0);
+ blueLayout->addWidget(blueValue);
+
+ vLayout->addLayout(blueLayout);
+
+// resize( QSize(350, 100).expandedTo(minimumSizeHint()) );
+
+ //connections
+ connect(redSlider, SIGNAL(valueChanged (int)), this, SLOT(setRed(int)));
+ connect(greenSlider, SIGNAL(valueChanged (int)), this, SLOT(setGreen(int)));
+ connect(blueSlider, SIGNAL(valueChanged (int)), this, SLOT(setBlue(int)));
+ connect(redValue, SIGNAL(valueChanged (int)), this, SLOT(setRed(int)));
+ connect(greenValue, SIGNAL(valueChanged (int)), this, SLOT(setGreen(int)));
+ connect(blueValue, SIGNAL(valueChanged (int)), this, SLOT(setBlue(int)));
+}
+
+ColorPicker::~ColorPicker(){
+}
+
+void ColorPicker::setColor(QColor color){
+ redSlider->blockSignals(true);
+ redSlider->setValue( color.red() );
+ redSlider->blockSignals(false);
+ redValue->blockSignals(true);
+ redValue->setValue(redSlider->value());
+ redValue->blockSignals(false);
+ greenSlider->blockSignals(true);
+ greenSlider->setValue( color.green() );
+ greenSlider->blockSignals(false);
+ greenValue->blockSignals(true);
+ greenValue->setValue(greenSlider->value());
+ greenValue->blockSignals(false);
+ blueSlider->blockSignals(true);
+ blueSlider->setValue( color.blue() );
+ blueSlider->blockSignals(false);
+ blueValue->blockSignals(true);
+ blueValue->setValue(blueSlider->value());
+ blueValue->blockSignals(false);
+ emit colorChanged(color);
+}
+
+void ColorPicker::setRed(int red){
+ redSlider->blockSignals(true);
+ redSlider->setValue( red );
+ redSlider->blockSignals(false);
+ redValue->blockSignals(true);
+ redValue->setValue(red);
+ redValue->blockSignals(false);
+ emit colorChanged(QColor(red, greenSlider->value(), blueSlider->value()));
+}
+
+void ColorPicker::setGreen(int green){
+ greenSlider->blockSignals(true);
+ greenSlider->setValue( green );
+ greenSlider->blockSignals(false);
+ greenValue->blockSignals(true);
+ greenValue->setValue(green);
+ greenValue->blockSignals(false);
+ emit colorChanged(QColor(redSlider->value(), green, blueSlider->value()));
+}
+
+void ColorPicker::setBlue(int blue){
+ blueSlider->blockSignals(true);
+ blueSlider->setValue( blue );
+ blueSlider->blockSignals(false);
+ blueValue->blockSignals(true);
+ blueValue->setValue(blue);
+ blueValue->blockSignals(false);
+ emit colorChanged(QColor(redSlider->value(), greenSlider->value(), blue));
+}
+
+QColor ColorPicker::Color(){
+ return QColor(redSlider->value(), greenSlider->value(), blueSlider->value());
+}
+
+void ColorPicker::reset(){
+ setColor(color_);
+}
+
+void ColorPicker::init(){
+ color_ = Color();
+} \ No newline at end of file
diff --git a/deco/config/colorpicker.h b/deco/config/colorpicker.h
new file mode 100644
index 0000000..3b4ec48
--- /dev/null
+++ b/deco/config/colorpicker.h
@@ -0,0 +1,44 @@
+#ifndef COLORPICKER_H
+#define COLORPICKER_H
+
+//#include <qvariant.h>
+#include <qgroupbox.h>
+
+class QSlider;
+class QSpinBox;
+class QColor;
+//class QGroupBox;
+
+class ColorPicker : public QGroupBox
+{
+ Q_OBJECT
+
+public:
+ ColorPicker( QWidget* parent = 0, const char* name = 0);
+ ~ColorPicker();
+ QColor Color();
+
+public slots:
+ void setColor(QColor color);
+ void setRed(int red);
+ void setGreen(int green);
+ void setBlue(int blue);
+ void reset();
+ void init();
+
+protected:
+ QSlider *redSlider;
+ QSlider *greenSlider;
+ QSlider *blueSlider;
+ QSpinBox *redValue;
+ QSpinBox *greenValue;
+ QSpinBox *blueValue;
+ QColor color_;
+// QGroupBox *box;
+
+signals:
+ void colorChanged(QColor color);
+
+};
+
+#endif // COLORPICKER_H
diff --git a/deco/config/configdialog.ui b/deco/config/configdialog.ui
new file mode 100644
index 0000000..a52dadf
--- /dev/null
+++ b/deco/config/configdialog.ui
@@ -0,0 +1,3088 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ConfigDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ConfigDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>778</width>
+ <height>498</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Configure Baghira Window Decoration</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>generalbox</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="title">
+ <string>Common Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout133</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Minimum Title Height</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>53</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>minTH</cstring>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="minValue">
+ <number>18</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The Titlebar height will follow your font setting.&lt;br&gt;However, you can set a minmum value to extend the Titlebar if you prefer small fonts.&lt;br&gt;18 is the minimum due to the Buttons :)</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>ResizeGrip</cstring>
+ </property>
+ <property name="text">
+ <string>Show resize grip</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Starts in Brushed Metal mode instead of default, if the Style is set to Brushed Metal</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>addAutoSpacing</cstring>
+ </property>
+ <property name="text">
+ <string>Add auto spacing</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>fullSpec</cstring>
+ </property>
+ <property name="text">
+ <string>Fullscreen maximized</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check this to have any window in fullscreen Mode - demaximize the window by clicking into the top right corner of your screen</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>drawComicFrame</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Comic Frame</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Draws a black frame around the window (not the Titlebar).&lt;br&gt;Anyway i suggest to get the kwin dropshadow patch.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>noModalDeco</cstring>
+ </property>
+ <property name="text">
+ <string>Hide deco for fixed size modal windows</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>maxResizable</cstring>
+ </property>
+ <property name="text">
+ <string>Keep maximized resizable</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>allowEasyClosing</cstring>
+ </property>
+ <property name="text">
+ <string>Allow Easy Closing</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Allows Closing by clicking into the top left or right corner &lt;br&gt; Close Button must be most left or right element (also no spacers) &lt;br&gt; Closes on Mouse Button release (so you have the chance to move the mouse away and keep the Window) &lt;br&gt; The Window must be active and maximized &lt;br&gt; Unfortunately you will not be able tho resize the Window from that corner</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="11" column="0">
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed Metal</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Tiger</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>defaultMode</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="10" column="0">
+ <property name="name">
+ <cstring>textLabel1_7</cstring>
+ </property>
+ <property name="text">
+ <string>Default Mode is</string>
+ </property>
+ </widget>
+ <widget class="Line" row="9" column="0">
+ <property name="name">
+ <cstring>line3</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="8" column="0">
+ <property name="name">
+ <cstring>delAppname</cstring>
+ </property>
+ <property name="text">
+ <string>Try to remove application name
+from multipart titles</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>titlealign</cstring>
+ </property>
+ <property name="title">
+ <string>Title &amp;Alignment</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Use these buttons to set the alignment of the window title</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>AlignLeft</cstring>
+ </property>
+ <property name="text">
+ <string>Left</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer78</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QRadioButton" row="0" column="2">
+ <property name="name">
+ <cstring>AlignHCenter</cstring>
+ </property>
+ <property name="text">
+ <string>Center</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>spacer77</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QRadioButton" row="0" column="4">
+ <property name="name">
+ <cstring>AlignRight</cstring>
+ </property>
+ <property name="text">
+ <string>Right</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="6">
+ <property name="name">
+ <cstring>noTitle</cstring>
+ </property>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </widget>
+ <spacer row="0" column="5">
+ <property name="name">
+ <cstring>spacer23_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>51</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer79</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>59</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>ButtonColorConfig</cstring>
+ </property>
+ <property name="text">
+ <string>Configure Button Colors</string>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer33</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>25</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QTabWidget" row="0" column="2" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>jaguarTab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Jaguar</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout7_3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_4_3</cstring>
+ </property>
+ <property name="text">
+ <string>3D Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>200</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>_3DImpact_J</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>20</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Titleshadow Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>61</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>LineImpact_J</cstring>
+ </property>
+ <property name="buttonSymbols">
+ <enum>UpDownArrows</enum>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>40</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout40</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout35</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2_4_3</cstring>
+ </property>
+ <property name="text">
+ <string>ButtonStyle</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_3</cstring>
+ </property>
+ <property name="text">
+ <string>Active Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Inactive Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer18_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout39</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>buttonStyle_J</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>titleeffect_J</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>i_titleeffect_J</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout38</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Colors</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout33</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor1_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor2_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout34</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor1_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor2_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>groupBox2_4</cstring>
+ </property>
+ <property name="title">
+ <string>Round Corners</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout45</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUL_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer16</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLL_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="5" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout44</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUR_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer17</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLR_J</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer24_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox" row="1" column="3">
+ <property name="name">
+ <cstring>borderSize_J</cstring>
+ </property>
+ <property name="maxValue">
+ <number>16</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="2">
+ <property name="name">
+ <cstring>textLabel1_6_3</cstring>
+ </property>
+ <property name="text">
+ <string>Border Size</string>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer27_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>spacer27</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer15</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>drawIcon_J</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Icon</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>pantherTab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Panther</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout10_2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Titleshadow Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>61</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>LineImpact_P</cstring>
+ </property>
+ <property name="buttonSymbols">
+ <enum>UpDownArrows</enum>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>40</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>groupBox2_3</cstring>
+ </property>
+ <property name="title">
+ <string>Round Corners</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout51</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUL_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer20</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLL_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="5" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout52</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUR_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer19</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLR_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer18</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>50</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer24_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox" row="1" column="3">
+ <property name="name">
+ <cstring>borderSize_P</cstring>
+ </property>
+ <property name="maxValue">
+ <number>16</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="2">
+ <property name="name">
+ <cstring>textLabel1_6_2</cstring>
+ </property>
+ <property name="text">
+ <string>Border Size</string>
+ </property>
+ </widget>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>spacer28</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer28_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout7_2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_4_4</cstring>
+ </property>
+ <property name="text">
+ <string>3D Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4_4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>200</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>_3DImpact_P</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>20</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout50</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout31</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2_4</cstring>
+ </property>
+ <property name="text">
+ <string>ButtonStyle</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8</cstring>
+ </property>
+ <property name="text">
+ <string>Active Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_4</cstring>
+ </property>
+ <property name="text">
+ <string>Inactive Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer18_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout30</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>buttonStyle_P</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>titleeffect_P</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>i_titleeffect_P</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout49</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Colors</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout47</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor1_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor2_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout48</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor1_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor2_P</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>drawIcon_P</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Icon</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>brushedTab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Brushed</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout10_3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Titleshadow Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>61</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>LineImpact_B</cstring>
+ </property>
+ <property name="buttonSymbols">
+ <enum>UpDownArrows</enum>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>40</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_4</cstring>
+ </property>
+ <property name="text">
+ <string>3D Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>200</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>_3DImpact_B</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>20</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout57</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout27</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2_4_2</cstring>
+ </property>
+ <property name="text">
+ <string>ButtonStyle</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_2</cstring>
+ </property>
+ <property name="text">
+ <string>Active Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Inactive Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer18_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout26</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>buttonStyle_B</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>titleeffect_B</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>i_titleeffect_B</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout56</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_5</cstring>
+ </property>
+ <property name="text">
+ <string>Colors</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout54</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor1_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor2_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout55</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor1_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor2_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>groupBox2_2</cstring>
+ </property>
+ <property name="title">
+ <string>Round Corners</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout58</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUL_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer21</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLL_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="5" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout59</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUR_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer22</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLR_B</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer23</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="2">
+ <property name="name">
+ <cstring>textLabel1_6</cstring>
+ </property>
+ <property name="text">
+ <string>Border Size</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="3">
+ <property name="name">
+ <cstring>borderSize_B</cstring>
+ </property>
+ <property name="maxValue">
+ <number>16</number>
+ </property>
+ <property name="value">
+ <number>6</number>
+ </property>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer24</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>spacer29</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer29_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>drawIcon_B</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Icon</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>Tiger</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>layout7_4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_4_2</cstring>
+ </property>
+ <property name="text">
+ <string>3D Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>200</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>_3DImpact_T</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>20</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="3" column="0">
+ <property name="name">
+ <cstring>groupBox2_2_2</cstring>
+ </property>
+ <property name="title">
+ <string>Round Corners</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout58_2</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUL_T</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer21_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLL_T</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="5" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout59_2</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUR_T</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer22_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLR_T</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer23_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="2">
+ <property name="name">
+ <cstring>textLabel1_6_4</cstring>
+ </property>
+ <property name="text">
+ <string>Border Size</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="3">
+ <property name="name">
+ <cstring>borderSize_T</cstring>
+ </property>
+ <property name="maxValue">
+ <number>16</number>
+ </property>
+ <property name="value">
+ <number>6</number>
+ </property>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer24_4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>spacer29_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer29_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout42</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout27_2</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2_4_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>ButtonStyle</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Active Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Inactive Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer18_2_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout82</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>buttonStyle_T</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_9</cstring>
+ </property>
+ <property name="text">
+ <string>(Gradient)</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_9_2</cstring>
+ </property>
+ <property name="text">
+ <string>(Scanlines)</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout41</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_5_2</cstring>
+ </property>
+ <property name="text">
+ <string>Colors</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout54_2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor1_T</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor2_T</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_10</cstring>
+ </property>
+ <property name="text">
+ <string>(Background)</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>drawIcon_T</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Icon</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>Special</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>drawIcon_S</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Icon</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>layout7_5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_4_5</cstring>
+ </property>
+ <property name="text">
+ <string>3D Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4_5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>200</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>_3DImpact_S</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>20</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout57_2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout27_3</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2_4_2_3</cstring>
+ </property>
+ <property name="text">
+ <string>ButtonStyle</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_2_4</cstring>
+ </property>
+ <property name="text">
+ <string>Active Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_8_2_2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Inactive Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer18_2_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout26_2</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>buttonStyle_S</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>titleeffect_S</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>i_titleeffect_S</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout56_2</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_5_3</cstring>
+ </property>
+ <property name="text">
+ <string>Colors</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout54_3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor1_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor2_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout55_2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor1_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor2_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="4" column="0">
+ <property name="name">
+ <cstring>groupBox2_2_3</cstring>
+ </property>
+ <property name="title">
+ <string>Round Corners</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout58_3</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUL_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer21_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLL_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="5" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout59_3</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUR_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer22_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLR_S</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer23_4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="2">
+ <property name="name">
+ <cstring>textLabel1_6_5</cstring>
+ </property>
+ <property name="text">
+ <string>Border Size</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="3">
+ <property name="name">
+ <cstring>borderSize_S</cstring>
+ </property>
+ <property name="maxValue">
+ <number>16</number>
+ </property>
+ <property name="value">
+ <number>6</number>
+ </property>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer24_5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>spacer29_4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer29_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0">
+ <property name="name">
+ <cstring>layout10_3_2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2_3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Titleshadow Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5_3_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>61</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>LineImpact_S</cstring>
+ </property>
+ <property name="buttonSymbols">
+ <enum>UpDownArrows</enum>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>40</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/deco/config/configdialog.ui.new b/deco/config/configdialog.ui.new
new file mode 100644
index 0000000..b17dbd1
--- /dev/null
+++ b/deco/config/configdialog.ui.new
@@ -0,0 +1,398 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ConfigDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ConfigDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>657</width>
+ <height>476</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Configure Baghira Window Decoration</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>titlealign</cstring>
+ </property>
+ <property name="title">
+ <string>Title &amp;Alignment</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Use these buttons to set the alignment of the window title</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>AlignLeft</cstring>
+ </property>
+ <property name="text">
+ <string>Left</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer78</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QRadioButton" row="0" column="2">
+ <property name="name">
+ <cstring>AlignHCenter</cstring>
+ </property>
+ <property name="text">
+ <string>Center</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>spacer77</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QRadioButton" row="0" column="4">
+ <property name="name">
+ <cstring>AlignRight</cstring>
+ </property>
+ <property name="text">
+ <string>Right</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="6">
+ <property name="name">
+ <cstring>noTitle</cstring>
+ </property>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </widget>
+ <spacer row="0" column="5">
+ <property name="name">
+ <cstring>spacer23_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>51</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>generalbox</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="title">
+ <string>Common Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="12" column="0">
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed Metal</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Tiger</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>defaultMode</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="9" column="0">
+ <property name="name">
+ <cstring>delAppname</cstring>
+ </property>
+ <property name="text">
+ <string>Try to remove application name
+from multipart titles</string>
+ </property>
+ </widget>
+ <widget class="Line" row="10" column="0">
+ <property name="name">
+ <cstring>line3</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>drawComicFrame</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Comic Frame</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Draws a black frame around the window (not the Titlebar).&lt;br&gt;Anyway i suggest to get the kwin dropshadow patch.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="8" column="0">
+ <property name="name">
+ <cstring>noModalDeco</cstring>
+ </property>
+ <property name="text">
+ <string>Hide deco for fixed size modal windows</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>maxResizable</cstring>
+ </property>
+ <property name="text">
+ <string>Keep maximized resizable</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>ResizeGrip</cstring>
+ </property>
+ <property name="text">
+ <string>Show resize grip</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Starts in Brushed Metal mode instead of default, if the Style is set to Brushed Metal</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="11" column="0">
+ <property name="name">
+ <cstring>textLabel1_7</cstring>
+ </property>
+ <property name="text">
+ <string>Default Mode is</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>fullSpec</cstring>
+ </property>
+ <property name="text">
+ <string>Fullscreen maximized</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check this to have any window in fullscreen Mode - demaximize the window by clicking into the top right corner of your screen</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>allowEasyClosing</cstring>
+ </property>
+ <property name="text">
+ <string>Allow Easy Closing</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Allows Closing by clicking into the top left or right corner &lt;br&gt; Close Button must be most left or right element (also no spacers) &lt;br&gt; Closes on Mouse Button release (so you have the chance to move the mouse away and keep the Window) &lt;br&gt; The Window must be active and maximized &lt;br&gt; Unfortunately you will not be able tho resize the Window from that corner</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>addAutoSpacing</cstring>
+ </property>
+ <property name="text">
+ <string>Add auto spacing</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout133</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Minimum Title Height</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>53</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>minTH</cstring>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="minValue">
+ <number>18</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The Titlebar height will follow your font setting.&lt;br&gt;However, you can set a minmum value to extend the Titlebar if you prefer small fonts.&lt;br&gt;18 is the minimum due to the Buttons :)</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>ButtonColorConfig</cstring>
+ </property>
+ <property name="text">
+ <string>Configure Button Colors</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidgetStack" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>decoStack</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>99</x>
+ <y>99</y>
+ <width>74</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Blablabla</string>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>pushButton2</cstring>
+ </property>
+ <property name="text">
+ <string>Add style</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>pushButton3</cstring>
+ </property>
+ <property name="text">
+ <string>Remove Style</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/deco/config/customdecosettings.ui b/deco/config/customdecosettings.ui
new file mode 100644
index 0000000..2533091
--- /dev/null
+++ b/deco/config/customdecosettings.ui
@@ -0,0 +1,586 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CustomDecoSettings</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CustomDecoSettings</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>416</width>
+ <height>325</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CustomDecoSettings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>boxCorner</cstring>
+ </property>
+ <property name="title">
+ <string>Round Corners</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout45</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUL</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer16</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLL</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="5" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>layout44</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeUR</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer17</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>shapeLR</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer24_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox" row="1" column="3">
+ <property name="name">
+ <cstring>borderSize</cstring>
+ </property>
+ <property name="maxValue">
+ <number>16</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="2">
+ <property name="name">
+ <cstring>labelBorderSize</cstring>
+ </property>
+ <property name="text">
+ <string>Border Size</string>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer27_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>spacer27</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer15</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelTitleshadow</cstring>
+ </property>
+ <property name="text">
+ <string>Titleshadow Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>61</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>LineImpact</cstring>
+ </property>
+ <property name="buttonSymbols">
+ <enum>UpDownArrows</enum>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>40</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>layout7_3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>label3D</cstring>
+ </property>
+ <property name="text">
+ <string>3D Intensity</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>200</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>_3DImpact</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>20</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>layout35</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelButtonstyle</cstring>
+ </property>
+ <property name="text">
+ <string>ButtonStyle</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelTitle</cstring>
+ </property>
+ <property name="text">
+ <string>Active Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelInTitle</cstring>
+ </property>
+ <property name="text">
+ <string>Inactive Titlebar Effect</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>titleeffect</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="4">
+ <property name="name">
+ <cstring>layout38</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelColors</cstring>
+ </property>
+ <property name="text">
+ <string>Colors</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout33</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor1</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>activeColor2</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout34</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor1</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>inactiveColor2</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout39</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Panther</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Jaguar</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Milk</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>buttonStyle</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>titleeffect</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <item>
+ <property name="text">
+ <string>Gradient</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Stippled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nostalgia</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Glossy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Brushed</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Scanlines</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>i_titleeffect</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select an effect for the titlebar to change its appearance</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer18_2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>drawIcon</cstring>
+ </property>
+ <property name="text">
+ <string>Draw Icon</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>DecoName</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>14</pointsize>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/deco/config/generatePixmaps.sh b/deco/config/generatePixmaps.sh
new file mode 100755
index 0000000..7c392a2
--- /dev/null
+++ b/deco/config/generatePixmaps.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+top_srcdir="${1:-../..}"
+imagebase="$top_srcdir/imagebase"
+UIC=$(grep "UIC = " ../../Makefile | cut -f3- -d" ")
+echo -e "#ifndef DCPIXMAPS_H\n#define DCPIXMAPS_H\n" > pixmaps.h
+$UIC -embed baghira \
+$imagebase/icon_help \
+$imagebase/preview \
+$imagebase/preview-menu >> pixmaps.h
+echo -e "#endif //DCPIXMAPS_H\n" >> pixmaps.h
diff --git a/deco/generatePixmaps.sh b/deco/generatePixmaps.sh
new file mode 100755
index 0000000..6fff33b
--- /dev/null
+++ b/deco/generatePixmaps.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+top_srcdir="${1:-../..}"
+imagebase="$top_srcdir/imagebase"
+UIC=$(grep "UIC = " ../Makefile | cut -f3- -d" ")
+echo -e "#ifndef DPIXMAPS_H\n#define DPIXMAPS_H\n" > pixmaps.h
+$UIC -embed baghira \
+$imagebase/brushed-gradient \
+$imagebase/brushed-tile \
+$imagebase/button_jaguar \
+$imagebase/button_jaguar_down \
+$imagebase/button_jaguar_menu \
+$imagebase/button_jaguar_menu_down \
+$imagebase/button_milk \
+$imagebase/button_milk_down \
+$imagebase/button_milk_menu \
+$imagebase/button_milk_menu_down \
+$imagebase/button_panther \
+$imagebase/button_panther_menu \
+$imagebase/deco_glossy \
+$imagebase/icon_above \
+$imagebase/icon_behind \
+$imagebase/icon_close \
+$imagebase/icon_help \
+$imagebase/icon_maximize \
+$imagebase/icon_minimize \
+$imagebase/icon_shade \
+$imagebase/icon_sticky >> pixmaps.h
+echo -e "#endif //DPIXMAPS_H\n" >> pixmaps.h
diff --git a/deco/masks.h b/deco/masks.h
new file mode 100644
index 0000000..75c2fe2
--- /dev/null
+++ b/deco/masks.h
@@ -0,0 +1,81 @@
+#define help_width 14
+#define help_height 15
+static unsigned char help_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xf0, 0x07, 0x00, 0x06, 0x00, 0x07,
+ 0x80, 0x03, 0xc0, 0x01, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00,
+ 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00 };
+#define jaguar2_width 14
+#define jaguar2_height 15
+static unsigned char jaguar2_bits[] = {
+ 0x00, 0x00, 0xf8, 0x07, 0xfe, 0x1f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f,
+ 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
+ 0xfe, 0x1f, 0xfc, 0x0f, 0xf8, 0x07 };
+#define jaguar_menu_down_width 20
+#define jaguar_menu_down_height 15
+static unsigned char jaguar_menu_down_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0xfc, 0xff, 0x03,
+ 0xfe, 0xff, 0x07, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f,
+ 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f,
+ 0xfa, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+#define jaguar_menu_width 20
+#define jaguar_menu_height 15
+static unsigned char jaguar_menu_bits[] = {
+ 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0xfc, 0xff, 0x03, 0xfe, 0xff, 0x07,
+ 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f,
+ 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0x07,
+ 0xfc, 0xff, 0x01, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00 };
+#define jaguar_width 14
+#define jaguar_height 15
+static unsigned char jaguar_bits[] = {
+ 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
+ 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
+ 0xff, 0x3f, 0xfe, 0x1f, 0xfc, 0x0f };
+#define milk_menu_down_width 20
+#define milk_menu_down_height 15
+static unsigned char milk_menu_down_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0xfe, 0xff, 0x03,
+ 0xff, 0xff, 0x07, 0xff, 0xff, 0x07, 0xff, 0xff, 0x07, 0xff, 0xff, 0x07,
+ 0xff, 0xff, 0x07, 0xff, 0xff, 0x07, 0xfe, 0xff, 0x03, 0xfc, 0xff, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+#define milk_menu_width 20
+#define milk_menu_height 15
+static unsigned char milk_menu_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x0e, 0x80, 0x03,
+ 0x03, 0x00, 0x06, 0x03, 0x00, 0x06, 0x01, 0x00, 0x04, 0x01, 0x00, 0x04,
+ 0x03, 0x00, 0x06, 0x03, 0x00, 0x06, 0x0e, 0x80, 0x03, 0xfc, 0xff, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+#define milk_width 14
+#define milk_height 15
+static unsigned char milk_bits[] = {
+ 0xf0, 0x03, 0x3c, 0x0f, 0x0e, 0x1c, 0x06, 0x18, 0x03, 0x30, 0x03, 0x30,
+ 0x01, 0x20, 0x01, 0x20, 0x03, 0x30, 0x03, 0x30, 0x06, 0x18, 0x0e, 0x1c,
+ 0x3c, 0x0f, 0xf0, 0x03, 0x00, 0x00 };
+#define panther_menu_width 20
+#define panther_menu_height 15
+static unsigned char panther_menu_bits[] = {
+ 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f,
+ 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f,
+ 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x07,
+ 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+#define panther_width 14
+#define panther_height 15
+static unsigned char panther_bits[] = {
+ 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
+ 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
+ 0xfe, 0x1f, 0xfc, 0x0f, 0xf8, 0x07 };
+#define milk_pressed_width 14
+#define milk_pressed_height 15
+static unsigned char milk_pressed_bits[] = {
+ 0xf0, 0x03, 0xfc, 0x0f, 0xfe, 0x1f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f,
+ 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xfe, 0x1f, 0xfe, 0x1f,
+ 0xfc, 0x0f, 0xf0, 0x03, 0x00, 0x00 };
+
+#define arrowUp_width 8
+#define arrowUp_height 4
+static unsigned char arrowUp_bits[] = {
+ 0x18, 0x3c, 0x7e, 0xff };
+
+#define arrowDown_width 8
+#define arrowDown_height 4
+static unsigned char arrowDown_bits[] = {
+ 0xff, 0x7e, 0x3c, 0x18 };