Commit 695f21b2 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Fix Gtk2 build

Chromium Embedded Framework [1] is a project that requires a Gtk2 build.

[1] https://bitbucket.org/chromiumembedded/cef

BUG=610428
R=erg

Change-Id: Iefecaccdc026cd5ab4bd692f15926e7410909fc7
Reviewed-on: https://chromium-review.googlesource.com/849482Reviewed-by: default avatarElliot Glaysher <erg@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526869}
parent 8e97e7b2
...@@ -54,11 +54,6 @@ void CommonInitFromCommandLine(const base::CommandLine& command_line, ...@@ -54,11 +54,6 @@ void CommonInitFromCommandLine(const base::CommandLine& command_line,
} }
} }
float GetDeviceScaleFactor() {
views::LinuxUI* linux_ui = views::LinuxUI::instance();
return linux_ui ? linux_ui->GetDeviceScaleFactor() : 1;
}
} // namespace } // namespace
namespace libgtkui { namespace libgtkui {
...@@ -233,6 +228,15 @@ void ParseButtonLayout(const std::string& button_string, ...@@ -233,6 +228,15 @@ void ParseButtonLayout(const std::string& button_string,
} }
#if GTK_MAJOR_VERSION > 2 #if GTK_MAJOR_VERSION > 2
namespace {
float GetDeviceScaleFactor() {
views::LinuxUI* linux_ui = views::LinuxUI::instance();
return linux_ui ? linux_ui->GetDeviceScaleFactor() : 1;
}
} // namespace
void* GetGdkSharedLibrary() { void* GetGdkSharedLibrary() {
std::string lib_name = std::string lib_name =
"libgdk-" + std::to_string(GTK_MAJOR_VERSION) + ".so.0"; "libgdk-" + std::to_string(GTK_MAJOR_VERSION) + ".so.0";
......
...@@ -219,6 +219,14 @@ SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const { ...@@ -219,6 +219,14 @@ SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const {
case kColorId_ButtonPressedShade: case kColorId_ButtonPressedShade:
return SK_ColorTRANSPARENT; return SK_ColorTRANSPARENT;
// TabbedPane
case ui::NativeTheme::kColorId_TabTitleColorActive:
return GetTextColor(GetEntry(), NORMAL);
case ui::NativeTheme::kColorId_TabTitleColorInactive:
return GetTextColor(GetLabel(), INSENSITIVE);
case ui::NativeTheme::kColorId_TabBottomBorder:
return GetTextColor(GetEntry(), NORMAL);
// Textfield // Textfield
case kColorId_TextfieldDefaultColor: case kColorId_TextfieldDefaultColor:
return GetTextColor(GetEntry(), NORMAL); return GetTextColor(GetEntry(), NORMAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment