Author: spitz
Date: Fri Mar 18 15:40:38 2011
New Revision: 37949
URL: http://www.lyx.org/trac/changeset/37949
Log:
* GuiDocument.cpp: do not hardcode colors that can be redefined in prefs..
Modified:
lyx-devel/trunk/src/frontends/qt4/GuiDocument.cpp
Modified: lyx-devel/trunk/src/frontends/qt4/GuiDocument.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiDocument.cpp Fri Mar 18 15:11:36
2011 (r37948)
+++ lyx-devel/trunk/src/frontends/qt4/GuiDocument.cpp Fri Mar 18 15:40:38
2011 (r37949)
@@ -1518,7 +1518,7 @@
void GuiDocument::deleteBackgroundColor()
{
- // set the button color back to default by setting an epmty StyleSheet
+ // set the button color back to default by setting an empty StyleSheet
colorModule->backgroundPB->setStyleSheet(QLatin1String(""));
// change button text
colorModule->backgroundPB->setText(qt_("&Default..."));
@@ -1548,7 +1548,7 @@
void GuiDocument::deleteFontColor()
{
- // set the button color back to default by setting an epmty StyleSheet
+ // set the button color back to default by setting an empty StyleSheet
colorModule->fontColorPB->setStyleSheet(QLatin1String(""));
// change button text
colorModule->fontColorPB->setText(qt_("&Default..."));
@@ -1576,11 +1576,10 @@
void GuiDocument::deleteNoteFontColor()
{
- // set the button color back to light gray
+ // set the button color back to pref
+ theApp()->getRgbColor(Color_notebg, set_notefontcolor);
colorModule->noteFontColorPB->setStyleSheet(
- colorButtonStyleSheet(QColor(204, 204, 204, 255)));
- // save light gray as the set color
- set_notefontcolor = rgbFromHexName("#cccccc");
+ colorButtonStyleSheet(rgb2qcolor(set_notefontcolor)));
changed();
}
@@ -1602,11 +1601,10 @@
void GuiDocument::deleteBoxBackgroundColor()
{
- // set the button color back to red
+ // set the button color back to pref
+ theApp()->getRgbColor(Color_shadedbg, set_boxbgcolor);
colorModule->boxBackgroundPB->setStyleSheet(
- colorButtonStyleSheet(QColor(Qt::red)));
- // save red as the set color
- set_boxbgcolor = rgbFromHexName("#ff0000");
+ colorButtonStyleSheet(rgb2qcolor(set_boxbgcolor)));
changed();
}