Fix building on Linux
This commit is contained in:
parent
97fd383c53
commit
b3d60bfb3a
10 changed files with 28 additions and 24 deletions
|
@ -4,6 +4,9 @@
|
|||
|
||||
#include "atom/browser/ui/views/global_menu_bar_x11.h"
|
||||
|
||||
// There are conflicts between Xlib.h and this header.
|
||||
#include "atom/browser/native_window_views.h" // NOLINT
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
// This conflicts with mate::Converter,
|
||||
|
@ -15,7 +18,6 @@
|
|||
#include <dlfcn.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "atom/browser/native_window_views.h"
|
||||
#include "atom/browser/ui/atom_menu_model.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
|
|
|
@ -36,7 +36,7 @@ SubmenuButton::SubmenuButton(const base::string16& title,
|
|||
|
||||
if (GetUnderlinePosition(title, &accelerator_, &underline_start_,
|
||||
&underline_end_))
|
||||
gfx::Canvas::SizeStringInt(GetText(), GetFontList(), &text_width_,
|
||||
gfx::Canvas::SizeStringInt(GetText(), gfx::FontList(), &text_width_,
|
||||
&text_height_, 0, 0);
|
||||
|
||||
SetInkDropMode(InkDropMode::ON);
|
||||
|
@ -107,8 +107,8 @@ bool SubmenuButton::GetUnderlinePosition(const base::string16& text,
|
|||
void SubmenuButton::GetCharacterPosition(
|
||||
const base::string16& text, int index, int* pos) {
|
||||
int height = 0;
|
||||
gfx::Canvas::SizeStringInt(text.substr(0, index), GetFontList(), pos, &height,
|
||||
0, 0);
|
||||
gfx::Canvas::SizeStringInt(text.substr(0, index), gfx::FontList(), pos,
|
||||
&height, 0, 0);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue