Python bindings and Gtk3

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

Python bindings and Gtk3

Mike Alexander
You may already know this, but the Python bindings done’t work in the current master branch (they still use Gtk2).  I made a brief attempt to fix this, but I don’t know either Python or Gtk3 well enough.  

I also noticed a cosmetic issue that you may not be aware of because I use a non-default window configuration.  I keep the tabs arranged along the right hand side of the  window.  In the Gtk3 version these tabs are about twice as high as previously.  This means that my tabs don’t fit along the side of the window without scrolling.  Before they took up about 2/3 of the window height.  This is obviously not a fatal problem, but it is annoying.

In general, I’m impressed by how well this works given the magnitude of the change.  It’s going to be a big improvement.

      Mike

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

Re: Python bindings and Gtk3

Sumit Bhardwaj
Agree with Mike. GTK3 changes are looking fine. So far, only minor issues.

For the tab issue, can you share a screenshot or something to that effect?
I am on master build and have tabs on right-hand side as well, but it's
perfectly usable.

-Sumit

On Mon, Aug 7, 2017 at 2:32 PM, Mike Alexander <[hidden email]> wrote:

> You may already know this, but the Python bindings done’t work in the
> current master branch (they still use Gtk2).  I made a brief attempt to fix
> this, but I don’t know either Python or Gtk3 well enough.
>
> I also noticed a cosmetic issue that you may not be aware of because I use
> a non-default window configuration.  I keep the tabs arranged along the
> right hand side of the  window.  In the Gtk3 version these tabs are about
> twice as high as previously.  This means that my tabs don’t fit along the
> side of the window without scrolling.  Before they took up about 2/3 of the
> window height.  This is obviously not a fatal problem, but it is annoying.
>
> In general, I’m impressed by how well this works given the magnitude of
> the change.  It’s going to be a big improvement.
>
>       Mike
>
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python bindings and Gtk3

Mike Alexander
> On Aug 7, 2017, at 8:51 PM, Sumit Bhardwaj <[hidden email]> wrote:
>
> For the tab issue, can you share a screenshot or something to that effect? I am on master build and have tabs on right-hand side as well, but it's perfectly usable.
>

It’s certainly usable, I didn’t mean to imply otherwise.  It’s just that I have to scroll to see all my tabs where I don’t in the old version.  It’s a minor annoyance that should be easily dealt with.  I should probably learn enough about Gtk3 to fix it myself, but if I start playing around with that I won’t get any of the things I should be doing done.  Also, note that I’m using the X Window version, not the Quartz version.  The Quartz version may be quite different (I’m not sure if it’s even being built yet).

            Mike

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

Re: Python bindings and Gtk3

Geert Janssens-4
On dinsdag 8 augustus 2017 05:17:09 CEST Mike Alexander wrote:

> > On Aug 7, 2017, at 8:51 PM, Sumit Bhardwaj <[hidden email]> wrote:
> >
> > For the tab issue, can you share a screenshot or something to that effect?
> > I am on master build and have tabs on right-hand side as well, but it's
> > perfectly usable.
> It’s certainly usable, I didn’t mean to imply otherwise.  It’s just that I
> have to scroll to see all my tabs where I don’t in the old version.  It’s a
> minor annoyance that should be easily dealt with.  I should probably learn
> enough about Gtk3 to fix it myself, but if I start playing around with that
> I won’t get any of the things I should be doing done.  Also, note that I’m
> using the X Window version, not the Quartz version.  The Quartz version may
> be quite different (I’m not sure if it’s even being built yet).

I don't think it's an X Window vs Quarz thing. The tabs in gtk3 are
effectively much bigger. It's a matter of theming. I always get the feeling
the default gtk3 theme has been developed with with touch screens in mind
rather than keyboard/mouse interaction. Perhaps another theme will do better.

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

Re: Python bindings and Gtk3

John Ralls
In reply to this post by Mike Alexander

> On Aug 8, 2017, at 6:17 AM, Mike Alexander <[hidden email]> wrote:
>
>> On Aug 7, 2017, at 8:51 PM, Sumit Bhardwaj <[hidden email]> wrote:
>>
>> For the tab issue, can you share a screenshot or something to that effect? I am on master build and have tabs on right-hand side as well, but it's perfectly usable.
>>
>
> It’s certainly usable, I didn’t mean to imply otherwise.  It’s just that I have to scroll to see all my tabs where I don’t in the old version.  It’s a minor annoyance that should be easily dealt with.  I should probably learn enough about Gtk3 to fix it myself, but if I start playing around with that I won’t get any of the things I should be doing done.  Also, note that I’m using the X Window version, not the Quartz version.  The Quartz version may be quite different (I’m not sure if it’s even being built yet).
>
>  

Mike,

I just built quartz on my laptop on the way over from the US last week and pushed the changes.

There's a pango bug, 782393, about drawing double-size with CoreText on a Retina screen; it was revealed by a change to Gtk that's mentioned in the first note on the bug. I've written a patch which is in Gtk-OSX but it's waiting for Bedhad to approve it before I can push it to Pango.

I don't know if the MacPorts X-build uses the CoreText or FontConfig backend for Pango, but if it uses CoreText it might be your problem.

Regards,
John Ralls



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

Re: Python bindings and Gtk3

Mike Alexander
> On Aug 8, 2017, at 10:23 AM, John Ralls <[hidden email]> wrote:
>
> I don't know if the MacPorts X-build uses the CoreText or FontConfig backend for Pango, but if it uses CoreText it might be your problem.

I don’t know either.  I see that Pango’s configure looks for (and finds) fontconfig, but then says "checking which cairo font backends could be used... quartz freetype”.  I suspect it is using fontconfig.  I am using a Retina display, but the text in the tabs seems like it’s normal size.  There is a lot of blank space around the text that makes the tab bigger.  In fact the text itself is smaller in the Gtk3 version.  Here are a couple of screenshots.

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

Re: Python bindings and Gtk3

Mike Alexander
> On Aug 9, 2017, at 12:21 AM, Mike Alexander <[hidden email]> wrote:
>
>> On Aug 8, 2017, at 10:23 AM, John Ralls <[hidden email]> wrote:
>>
>> I don't know if the MacPorts X-build uses the CoreText or FontConfig backend for Pango, but if it uses CoreText it might be your problem.
>
> I don’t know either.  I see that Pango’s configure looks for (and finds) fontconfig, but then says "checking which cairo font backends could be used... quartz freetype”.  I suspect it is using fontconfig.  I am using a Retina display, but the text in the tabs seems like it’s normal size.  There is a lot of blank space around the text that makes the tab bigger.  In fact the text itself is smaller in the Gtk3 version.  Here are a couple of screenshots.


I guess attachments aren’t allowed, I should have known.  The screenshots are at

https://www.dropbox.com/s/9ge32ydfc95fum8/Gtk2%20tabs.png?dl=0 <https://www.dropbox.com/s/9ge32ydfc95fum8/Gtk2%20tabs.png?dl=0> (Gtk2)
and
https://www.dropbox.com/s/c650pqyjbyl1zvn/Gtk3%20tabs.png?dl=0 <https://www.dropbox.com/s/c650pqyjbyl1zvn/Gtk3%20tabs.png?dl=0> (Gtk3)

      Mike

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

Re: Python bindings and Gtk3

Derek Atkins
Mike,

Mike Alexander <[hidden email]> writes:

> I guess attachments aren’t allowed, I should have known.  The
> screenshots are at

*attachments* are allowed

*INLINE* images are not.

-derek
--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python bindings and Gtk3

John Ralls
In reply to this post by Mike Alexander

> On Aug 9, 2017, at 7:28 AM, Mike Alexander <[hidden email]> wrote:
>
>> On Aug 9, 2017, at 12:21 AM, Mike Alexander <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>> On Aug 8, 2017, at 10:23 AM, John Ralls <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> I don't know if the MacPorts X-build uses the CoreText or FontConfig backend for Pango, but if it uses CoreText it might be your problem.
>>
>> I don’t know either.  I see that Pango’s configure looks for (and finds) fontconfig, but then says "checking which cairo font backends could be used... quartz freetype”.  I suspect it is using fontconfig.  I am using a Retina display, but the text in the tabs seems like it’s normal size.  There is a lot of blank space around the text that makes the tab bigger.  In fact the text itself is smaller in the Gtk3 version.  Here are a couple of screenshots.
>
>
> I guess attachments aren’t allowed, I should have known.  The screenshots are at
>
> https://www.dropbox.com/s/9ge32ydfc95fum8/Gtk2%20tabs.png?dl=0 <https://www.dropbox.com/s/9ge32ydfc95fum8/Gtk2%20tabs.png?dl=0> (Gtk2)
> and
> https://www.dropbox.com/s/c650pqyjbyl1zvn/Gtk3%20tabs.png?dl=0 <https://www.dropbox.com/s/c650pqyjbyl1zvn/Gtk3%20tabs.png?dl=0> (Gtk3)

Hmm, looks like both whitespace and font are larger. What version of Gtk+-3?

You can try fiddling with the tab-label styling in ~/.config/gtk-3.0/gtk.css. There's some guidance in https://developer.gnome.org/gtk3/unstable/theming.html <https://developer.gnome.org/gtk3/unstable/theming.html>.

Regards,
John Ralls


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

Re: Python bindings and Gtk3

Mike Alexander
> On Aug 9, 2017, at 1:49 PM, John Ralls <[hidden email]> wrote:
>
> Hmm, looks like both whitespace and font are larger. What version of Gtk+-3?
>

It’s version 3.22.

> Hmm, looks like both whitespace and font are larger. What version of Gtk+-3?
>
> You can try fiddling with the tab-label styling in ~/.config/gtk-3.0/gtk.css. There's some guidance in https://developer.gnome.org/gtk3/unstable/theming.html <https://developer.gnome.org/gtk3/unstable/theming.html>.

I’ll take a look at that.

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

Re: Python bindings and Gtk3

John Ralls

> On Aug 10, 2017, at 12:31 AM, Mike Alexander <[hidden email]> wrote:
>
>> On Aug 9, 2017, at 1:49 PM, John Ralls <[hidden email]> wrote:
>>
>> Hmm, looks like both whitespace and font are larger. What version of Gtk+-3?
>>
>
> It’s version 3.22.
>
>> Hmm, looks like both whitespace and font are larger. What version of Gtk+-3?
>>
>> You can try fiddling with the tab-label styling in ~/.config/gtk-3.0/gtk.css. There's some guidance in https://developer.gnome.org/gtk3/unstable/theming.html <https://developer.gnome.org/gtk3/unstable/theming.html>.
>
> I’ll take a look at that.
>

3.22.what? I pushed the change to gtk that caused the pango breakage between 3.22.11 and 3.22.12 so 3.22.11 wouldn't have had the problem... and of course if pango is using the fontconfig backend it shouldn't manifest anyway. Of course it's also possible that MacPorts picked up my patch from the bug.

Regards,
John Ralls


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

Re: Python bindings and Gtk3

Mike Alexander
> On Aug 10, 2017, at 3:22 AM, John Ralls <[hidden email]> wrote:
>
> 3.22.what? I pushed the change to gtk that caused the pango breakage between 3.22.11 and 3.22.12 so 3.22.11 wouldn't have had the problem... and of course if pango is using the fontconfig backend it shouldn't manifest anyway. Of course it's also possible that MacPorts picked up my patch from the bug.

Sorry, it’s 3.22.17.  I didn’t copy and paste enough.

I discovered that switching to the HighContrast theme improved the sizing of the tabs so they are similar to the size in Gtk2.  This doesn’t seem like something I would expect.

          Mike
 
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Loading...