gtkDcoding Blog Post # 26 - Menu Basics

Ron Tarrant rontarrant at gmail.com
Sat Apr 13 12:42:36 UTC 2019


On Saturday, 13 April 2019 at 09:49:47 UTC, number wrote:
> On Saturday, 13 April 2019 at 00:25:21 UTC, Ron Tarrant wrote:
> I'm asking because ... the messagebox sized itself to the 
> shorter text in the content area. They said it's an OS 
> limitation (meaning gtk standard dialogs).

Because the Dialog class inherits from Window, you can size it 
with setSizeRequest(). On Windows, at least. I'm not sure about 
Linux. I'm about to go out for a few hours, so perhaps you could 
test this.

> It also seems dialogs are not user-resizable by default, which 
> seems strange to me. So I thought to roll my own dialog, but 
> didn't get to it yet.

That's another topic I have on my list for the dialog series.

> I also wonder why I often encounter gtk apps/windows that are 
> unresizable, but still have the resize-icon cursor when 
> hovering the bottom-right window edge, which when used moves 
> the window instead.

It's because there are two flags controlling resize-ability, both 
found in generated\gtkd\gdk\c\types.d:
- a window decorations flag (GdkWMDecoration), and
- another that controls whether or not the window is allowed to 
resize (GdkWMFunction).

If the programmer turns off the resize flag, but not the 
decorator flag, well... there's your answer.

Hope that helps, number.


More information about the Digitalmars-d-learn mailing list