[patch] for /lib/widgets/ktabzoomframe.cpp
Caleb Tennis
caleb at aei-tech.com
Fri Jul 26 21:25:04 UTC 2002
In the IDEAl mode, the close and dock tool buttons in the frame do not have
the correct background color set. This sets it to the same as the title
label. Note that it doesn't work to just do a setPaletteBackgroundColor -
I'm not exactly sure why but I think it has something to do with the fact
that they're tool buttons. If someone has a slicker way of doing this code
I'm all for it. I'd appreciate it if someone would make a comment, or
commit.
--- ktabzoomframe_orig.cpp Fri Jul 26 14:12:54 2002
+++ ktabzoomframe.cpp Fri Jul 26 14:12:26 2002
@@ -43,7 +43,7 @@
bool m_sliding;
QPoint m_slideStart;
int m_initialPos, m_initialSize;
- QToolButton *m_closeButton, *m_dockButton;
+ QToolButton *m_closeButton, *m_dockButton;
};
@@ -97,6 +97,13 @@
d->m_dockButton->setPixmap(QPixmap(sticky));
d->m_dockButton->setFixedSize(12,12);
d->m_dockButton->setToggleButton(true);
+
+ QPalette pal = d->m_dockButton->palette();
+ QColorGroup cg = pal.active();
+ cg.setColor(QColorGroup::Background,
KGlobalSettings::activeTitleColor());
+ pal.setActive(cg) ;
+ d->m_dockButton->setPalette(pal);
+
hbox->addWidget(d->m_dockButton);
connect(d->m_dockButton, SIGNAL(toggled(bool)), this,
SLOT(slotDockButtonToggled(bool)));
@@ -105,6 +112,8 @@
d->m_closeButton = new QToolButton(arrow, f);
d->m_closeButton->setFixedSize(12,12);
+ d->m_closeButton->setPalette(pal);
+
hbox->addWidget(d->m_closeButton);
connect(d->m_closeButton, SIGNAL(clicked()), this,
SLOT(slotCloseButtonClicked()));
--
Caleb Tennis
More information about the KDevelop-devel
mailing list