From kde-commits Tue Feb 28 23:37:56 2006 From: Sandro Giessl Date: Tue, 28 Feb 2006 23:37:56 +0000 To: kde-commits Subject: branches/work/kde4/playground/artwork/cokoon Message-Id: <1141169876.273233.28204.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=114119260709393 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 @@ - + @@ -75,7 +75,15 @@ - + + + + + + + + + @@ -122,6 +130,21 @@ + + + + + + + + + + + + + + + --- 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";