From 32b3f86cc3dea3d3a5c4dd5be27202eaee919a24 Mon Sep 17 00:00:00 2001 From: coppro Date: Sat, 19 May 2007 16:12:05 +0000 Subject: [PATCH] Fixed dropdown arrow display bug on Linux. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@395 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/field.cpp | 2 +- src/gui/control/native_look_editor.cpp | 2 +- src/gui/util.cpp | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/data/field.cpp b/src/data/field.cpp index eb09cf6c..1415c113 100644 --- a/src/data/field.cpp +++ b/src/data/field.cpp @@ -115,7 +115,7 @@ bool Style::update(Context& ctx) { } void Style::initDependencies(Context& ctx, const Dependency& dep) const { -/// left .initDependencies(ctx,dep); +// left .initDependencies(ctx,dep); // top .initDependencies(ctx,dep); // width .initDependencies(ctx,dep); // height .initDependencies(ctx,dep); diff --git a/src/gui/control/native_look_editor.cpp b/src/gui/control/native_look_editor.cpp index 5cad392f..550966d5 100644 --- a/src/gui/control/native_look_editor.cpp +++ b/src/gui/control/native_look_editor.cpp @@ -72,7 +72,7 @@ void NativeLookEditor::resizeViewers() { y += s->height + vspace; } SetVirtualSize(w, (int)y); - SetScrollbar(wxVERTICAL, 0, h, (int) y); + SetScrollbar(wxVERTICAL, 0, h, (int)y); if (y >= h) { // Doesn't fit vertically, add scrollbar and resize /* diff --git a/src/gui/util.cpp b/src/gui/util.cpp index 13da01e3..5ed7877f 100644 --- a/src/gui/util.cpp +++ b/src/gui/util.cpp @@ -194,6 +194,9 @@ void draw_menu_arrow(Window* win, DC& dc, const wxRect& rect, bool active) { void draw_drop_down_arrow(Window* win, DC& dc, const wxRect& rect, bool active) { wxRendererNative& rn = wxRendererNative::GetDefault(); int w = wxSystemSettings::GetMetric(wxSYS_VSCROLL_ARROW_X); // drop down arrow is same size + if (w == -1) { + w = wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); // Try just the scrollbar, then. + } rn.DrawComboBoxDropButton(win, dc, wxRect(rect.x + rect.width - w, rect.y, w, rect.height) , active ? wxCONTROL_PRESSED : 0);