mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Workaround for https://github.com/picoe/Eto/issues/2601
This commit is contained in:
parent
f90374717a
commit
3186ffdda2
@ -65,7 +65,7 @@ public class GtkEtoPlatform : EtoPlatform
|
||||
|
||||
public override void SetFrame(Control container, Control control, Point location, Size size, bool inOverlay)
|
||||
{
|
||||
var overlay = (GTK.Overlay) container.ToNative();
|
||||
var overlay = (GTK.Overlay) ((GTK.EventBox) container.ToNative()).Child;
|
||||
var widget = control.ToNative();
|
||||
if (inOverlay)
|
||||
{
|
||||
@ -90,7 +90,7 @@ public class GtkEtoPlatform : EtoPlatform
|
||||
|
||||
public override void AddToContainer(Control container, Control control, bool inOverlay)
|
||||
{
|
||||
var overlay = (GTK.Overlay) container.ToNative();
|
||||
var overlay = (GTK.Overlay) ((GTK.EventBox) container.ToNative()).Child;
|
||||
var widget = control.ToNative();
|
||||
if (inOverlay)
|
||||
{
|
||||
@ -108,7 +108,7 @@ public class GtkEtoPlatform : EtoPlatform
|
||||
|
||||
public override void RemoveFromContainer(Control container, Control control)
|
||||
{
|
||||
var overlay = (GTK.Overlay) container.ToNative();
|
||||
var overlay = (GTK.Overlay) ((GTK.EventBox) container.ToNative()).Child;
|
||||
var widget = control.ToNative();
|
||||
overlay.Remove(widget);
|
||||
var panel = (GTK.Fixed) overlay.Children[0];
|
||||
@ -118,7 +118,7 @@ public class GtkEtoPlatform : EtoPlatform
|
||||
|
||||
public override void SetContainerSize(Window _window, Control container, Size size, int padding)
|
||||
{
|
||||
var overlay = (GTK.Overlay) container.ToNative();
|
||||
var overlay = (GTK.Overlay) ((GTK.EventBox) container.ToNative()).Child;
|
||||
if (!_window.Resizable)
|
||||
{
|
||||
// This ensures the window has the appropriate margins, otherwise with resizable=false it changes to fit
|
||||
|
@ -63,6 +63,7 @@ public class GtkListView<T> : IListView<T> where T : notnull
|
||||
}
|
||||
_scrolledWindow.Add(eventBox);
|
||||
_scrolledWindow.StyleContext.AddClass("listview");
|
||||
Control = _scrolledWindow.ToEto();
|
||||
}
|
||||
|
||||
private void OnButtonPress(object o, ButtonPressEventArgs args)
|
||||
@ -83,7 +84,7 @@ public class GtkListView<T> : IListView<T> where T : notnull
|
||||
|
||||
public ScrolledWindow NativeControl => _scrolledWindow;
|
||||
|
||||
public Control Control => _scrolledWindow.ToEto();
|
||||
public Control Control { get; }
|
||||
|
||||
public ContextMenu? ContextMenu { get; set; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user