[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kde4/playground/artwork/cokoon
From:       Sandro Giessl <sgiessl () gmail ! com>
Date:       2006-02-28 23:37:56
Message-ID: 1141169876.273233.28204.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 514667 by giessl:

decoration: define all window types for now; define button prelight/pressed states

 M  +1 -1      Makefile.am  
 M  +25 -2     decoration/TestTheme.xml  
 M  +7 -5      decoration/cokoondecoration.cpp  


--- branches/work/kde4/playground/artwork/cokoon/Makefile.am #514666:514667
@@ -1,2 +1,2 @@
 include $(top_srcdir)/admin/Doxyfile.am
-SUBDIRS=lib
+SUBDIRS=lib decoration
--- branches/work/kde4/playground/artwork/cokoon/decoration/TestTheme.xml \
#514666:514667 @@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <cokoon_theme name="TestTheme" version="0.1pre">
-	<object id="Decoration.*.*.*.*">
+	<object id="Decoration.active.normal.normal.normal">
 		<source id="decorationsrc" type="svg" \
file="/home/k4dev/src/playground-artwork/cokoon/decoration/testdecoration.svg">  \
<replace_style_attr element_id="rect2788" attr="fill" value="#AAAACC"/>  </source>
@@ -75,7 +75,15 @@
 		</paint>
 	</object>
 
-	<object id="Button.*.*.*.*">
+	<object id="Decoration.active.*.*.*" \
inherit="Decoration.active.normal.normal.normal"/> +
+	<object id="Decoration.inactive.*.*.*" \
inherit="Decoration.active.normal.normal.normal"> +		<source id="decorationsrc" \
type="svg" file="/home/k4dev/src/playground-artwork/cokoon/decoration/testdecoration.svg">
 +			<replace_style_attr element_id="rect2788" attr="fill" value="#AAAAAA"/>
+		</source>
+	</object>
+
+	<object id="Button.close.normal.active.normal">
 		<source id="decorationsrc" type="svg" \
file="/home/k4dev/src/playground-artwork/cokoon/decoration/testdecorationbutton.svg"/>
  
 		<expression id="zoom" value="1"/>
@@ -122,6 +130,21 @@
 		</paint>
 	</object>
 
+	<object id="Button.*.prelight.*.*" inherit="Button.close.normal.active.normal">
+		<source id="decorationsrc" type="svg" \
file="/home/k4dev/src/playground-artwork/cokoon/decoration/testdecorationbutton.svg"> \
+			<replace_style_attr element_id="rect2788" attr="fill-opacity" value="0.8"/> \
+		</source> +	</object>
+
+	<object id="Button.*.pressed.*.*" inherit="Button.close.normal.active.normal">
+		<source id="decorationsrc" type="svg" \
file="/home/k4dev/src/playground-artwork/cokoon/decoration/testdecorationbutton.svg"> \
+			<replace_style_attr element_id="rect2788" attr="fill-opacity" value="0.2"/> \
+			<replace_style_attr element_id="rect2788" attr="stroke-opacity" value="0.7"/> \
+		</source> +	</object>
+
+	<object id="Button.*.*.*.*" inherit="Button.close.normal.active.normal"/>
+
 	
 </cokoon_theme>
 
--- branches/work/kde4/playground/artwork/cokoon/decoration/cokoondecoration.cpp \
#514666:514667 @@ -398,7 +398,6 @@
     QPainter painter(widget() );
 
     if (o) {
-        qDebug() << "paint theme... ";
         o->paint(&painter, 0, 0, width(), height() );
     } else {
         qDebug() << "theme object" << themeObjectId() << "not found";
@@ -461,6 +460,8 @@
     QAbstractButton::enterEvent(e);
 
     hover = true;
+
+    update();
 }
 
 void Button::leaveEvent(QEvent *e)
@@ -468,6 +469,8 @@
     QAbstractButton::leaveEvent(e);
 
     hover = false;
+
+    update();
 }
 
 void Button::paintEvent(QPaintEvent *)
@@ -513,10 +516,10 @@
             return;
     }
 
-    if (hover)
+    if (isDown() )
+        themeObjId += CokoonDecorationSpec::Button1_pressed;
+    else if (hover)
         themeObjId += CokoonDecorationSpec::Button1_prelight;
-    else if (isDown() )
-        themeObjId += CokoonDecorationSpec::Button1_pressed;
     else
         themeObjId += CokoonDecorationSpec::Button1_normal;
 
@@ -536,7 +539,6 @@
     QPainter painter(this );
 
     if (o) {
-        qDebug() << "paint theme button... ";
         o->paint(&painter, 0, 0, width(), height() );
     } else {
         qDebug() << "theme button object" << themeObjId << "not found";


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic