Re: gtk-devel-list Digest, Vol 157, Issue 4

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gtk-devel-list Digest, Vol 157, Issue 4

Daniel Boles
Date: Wed, 03 May 2017 15:45:14 +0200
From: Murray Cumming <[hidden email]>
To: Timm B?der <[hidden email]>
Cc: gtk-devel-list <[hidden email]>
Subject: Re: gtk4: gtk_box_pack_start()/end() porting
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="UTF-8"

On Wed, 2017-05-03 at 15:45 +0200, Timm B?der wrote:
[snip]
> [1]Even though spacing *should* probably be handled by the theme, so
> the
> theme can decide whether UIs are more spacey or more narrow, nobody
> has
> come up with a proper way for applications to specify that.

Yes, I've never liked how applications have all these magic values
sprinkled through their code.

Thanks for the explanation.

--
Murray


In case anyone is interested in my anecdote...

I'm using GTK+ 3 (for the forseeable future) but have stopped using widget :margin and :spacing - juuust in case they get removed at some point in the future. There's a general trickle of things like that being removed from the widget side, so better safe than sorry.

Doing these in CSS instead - while it involves some horrifying hacks that almost certainly break some cases, which I don't use yet - does mean that I can use relative units like em for spacing out my UI. That said, this also means that (unless I start generating CSS providers on the fly) I have to know in advance which levels of spaciness I want and define them as CSS classes.

But, whatever the limitations may be, this is working for me right now, and it's liberating both in the sense of cleaning up my source code and scaling far better with changes to font size, DPI, etc.


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

Re: gtk-devel-list Digest, Vol 157, Issue 4

Daniel Boles
On 4 May 2017 at 10:44, Daniel Boles <[hidden email]> wrote:

I'm using GTK+ 3 (for the forseeable future) but have stopped using widget :margin and :spacing - juuust in case they get removed at some point in the future. There's a general trickle of things like that being removed from the widget side, so better safe than sorry.

Course, I meant removed from GTK+ 4. While I'm still focussing on GTK+ 3, I'm trying to spot obvious changes that 4 will need, which I can do now in 3, to make the task of porting far less painful when it comes around - especially if things look like candidates for being removed. Plus, even if they're retained, usually the newer way is better and worth doing anyway.

If I were using GTK+ 4, the new CSS border-spacing property for Box and Grid would avoid the need for the (horrifying but surprisingly functional) way that I hack it into GTK+ 3. It would be really nice to see that being added in 3, but I'm guessing that's unlikely...



_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Loading...