summaryrefslogtreecommitdiff
path: root/ui/qt/font_color_preferences_frame.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-07-17 20:58:56 +0000
committerGerald Combs <gerald@wireshark.org>2013-07-17 20:58:56 +0000
commit19df8230aaff7a43549a52f6b3798d20db5f79af (patch)
tree0560f730c744973bc0626f33285f151e93beb5b1 /ui/qt/font_color_preferences_frame.cpp
parent8cefe3b40628bed52be330f78925f5b27e410e83 (diff)
downloadwireshark-19df8230aaff7a43549a52f6b3798d20db5f79af.tar.gz
Add filter color preferences to the Qt UI similar to r50203. Fixes bug
5413. svn path=/trunk/; revision=50706
Diffstat (limited to 'ui/qt/font_color_preferences_frame.cpp')
-rw-r--r--ui/qt/font_color_preferences_frame.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/ui/qt/font_color_preferences_frame.cpp b/ui/qt/font_color_preferences_frame.cpp
index eab7568d76..d5a31932bc 100644
--- a/ui/qt/font_color_preferences_frame.cpp
+++ b/ui/qt/font_color_preferences_frame.cpp
@@ -52,6 +52,9 @@ FontColorPreferencesFrame::FontColorPreferencesFrame(QWidget *parent) :
pref_client_bg_ = prefFromPrefPtr(&prefs.st_client_bg);
pref_server_fg_ = prefFromPrefPtr(&prefs.st_server_fg);
pref_server_bg_ = prefFromPrefPtr(&prefs.st_server_bg);
+ pref_valid_bg_ = prefFromPrefPtr(&prefs.gui_text_valid);
+ pref_invalid_bg_ = prefFromPrefPtr(&prefs.gui_text_invalid);
+ pref_deprecated_bg_ = prefFromPrefPtr(&prefs.gui_text_deprecated);
cur_font_.fromString(pref_qt_gui_font_name_->stashed_val.string);
@@ -143,6 +146,25 @@ void FontColorPreferencesFrame::updateWidgets()
ColorUtils::fromColorT(&pref_server_fg_->stashed_val.color).name(),
ColorUtils::fromColorT(&pref_server_bg_->stashed_val.color).name()));
ui->serverSampleLineEdit->setFont(cur_font_);
+
+ ui->validFilterBGPushButton->setStyleSheet(color_button_ss.arg(
+ ColorUtils::fromColorT(&pref_valid_bg_->stashed_val.color).name())
+ .arg(0));
+ ui->validFilterSampleLineEdit->setStyleSheet(sample_text_ss.arg(
+ "palette(text)",
+ ColorUtils::fromColorT(&pref_valid_bg_->stashed_val.color).name()));
+ ui->invalidFilterBGPushButton->setStyleSheet(color_button_ss.arg(
+ ColorUtils::fromColorT(&pref_invalid_bg_->stashed_val.color).name())
+ .arg(0));
+ ui->invalidFilterSampleLineEdit->setStyleSheet(sample_text_ss.arg(
+ "palette(text)",
+ ColorUtils::fromColorT(&pref_invalid_bg_->stashed_val.color).name()));
+ ui->deprecatedFilterBGPushButton->setStyleSheet(color_button_ss.arg(
+ ColorUtils::fromColorT(&pref_deprecated_bg_->stashed_val.color).name())
+ .arg(0));
+ ui->deprecatedFilterSampleLineEdit->setStyleSheet(sample_text_ss.arg(
+ "palette(text)",
+ ColorUtils::fromColorT(&pref_deprecated_bg_->stashed_val.color).name()));
}
void FontColorPreferencesFrame::changeColor(pref_t *pref)
@@ -216,6 +238,21 @@ void FontColorPreferencesFrame::on_serverBGPushButton_clicked()
changeColor(pref_server_bg_);
}
+void FontColorPreferencesFrame::on_validFilterBGPushButton_clicked()
+{
+ changeColor(pref_valid_bg_);
+}
+
+void FontColorPreferencesFrame::on_invalidFilterBGPushButton_clicked()
+{
+ changeColor(pref_invalid_bg_);
+}
+
+void FontColorPreferencesFrame::on_deprecatedFilterBGPushButton_clicked()
+{
+ changeColor(pref_deprecated_bg_);
+}
+
/*
* Editor modelines
*