Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: chrome/browser/ui/libgtkui/gtk_ui.cc

Issue 2665753003: Gtk: Remove some unused members of GtkUi (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/gtk_ui.cc
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc
index 4cd4711e345ee2ee08dfe55bbdd2c671a8a95731..b3717b6acde865428e57ea25a8a3a8d9d7780d96 100644
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -408,6 +408,7 @@ GtkUi::GtkUi() : middle_click_action_(GetDefaultMiddleClickAction()) {
gtk_widget_realize(fake_window_); // Is this necessary?
#elif GTK_MAJOR_VERSION == 3
native_theme_ = NativeThemeGtk3::instance();
+ (void)fake_window_; // Silence the unused warning.
#else
#error "Unsupported GTK version"
#endif
@@ -863,11 +864,6 @@ void GtkUi::LoadGtkValues() {
UpdateDeviceScaleFactor();
- // Build the various icon tints.
- GetNormalButtonTintHSL(&button_tint_);
- GetNormalEntryForegroundHSL(&entry_tint_);
- GetSelectedEntryForegroundHSL(&selected_entry_tint_);
-
// We pick the text and background colors for the NTP out of the colors for a
// GtkEntry. We do this because GtkEntries background color is never the same
// as |toolbar_color|, is usually a white, and when it isn't a white,
@@ -973,38 +969,6 @@ void GtkUi::BuildFrameColors() {
#endif
}
-void GtkUi::GetNormalButtonTintHSL(color_utils::HSL* tint) const {
- SkColor accent_color = native_theme_->GetSystemColor(
- ui::NativeTheme::kColorId_ProminentButtonColor);
- SkColor text_color = native_theme_->GetSystemColor(
- ui::NativeTheme::kColorId_LabelEnabledColor);
- SkColor base_color =
- native_theme_->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground);
-
- PickButtonTintFromColors(accent_color, text_color, base_color, tint);
-}
-
-void GtkUi::GetNormalEntryForegroundHSL(color_utils::HSL* tint) const {
- SkColor accent_color = native_theme_->GetSystemColor(
- ui::NativeTheme::kColorId_ProminentButtonColor);
- SkColor text_color = native_theme_->GetSystemColor(
- ui::NativeTheme::kColorId_TextfieldDefaultColor);
- SkColor base_color = native_theme_->GetSystemColor(
- ui::NativeTheme::kColorId_TextfieldDefaultBackground);
-
- PickButtonTintFromColors(accent_color, text_color, base_color, tint);
-}
-
-void GtkUi::GetSelectedEntryForegroundHSL(color_utils::HSL* tint) const {
- // The simplest of all the tints. We just use the selected text in the entry
- // since the icons tinted this way will only be displayed against
- // base[GTK_STATE_SELECTED].
- SkColor color = native_theme_->GetSystemColor(
- ui::NativeTheme::kColorId_TextfieldSelectionColor);
-
- color_utils::SkColorToHSL(color, tint);
-}
-
void GtkUi::UpdateDefaultFont() {
GtkWidget* fake_label = gtk_label_new(nullptr);
g_object_ref_sink(fake_label); // Remove the floating reference.
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698