| 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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 879 |
| 880 colors_[ThemeProperties::COLOR_TAB_THROBBER_SPINNING] = | 880 colors_[ThemeProperties::COLOR_TAB_THROBBER_SPINNING] = |
| 881 native_theme_->GetSystemColor( | 881 native_theme_->GetSystemColor( |
| 882 ui::NativeTheme::kColorId_ThrobberSpinningColor); | 882 ui::NativeTheme::kColorId_ThrobberSpinningColor); |
| 883 colors_[ThemeProperties::COLOR_TAB_THROBBER_WAITING] = | 883 colors_[ThemeProperties::COLOR_TAB_THROBBER_WAITING] = |
| 884 native_theme_->GetSystemColor( | 884 native_theme_->GetSystemColor( |
| 885 ui::NativeTheme::kColorId_ThrobberWaitingColor); | 885 ui::NativeTheme::kColorId_ThrobberWaitingColor); |
| 886 | 886 |
| 887 #if GTK_MAJOR_VERSION > 2 | 887 #if GTK_MAJOR_VERSION > 2 |
| 888 colors_[ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR] = | 888 colors_[ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR] = |
| 889 colors_[ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR] = | 889 GetBorderColor("GtkToolbar#toolbar.primary-toolbar"); |
| 890 GetBorderColor("GtkToolbar#toolbar.primary-toolbar"); | |
| 891 #endif | 890 #endif |
| 892 } | 891 } |
| 893 | 892 |
| 894 void GtkUi::LoadCursorTheme() { | 893 void GtkUi::LoadCursorTheme() { |
| 895 GtkSettings* settings = gtk_settings_get_default(); | 894 GtkSettings* settings = gtk_settings_get_default(); |
| 896 | 895 |
| 897 gchar* theme = nullptr; | 896 gchar* theme = nullptr; |
| 898 gint size = 0; | 897 gint size = 0; |
| 899 g_object_get(settings, "gtk-cursor-theme-name", &theme, | 898 g_object_get(settings, "gtk-cursor-theme-name", &theme, |
| 900 "gtk-cursor-theme-size", &size, nullptr); | 899 "gtk-cursor-theme-size", &size, nullptr); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 | 1052 |
| 1054 float GtkUi::GetDeviceScaleFactor() const { | 1053 float GtkUi::GetDeviceScaleFactor() const { |
| 1055 return device_scale_factor_; | 1054 return device_scale_factor_; |
| 1056 } | 1055 } |
| 1057 | 1056 |
| 1058 } // namespace libgtkui | 1057 } // namespace libgtkui |
| 1059 | 1058 |
| 1060 views::LinuxUI* BuildGtkUi() { | 1059 views::LinuxUI* BuildGtkUi() { |
| 1061 return new libgtkui::GtkUi; | 1060 return new libgtkui::GtkUi; |
| 1062 } | 1061 } |
| OLD | NEW |