gtkdialog maximum size

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

gtkdialog maximum size

Rúben Rodrigues
Hi guys,

Someone knows how to limite the maximum size of gtkdialog? My problem is
that as the dialog does resize itself, sometimes it gets bigger that the
screen.

You can see here:

https://ibin.co/3a9dsXej5ArN.png

Best regards,

Ruben Rodrigues


---
Este e-mail foi verificado em termos de vírus pelo software antivírus Avast.
https://www.avast.com/antivirus

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: gtkdialog maximum size

Emmanuele Bassi
On 12 September 2017 at 18:06, Rúben Rodrigues <[hidden email]> wrote:

> Someone knows how to limite the maximum size of gtkdialog? My problem is
> that as the dialog does resize itself, sometimes it gets bigger that the
> screen.

Why are you using a GtkDialog? You should be using a GtkWindow for a complex UI.

Additionally, the size of a top-level is given by its contents, unless
you specify a size yourself. If your UI is too big, you'll have to
arrange it differently.

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: gtkdialog maximum size

Stefan Salewski-2
On Wed, 2017-09-13 at 10:59 +0100, Emmanuele Bassi wrote:
> Why are you using a GtkDialog? You should be using a GtkWindow for a
> complex UI.
>
> Additionally, the size of a top-level is given by its contents,
> unless
> you specify a size yourself. If your UI is too big, you'll have to
> arrange it differently.

For a plain Window he may use of course a GtkScrolledWindow. I am not
sure if that would work for a dialog too, but I think so.

But of course a scrolled window with parts invisible is not really user
friendly...

Ruben, what do you expect when contents do not fit onto screen? And
have you solved your other problem with the two dialogs following each
other? I have seen a long reply of somebody to your question -- did
that helped you?

Next question may be how to detect that content is too large for
screen, and how to shrink content. Maybe check allocation for window
first. And when larger than screen, maybe reduce text size, widget size
or hide some widgets.
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: gtkdialog maximum size

Rúben Rodrigues
Thanks. I don't solved my other problem yet. I leave the problem with
two dialog for other time. But using GtkScrolledWindow i resolved this
problem.

Why are you saying that using a scrolled window with parts invisible is
not user frindly?

Best regards,

Ruben


Às 11:16 de 13/09/2017, Stefan Salewski escreveu:

> On Wed, 2017-09-13 at 10:59 +0100, Emmanuele Bassi wrote:
>> Why are you using a GtkDialog? You should be using a GtkWindow for a
>> complex UI.
>>
>> Additionally, the size of a top-level is given by its contents,
>> unless
>> you specify a size yourself. If your UI is too big, you'll have to
>> arrange it differently.
> For a plain Window he may use of course a GtkScrolledWindow. I am not
> sure if that would work for a dialog too, but I think so.
>
> But of course a scrolled window with parts invisible is not really user
> friendly...
>
> Ruben, what do you expect when contents do not fit onto screen? And
> have you solved your other problem with the two dialogs following each
> other? I have seen a long reply of somebody to your question -- did
> that helped you?
>
> Next question may be how to detect that content is too large for
> screen, and how to shrink content. Maybe check allocation for window
> first. And when larger than screen, maybe reduce text size, widget size
> or hide some widgets.


---
Este e-mail foi verificado em termos de vírus pelo software antivírus Avast.
https://www.avast.com/antivirus

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: gtkdialog maximum size

Stefan Salewski-2
On Wed, 2017-09-13 at 10:34 +0000, Rúben Rodrigues wrote:
> Why are you saying that using a scrolled window with parts invisible
> is 
> not user frindly?

Because the user has to scroll :-)

Of course having a scrolled window with active scrollbars can be
necessary -- when there is really more content as fits on the screen.

But it may be more user friendly to make widgets or text not too large,
or to hide rarely used widgets. So all fits onto the screen.
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
rbd
Reply | Threaded
Open this post in threaded view
|

Re: gtkdialog maximum size

rbd
In reply to this post by Rúben Rodrigues

I second Stefan's suggestion of encapsulating your dialog panel within a
scrolled window, and in fact I have made it a habit to implement that for
every major toplevel window in all of my GUI software. You never know when
an app that was designed for a nice fat desktop display will end up being
run on a teeny-weeny laptop. Use the screen dimension discovery functions
and the toplevel window size hints to set a maximum size on your toplevel
window so that it's always guaranteed to be fully visible, even if the
larger embedded scrolled window is only partially visible. You don't ever
want to be in a position where your 'Click to Continue' button is
completely inaccessable because it's hanging off the bottom of the screen.

Another solution I have used in the couple of odd cases where I was forced
to show an especially large dialog, e.g., to configure plot parameters for
a rather complex mapping display with dozens of display options, is to
group your dialog components into subsets and access each group
independently via a secondary dialog window which you display only when
the user clicks on an 'Edit Group X Parameters' button in the main dialog.

I'm not a big fan of small font sizes to make things fit -- if you've
already got what is practically a fullscreen window filled to overflowing,
then making all those widgets smaller is just going to leave you with an
illegible mess. Solve your problem through better organization, not
miniaturization.

Roger Davis
Univ. of Hawaii
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list