mirror of https://github.com/odrling/Aegisub
Don't shrink the size of layer SpinCtrl on GTK3
This commit is contained in:
parent
7fe4382d38
commit
d55922d3cf
|
@ -153,7 +153,12 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
|
||||||
middle_left_sizer = new wxBoxSizer(wxHORIZONTAL);
|
middle_left_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
layer = new wxSpinCtrl(this,-1,"",wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS | wxTE_PROCESS_ENTER,0,0x7FFFFFFF,0);
|
layer = new wxSpinCtrl(this,-1,"",wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS | wxTE_PROCESS_ENTER,0,0x7FFFFFFF,0);
|
||||||
|
#ifndef __WXGTK3__
|
||||||
|
// GTK3 has a bug that we cannot shrink the size of a widget, so do nothing there. See:
|
||||||
|
// http://gtk.10911.n7.nabble.com/gtk-widget-set-size-request-stopped-working-with-GTK3-td26274.html
|
||||||
|
// https://trac.wxwidgets.org/ticket/18568
|
||||||
layer->SetInitialSize(layer->GetSizeFromTextSize(GetTextExtent(wxS("0"))));
|
layer->SetInitialSize(layer->GetSizeFromTextSize(GetTextExtent(wxS("0"))));
|
||||||
|
#endif
|
||||||
layer->SetToolTip(_("Layer number"));
|
layer->SetToolTip(_("Layer number"));
|
||||||
middle_left_sizer->Add(layer, wxSizerFlags().Center());
|
middle_left_sizer->Add(layer, wxSizerFlags().Center());
|
||||||
middle_left_sizer->AddSpacer(5);
|
middle_left_sizer->AddSpacer(5);
|
||||||
|
|
Loading…
Reference in New Issue