[chronojump] DialogMessage on mac resizes after showing and this solves the glitch
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DialogMessage on mac resizes after showing and this solves the glitch
- Date: Wed, 23 Feb 2022 14:22:53 +0000 (UTC)
commit fa2229ba3805ebd9c978b94d6d84dfd6ae690f97
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Feb 23 15:22:30 2022 +0100
DialogMessage on mac resizes after showing and this solves the glitch
src/gui/dialogMessage.cs | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/gui/dialogMessage.cs b/src/gui/dialogMessage.cs
index 68298b89a..4f8dbf19e 100644
--- a/src/gui/dialogMessage.cs
+++ b/src/gui/dialogMessage.cs
@@ -121,23 +121,25 @@ public class DialogMessage
else
scrolledwindow_by_software.SetPolicy(PolicyType.Never, PolicyType.Never);
-
-
label_message.Show();
dialog_message.Show();
-
- //GLib.Timeout.Add(200, new GLib.TimeoutHandler(showLabelAndDialog));
+
+ if(UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX)
+ GLib.Timeout.Add(200, new GLib.TimeoutHandler(resizeDialogForMac));
}
/*
- private bool showLabelAndDialog()
+ on some macs, the label is not shown correctly, seems not a problem of frame or scrollerwin
+ after resizing a bit (by user) is shown correctly, so resize here.
+ */
+ private bool resizeDialogForMac ()
{
- label_message.Show();
- dialog_message.Show();
+ dialog_message.SetSizeRequest(
+ dialog_message.SizeRequest().Width + 3,
+ dialog_message.SizeRequest().Height + 3);
return false;
}
- */
public void on_button_go_clicked (object obj, EventArgs args)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]