From 45b634913923ad2d7656fa45e36294251eb4464f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Fri, 18 Mar 2011 14:40:38 +0000 Subject: [PATCH] * GuiDocument.cpp: do not hardcode colors that can be redefined in prefs.. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37949 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 5ebc1a497d..141afbcf06 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1518,7 +1518,7 @@ void GuiDocument::changeBackgroundColor() 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::changeFontColor() 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::changeNoteFontColor() 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::changeBoxBackgroundColor() 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(); } -- 2.39.2