[Konsole-devel] [Bug 80725] wish: colour in tabbar text
Kurt V.Hindenburg
kurt.hindenburg at kdemail.net
Tue Mar 22 17:25:43 UTC 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=80725
kurt.hindenburg kdemail net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From kurt.hindenburg kdemail net 2005-03-22 18:25 -------
CVS commit by hindenburg:
Allow user to select tab text color.
FEATURE: 80725
GUI
M +13 -1 konsole.cpp 1.521
M +3 -0 konsole.h 1.201
M +3 -0 main.cpp 1.289
--- kdebase/konsole/konsole/konsole.cpp #1.520:1.521
@ -256,4 +256,5 @ Konsole::Konsole(const char* name, int h
,sl_sessionShortCuts(0)
,s_workDir(workdir)
+,m_tabColor(QColor())
{
isRestored = b_inRestore;
@ -1397,4 +1398,6 @ void Konsole::saveProperties(KConfig* co
key = QString("MasterMode%1").arg(counter);
config->writeEntry(key, sessions.current()->isMasterMode());
+ key = QString("TabColor%1").arg(counter);
+ config->writeEntry(key, tabwidget->tabColor((sessions.current())->widget()));
QString cwd=sessions.current()->getCwd();
@ -1426,4 +1429,5 @ void Konsole::saveProperties(KConfig* co
config->writeEntry("DynamicTabHide", b_dynamicTabHide);
config->writeEntry("AutoResizeTabs", b_autoResizeTabs);
+ config->writeEntry("TabColor", tabwidget->tabColor(se->widget()));
if (se) {
@ -1547,4 +1551,6 @ void Konsole::readProperties(KConfig* co
b_dynamicTabHide = config->readBoolEntry("DynamicTabHide", false);
b_autoResizeTabs = config->readBoolEntry("AutoResizeTabs", false);
+ m_tabColor = config->readColorEntry("TabColor");
+ if ( !m_tabColor.isValid() ) m_tabColor = QColor( Qt::black );
}
@ -1778,5 +1784,5 @ void Konsole::createSessionTab(TEWidget
break;
}
- tabwidget->setTabColor(widget, QColor(0, 0, 0));
+ tabwidget->setTabColor(widget, m_tabColor);
}
@ -2906,4 +2912,10 @ void Konsole::initMasterMode(bool state)
}
+void Konsole::initTabColor(QColor color)
+{
+ if ( !color.isValid() ) color = QColor( Qt::black );
+ tabwidget->setTabColor( se->widget(), color );
+}
+
void Konsole::slotToggleMasterMode()
{
--- kdebase/konsole/konsole/konsole.h #1.200:1.201
@ -82,4 +82,5 @ public:
void initMonitorSilence(bool on);
void initMasterMode(bool on);
+ void initTabColor(QColor color);
void newSession(const QString &program, const QStrList &args, const QString &term, const QString &icon, const QString &title, const QString &cwd);
void setSchema(const QString & path);
@ -420,4 +421,6 @ private:
QStringList sl_sessionShortCuts;
QString s_workDir;
+
+ QColor m_tabColor;
};
--- kdebase/konsole/konsole/main.cpp #1.288:1.289
@ -509,4 +509,5 @ extern "C" int KDE_EXPORT kdemain(int ar
m->initMonitorSilence(sessionconfig->readBoolEntry("MonitorSilence0",false));
m->initMasterMode(sessionconfig->readBoolEntry("MasterMode0",false));
+ m->initTabColor(sessionconfig->readColorEntry("TabColor"));
counter++;
@ -545,4 +546,6 @ extern "C" int KDE_EXPORT kdemain(int ar
key = QString("MasterMode%1").arg(counter);
m->initMasterMode(sessionconfig->readBoolEntry(key,false));
+ key = QString("TabColor%1").arg(counter);
+ m->initTabColor(sessionconfig->readColorEntry(key));
counter++;
}
More information about the konsole-devel
mailing list