-rw-r--r-- | libqtaux/ocolorbutton.cpp | 12 | ||||
-rw-r--r-- | libqtaux/ocolorbutton.h | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/libqtaux/ocolorbutton.cpp b/libqtaux/ocolorbutton.cpp index 9e41d93..925df7f 100644 --- a/libqtaux/ocolorbutton.cpp +++ b/libqtaux/ocolorbutton.cpp | |||
@@ -63,3 +63,2 @@ OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *n | |||
63 | 63 | ||
64 | updateColor ( color ); | ||
65 | 64 | ||
@@ -68,2 +67,3 @@ OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *n | |||
68 | setMaximumSize ( s. width ( ) * 2, s. height ( )); | 67 | setMaximumSize ( s. width ( ) * 2, s. height ( )); |
68 | d->m_color = color; | ||
69 | } | 69 | } |
@@ -102,3 +102,3 @@ void OColorButton::updateColor ( const QColor &c ) | |||
102 | 102 | ||
103 | QImage img ( 16, 16, 32 ); | 103 | QImage img ( width()-14, height()-6, 32 ); |
104 | img. fill ( 0 ); | 104 | img. fill ( 0 ); |
@@ -147 +147,9 @@ void OColorButton::updateColor ( const QColor &c ) | |||
147 | 147 | ||
148 | |||
149 | /** | ||
150 | * @internal | ||
151 | */ | ||
152 | void OColorButton::resizeEvent( QResizeEvent *ev ) { | ||
153 | QPushButton::resizeEvent( ev ); | ||
154 | updateColor(d->m_color); | ||
155 | } | ||
diff --git a/libqtaux/ocolorbutton.h b/libqtaux/ocolorbutton.h index ca68f1f..10b77d5 100644 --- a/libqtaux/ocolorbutton.h +++ b/libqtaux/ocolorbutton.h | |||
@@ -56,2 +56,5 @@ public: | |||
56 | QColor color ( ) const; | 56 | QColor color ( ) const; |
57 | |||
58 | protected: | ||
59 | void resizeEvent( QResizeEvent* ); | ||
57 | 60 | ||