| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/libgtkui/gtk_ui.h" | 5 #include "chrome/browser/ui/libgtkui/gtk_ui.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <pango/pango.h> | 8 #include <pango/pango.h> |
| 9 #include <X11/Xcursor/Xcursor.h> | 9 #include <X11/Xcursor/Xcursor.h> |
| 10 | 10 |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 colors_[ThemeProperties::COLOR_TAB_TEXT] = toolbar_text_color; | 896 colors_[ThemeProperties::COLOR_TAB_TEXT] = toolbar_text_color; |
| 897 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = toolbar_text_color; | 897 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = toolbar_text_color; |
| 898 colors_[ThemeProperties::COLOR_BACKGROUND_TAB_TEXT] = | 898 colors_[ThemeProperties::COLOR_BACKGROUND_TAB_TEXT] = |
| 899 color_utils::BlendTowardOppositeLuma(toolbar_text_color, 50); | 899 color_utils::BlendTowardOppositeLuma(toolbar_text_color, 50); |
| 900 | 900 |
| 901 SkColor location_bar_border = | 901 SkColor location_bar_border = |
| 902 GetBorderColor("GtkToolbar#toolbar GtkEntry#entry"); | 902 GetBorderColor("GtkToolbar#toolbar GtkEntry#entry"); |
| 903 if (SkColorGetA(location_bar_border)) | 903 if (SkColorGetA(location_bar_border)) |
| 904 colors_[ThemeProperties::COLOR_LOCATION_BAR_BORDER] = location_bar_border; | 904 colors_[ThemeProperties::COLOR_LOCATION_BAR_BORDER] = location_bar_border; |
| 905 | 905 |
| 906 inactive_selection_bg_color_ = | 906 inactive_selection_bg_color_ = GetSelectionBgColor( |
| 907 GetSelectedBgColor("GtkTextView#textview.view:backdrop"); | 907 GtkVersionCheck(3, 20) ? "GtkTextView#textview.view:backdrop " |
| 908 "#text:backdrop #selection:backdrop" |
| 909 : "GtkTextView:selected:backdrop"); |
| 908 inactive_selection_fg_color_ = | 910 inactive_selection_fg_color_ = |
| 909 GetSelectedTextColor("GtkTextView#textview.view:backdrop"); | 911 GetFgColor(GtkVersionCheck(3, 20) ? "GtkTextView#textview.view:backdrop " |
| 912 "#text:backdrop #selection:backdrop" |
| 913 : "GtkTextView:selected:backdrop"); |
| 910 | 914 |
| 911 SkColor toolbar_button_border = | 915 SkColor toolbar_button_border = |
| 912 GetBorderColor("GtkToolbar#toolbar GtkButton#button"); | 916 GetBorderColor("GtkToolbar#toolbar GtkButton#button"); |
| 913 colors_[ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND] = | 917 colors_[ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND] = |
| 914 toolbar_color; | 918 toolbar_color; |
| 915 colors_[ThemeProperties::COLOR_BOOKMARK_BAR_INSTRUCTIONS_TEXT] = | 919 colors_[ThemeProperties::COLOR_BOOKMARK_BAR_INSTRUCTIONS_TEXT] = |
| 916 toolbar_text_color; | 920 toolbar_text_color; |
| 917 // Separates the toolbar from the bookmark bar or butter bars. | 921 // Separates the toolbar from the bookmark bar or butter bars. |
| 918 colors_[ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR] = | 922 colors_[ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR] = |
| 919 toolbar_button_border; | 923 toolbar_button_border; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 | 1077 |
| 1074 float GtkUi::GetDeviceScaleFactor() const { | 1078 float GtkUi::GetDeviceScaleFactor() const { |
| 1075 return device_scale_factor_; | 1079 return device_scale_factor_; |
| 1076 } | 1080 } |
| 1077 | 1081 |
| 1078 } // namespace libgtkui | 1082 } // namespace libgtkui |
| 1079 | 1083 |
| 1080 views::LinuxUI* BuildGtkUi() { | 1084 views::LinuxUI* BuildGtkUi() { |
| 1081 return new libgtkui::GtkUi; | 1085 return new libgtkui::GtkUi; |
| 1082 } | 1086 } |
| OLD | NEW |