Hello community,
here is the log from the commit of package kdebase4-workspace
checked in at Sat Mar 29 11:50:39 CET 2008.
--------
--- KDE/kdebase4-workspace/kdebase4-wallpapers.changes 2008-03-11 18:29:47.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdebase4-workspace/kdebase4-wallpapers.changes 2008-03-29 11:50:10.740406000 +0100
@@ -1,0 +2,5 @@
+Fri Mar 28 21:50:44 CET 2008 - llunak@suse.cz
+
+- oxygen windecoration configurable colors (kde#152030)
+
+-------------------------------------------------------------------
kdebase4-workspace.changes: same change
New:
----
oxygen-windeco-colors.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdebase4-wallpapers.spec ++++++
--- /var/tmp/diff_new_pack.v10179/_old 2008-03-29 11:50:21.000000000 +0100
+++ /var/tmp/diff_new_pack.v10179/_new 2008-03-29 11:50:21.000000000 +0100
@@ -22,7 +22,7 @@
Summary: KDE 4 Wallpapers
Url: http://www.kde.org/
Version: 4.0.2
-Release: 6
+Release: 16
Source0: kdebase-workspace-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@@ -59,6 +59,8 @@
/usr/share/wallpapers
%changelog
+* Fri Mar 28 2008 llunak@suse.cz
+- oxygen windecoration configurable colors (kde#152030)
* Tue Mar 11 2008 dmueller@suse.de
- 4_0_BRANCH.diff update, including
* full screen handling fixes
++++++ kdebase4-workspace.spec ++++++
--- /var/tmp/diff_new_pack.v10179/_old 2008-03-29 11:50:21.000000000 +0100
+++ /var/tmp/diff_new_pack.v10179/_new 2008-03-29 11:50:21.000000000 +0100
@@ -27,7 +27,7 @@
Summary: The KDE Workspace Components
Url: http://www.kde.org/
Version: 4.0.2
-Release: 6
+Release: 16
%define rversion 4.0.2
Source0: kdebase-workspace-%rversion.tar.bz2
Source1: opensuse.png
@@ -61,6 +61,7 @@
Patch69: systemsettings-desktop.diff
Patch70: panel-size.diff
Patch71: kickoff-tabs.diff
+Patch72: oxygen-windeco-colors.diff
%kde4_runtime_requires
Conflicts: yast2-theme-NLD
Recommends: kdebase4-workspace-plasmoids
@@ -111,6 +112,7 @@
%patch69
%patch70
%patch71
+%patch72
%build
%cmake_kde4 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE4_KCHECKPASS_PAM_SERVICE=xdm
@@ -160,6 +162,7 @@
rm -rf filelists
%package ksysguardd
+License: GPL v2 or later
Group: System/GUI/KDE
Summary: The KDE Workspace Components
Conflicts: kdebase3-ksysguardd
@@ -187,6 +190,7 @@
%config(noreplace) /etc/ksysguarddrc
%package -n kde4-kwin
+License: GPL v2 or later
Group: System/GUI/KDE
Summary: KDE Window Manager
%kde4_runtime_requires
@@ -213,6 +217,7 @@
/usr/share/kde4/apps/kwin/titlebar_decor.png
%package devel
+License: GPL v2 or later
Requires: libkdepimlibs4-devel
Requires: kdebase4-workspace = %version
Summary: The KDE Workspace Components
@@ -249,6 +254,7 @@
%_libdir/libkfontinstui.so
%package -n kde4-kdm
+License: GPL v2 or later
Group: System/GUI/KDE
Summary: KDE login and display manager
Requires: kdebase4-workspace
@@ -607,6 +613,8 @@
/usr/%_lib/kde4/kgreet_*.so
%changelog
+* Fri Mar 28 2008 llunak@suse.cz
+- oxygen windecoration configurable colors (kde#152030)
* Tue Mar 11 2008 dmueller@suse.de
- 4_0_BRANCH.diff update, including
* full screen handling fixes
++++++ oxygen-windeco-colors.diff ++++++
Subject: Make Oxygen windecoration follow standard decoration colors
From: Lubos Lunak
Bug: kde#152030
Patch-upstream: no
Adds an option to follow standard decoration colors and makes it the default.
Since kcmcolors in KDE4.0.x does not support decoration button color, it is
created by using titlebar color and making it lighter.
--- kwin/clients/oxygen/config/CMakeLists.txt.sav 2008-03-28 14:45:43.000000000 +0100
+++ kwin/clients/oxygen/config/CMakeLists.txt 2008-03-28 14:45:43.000000000 +0100
@@ -0,0 +1,18 @@
+include_directories( ${KDEBASE_WORKSPACE_SOURCE_DIR}/kwin/lib )
+
+
+########### next target ###############
+
+set(kwin_oxygen_config_PART_SRCS config.cpp )
+
+
+kde4_add_ui_files(kwin_oxygen_config_PART_SRCS oxygenconfig.ui )
+
+kde4_add_plugin(kwin_oxygen_config ${kwin_oxygen_config_PART_SRCS})
+
+
+
+target_link_libraries(kwin_oxygen_config ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY})
+
+install(TARGETS kwin_oxygen_config DESTINATION ${PLUGIN_INSTALL_DIR} )
+
--- kwin/clients/oxygen/config/config.cpp.sav 2008-03-28 14:45:43.000000000 +0100
+++ kwin/clients/oxygen/config/config.cpp 2008-03-28 14:45:43.000000000 +0100
@@ -0,0 +1,91 @@
+/*
+ * Oxygen KWin client configuration module
+ *
+ * Copyright (C) 2008 Lubos Lunak
+ *
+ * Based on the Quartz configuration module,
+ * Copyright (c) 2001 Karol Szwed
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the license, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include
+#include
+
+#include <QCheckBox>
+
+#include "config.moc"
+
+extern "C"
+{
+ KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ {
+ return ( new Oxygen::OxygenConfig( conf, parent ) );
+ }
+}
+
+namespace Oxygen {
+
+OxygenConfig::OxygenConfig( KConfig*, QWidget* parent )
+ : QObject( parent )
+{
+ KGlobal::locale()->insertCatalog("kwin_clients");
+ c = new KConfig( "oxygenrc" );
+ KConfigGroup cg(c, "Windeco");
+ ui = new OxygenConfigUI( parent );
+ connect( ui->blendTitlebarColors, SIGNAL(clicked()), SIGNAL(changed()) );
+
+ load( cg );
+ ui->show();
+}
+
+
+OxygenConfig::~OxygenConfig()
+{
+ delete ui;
+ delete c;
+}
+
+
+// Loads the configurable options from the kwinrc config file
+// It is passed the open config from kwindecoration to improve efficiency
+void OxygenConfig::load( const KConfigGroup& )
+{
+ KConfigGroup cg(c, "Windeco");
+ ui->blendTitlebarColors->setChecked( cg.readEntry("BlendTitlebarColors", false) );
+}
+
+
+// Saves the configurable options to the kwinrc config file
+void OxygenConfig::save( KConfigGroup& )
+{
+ KConfigGroup cg(c, "Windeco");
+ cg.writeEntry( "BlendTitlebarColors", ui->blendTitlebarColors->isChecked() );
+ c->sync();
+}
+
+
+// Sets UI widget defaults which must correspond to style defaults
+void OxygenConfig::defaults()
+{
+ ui->blendTitlebarColors->setChecked( false );
+
+ emit changed();
+}
+
+} //namespace Oxygen
--- kwin/clients/oxygen/config/config.h.sav 2008-03-28 14:45:43.000000000 +0100
+++ kwin/clients/oxygen/config/config.h 2008-03-28 14:45:43.000000000 +0100
@@ -0,0 +1,64 @@
+/*
+ * Oxygen KWin client configuration module
+ *
+ * Copyright (C) 2008 Lubos Lunak
+ *
+ * Based on the Quartz configuration module,
+ * Copyright (c) 2001 Karol Szwed
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the license, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef OXYGEN_CONFIG_H
+#define OXYGEN_CONFIG_H
+
+#include
+
+#include "ui_oxygenconfig.h"
+
+namespace Oxygen {
+
+class OxygenConfigUI : public QWidget, public Ui::OxygenConfigUI
+{
+public:
+ OxygenConfigUI( QWidget *parent ) : QWidget( parent )
+ {
+ setupUi( this );
+ }
+};
+
+
+class OxygenConfig: public QObject
+{
+ Q_OBJECT
+public:
+ OxygenConfig( KConfig* conf, QWidget* parent );
+ ~OxygenConfig();
+// These public signals/slots work similar to KCM modules
+signals:
+ void changed();
+public slots:
+ void load( const KConfigGroup& conf );
+ void save( KConfigGroup& conf );
+ void defaults();
+private:
+ OxygenConfigUI *ui;
+ KConfig *c;
+};
+
+} //namespace Oxygen
+
+#endif
--- kwin/clients/oxygen/config/oxygenconfig.ui.sav 2008-03-28 14:45:43.000000000 +0100
+++ kwin/clients/oxygen/config/oxygenconfig.ui 2008-03-28 14:45:43.000000000 +0100
@@ -0,0 +1,35 @@
+<ui version="4.0" >
+ <class>OxygenConfigUI</class>
+ <widget class="QWidget" name="OxygenConfigUI" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>287</width>
+ <height>33</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Oxygen</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="blendTitlebarColors" >
+ <property name="whatsThis" >
+ <string>When enabled, this option makes the window titlebar use same colors as window contents, instead of using system titlebar colors.</string>
+ </property>
+ <property name="text" >
+ <string>Blend titlebar colors with window contents</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
--- kwin/clients/oxygen/oxygenclient.cpp.sav 2008-03-21 15:44:20.000000000 +0100
+++ kwin/clients/oxygen/oxygenclient.cpp 2008-03-28 14:45:43.000000000 +0100
@@ -236,6 +236,8 @@ QColor reduceContrast(const QColor &c0,
QColor OxygenClient::titlebarTextColor(const QPalette &palette)
{
+ if( !OxygenFactory::blendTitlebarColors())
+ return options()->color(ColorFont, isActive());
if (isActive())
return palette.color(QPalette::Active, QPalette::WindowText);
else {
@@ -270,7 +272,7 @@ void OxygenClient::paintEvent(QPaintEven
int x,y,w,h;
QRect frame = widget()->frameGeometry();
- QColor color = palette.window().color();
+ QColor color = OxygenFactory::blendTitlebarColors() ? palette.window().color() : options()->color( ColorTitleBar, isActive());
const int titleHeight = layoutMetric(LM_TitleHeight);
const int titleTop = layoutMetric(LM_TitleEdgeTop) + frame.top();
--- kwin/clients/oxygen/oxygen.h.sav 2008-03-21 15:44:20.000000000 +0100
+++ kwin/clients/oxygen/oxygen.h 2008-03-28 14:45:43.000000000 +0100
@@ -63,6 +63,7 @@ public:
static bool initialized();
static Qt::Alignment titleAlign();
+ static bool blendTitlebarColors();
private:
bool readConfig();
@@ -70,6 +71,7 @@ private:
private:
static bool initialized_;
static Qt::Alignment titlealign_;
+ static bool blendTitlebarColors_;
};
inline bool OxygenFactory::initialized()
@@ -78,6 +80,9 @@ inline bool OxygenFactory::initialized()
inline Qt::Alignment OxygenFactory::titleAlign()
{ return titlealign_; }
+inline bool OxygenFactory::blendTitlebarColors()
+ { return blendTitlebarColors_; }
+
} //namespace Oxygen
#endif
--- kwin/clients/oxygen/oxygen.cpp.sav 2008-03-21 15:44:20.000000000 +0100
+++ kwin/clients/oxygen/oxygen.cpp 2008-03-28 14:45:43.000000000 +0100
@@ -45,6 +45,7 @@ namespace Oxygen
bool OxygenFactory::initialized_ = false;
Qt::Alignment OxygenFactory::titlealign_ = Qt::AlignLeft;
+bool OxygenFactory::blendTitlebarColors_ = true;
//////////////////////////////////////////////////////////////////////////////
// OxygenFactory()
@@ -114,7 +115,10 @@ bool OxygenFactory::readConfig()
else if (value == "AlignHCenter") titlealign_ = Qt::AlignHCenter;
else if (value == "AlignRight") titlealign_ = Qt::AlignRight;
- if (oldalign == titlealign_)
+ bool oldblend = blendTitlebarColors;
+ blendTitlebarColors_ = group.readEntry( "BlendTitlebarColors", false );
+
+ if (oldalign == titlealign_ && oldblend == blendTitlebarColors_)
return false;
else
return true;
--- kwin/clients/oxygen/oxygenbutton.cpp.sav 2008-03-21 15:44:20.000000000 +0100
+++ kwin/clients/oxygen/oxygenbutton.cpp 2008-03-28 16:36:03.000000000 +0100
@@ -174,23 +174,34 @@ void OxygenButton::paintEvent(QPaintEven
if(client_.maximizeMode() == OxygenClient::MaximizeRestore)
painter.translate(0,-1);
- QColor bg = helper_.backgroundTopColor(pal.window());
+ QColor bg = helper_.backgroundTopColor(OxygenFactory::blendTitlebarColors()?pal.window().color()
+ :client_.options()->color(KDecorationDefines::ColorTitleBar,client_.isActive()));
QLinearGradient lg = helper_.decoGradient(QRect(4,4,13,13), buttonDetailColor(pal));
+#if 0
+ QColor bt = OxygenFactory::blendTitlebarColors()?pal.button().color()
+ :client_.options()->color(KDecorationDefines::ColorButtonBg,client_.isActive());
+#else // kcmcolors does not really support ColorButtonBg (at least in 4.0.x), so create it using ColorTitleBar
+ QColor bt;
+ if( OxygenFactory::blendTitlebarColors())
+ bt = pal.button().color();
+ else
+ bt = helper_.calcLightColor(client_.options()->color(KDecorationDefines::ColorTitleBar,client_.isActive()));
+#endif
if(status_ == Oxygen::Hovered) {
if(type_ == ButtonClose) {
QColor color = KColorScheme(pal.currentColorGroup()).foreground(KColorScheme::NegativeText).color();
lg = helper_.decoGradient(QRect(4,4,13,13), color);
- painter.drawPixmap(0, 0, helper_.windecoButtonFocused(pal.button(), color,7));
+ painter.drawPixmap(0, 0, helper_.windecoButtonFocused(bt, color,7));
}
else{
QColor color = KColorScheme(pal.currentColorGroup()).decoration(KColorScheme::HoverColor).color();
- painter.drawPixmap(0, 0, helper_.windecoButtonFocused(pal.button(), color, 7));
+ painter.drawPixmap(0, 0, helper_.windecoButtonFocused(bt, color, 7));
}
}
else
- painter.drawPixmap(0, 0, helper_.windecoButton(pal.button()));
+ painter.drawPixmap(0, 0, helper_.windecoButton(bt));
painter.setRenderHints(QPainter::Antialiasing);
painter.setBrush(Qt::NoBrush);
--- kwin/clients/oxygen/CMakeLists.txt.sav 2008-03-21 18:09:34.000000000 +0100
+++ kwin/clients/oxygen/CMakeLists.txt 2008-03-28 14:46:03.000000000 +0100
@@ -1,5 +1,7 @@
add_definitions (-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS)
+add_subdirectory( config )
+
########### next target ###############
set(kwin_oxygen_SRCS
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org