[Geany-Users] GTK Theming

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

[Geany-Users] GTK Theming

Mike Miller
Hi all,

I'd like to change the main menu font size on Geany.  Long story but I have two
monitors with different DPIs and need the menus and notebook tabs to be smaller
on the larger monitor, because they're huge.

Using these instructions:
http://www.geany.org/manual/current/#defining-own-widget-styles-using-gtkrc-2-0

I put this in my ~/.gtkrc-2.0 and in the same file in my current theme, but it
didn't work:


style "geanyStyle"
{
     font_name="Sans 10"
}

widget "GeanyToolbarMenu" style "geanyStyle"

style "geanyStyle2"
{
     font_name="Sans 10"
}
widget "GeanyMenubar" style "geanyStyle2"


Not sure why it doesn't work.  :/
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Matthew Brush-2
On 2017-05-09 3:55 PM, Mike Miller wrote:

> Hi all,
>
> I'd like to change the main menu font size on Geany.  Long story but I
> have two monitors with different DPIs and need the menus and notebook
> tabs to be smaller on the larger monitor, because they're huge.
>
> Using these instructions:
> http://www.geany.org/manual/current/#defining-own-widget-styles-using-gtkrc-2-0
>
>
> I put this in my ~/.gtkrc-2.0 and in the same file in my current theme,
> but it didn't work:
>
>
> style "geanyStyle"
> {
>     font_name="Sans 10"
> }
>
> widget "GeanyToolbarMenu" style "geanyStyle"
>
> style "geanyStyle2"
> {
>     font_name="Sans 10"
> }
> widget "GeanyMenubar" style "geanyStyle2"
>
>
> Not sure why it doesn't work.  :/
>

A few ideas:

1) Make sure you aren't using a GTK3 build of Geany.
2) Maybe the ~/.gtkrc-2.0 isn't reloaded until you log back in?
3) Try an application-specific gtkrc file (by setting GTK_RC_FILES
envvar before running Geany)
4) Try using  'class' instead of 'widget' and use GTK class names like
GtkToolbar and GtkMenuItem.
5) Make sure you aren't using a bad desktop environment that hijacks the
menu from Geany using patched GTK/modules to move it into the panel (ex.
Unity/GNOME shill).
6) Above, do you want 'GeanyToolbar' instead of 'GeanyToolbarMenu'?

That's all I can think of.

P.S. I think you can use one style for multiple widget/class.

Good luck,
Matthew Brush

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

Re: [Geany-Users] GTK Theming

Lex Trotman
On 10 May 2017 at 09:57, Matthew Brush <[hidden email]> wrote:

> On 2017-05-09 3:55 PM, Mike Miller wrote:
>>
>> Hi all,
>>
>> I'd like to change the main menu font size on Geany.  Long story but I
>> have two monitors with different DPIs and need the menus and notebook
>> tabs to be smaller on the larger monitor, because they're huge.
>>
>> Using these instructions:
>>
>> http://www.geany.org/manual/current/#defining-own-widget-styles-using-gtkrc-2-0
>>
>>
>> I put this in my ~/.gtkrc-2.0 and in the same file in my current theme,
>> but it didn't work:
>>
>>
>> style "geanyStyle"
>> {
>>     font_name="Sans 10"
>> }
>>
>> widget "GeanyToolbarMenu" style "geanyStyle"
>>
>> style "geanyStyle2"
>> {
>>     font_name="Sans 10"
>> }
>> widget "GeanyMenubar" style "geanyStyle2"
>>
>>
>> Not sure why it doesn't work.  :/
>>
>
> A few ideas:
>
> 1) Make sure you aren't using a GTK3 build of Geany.
> 2) Maybe the ~/.gtkrc-2.0 isn't reloaded until you log back in?
> 3) Try an application-specific gtkrc file (by setting GTK_RC_FILES envvar
> before running Geany)
> 4) Try using  'class' instead of 'widget' and use GTK class names like
> GtkToolbar and GtkMenuItem.
> 5) Make sure you aren't using a bad desktop environment that hijacks the
> menu from Geany using patched GTK/modules to move it into the panel (ex.
> Unity/GNOME shill).
> 6) Above, do you want 'GeanyToolbar' instead of 'GeanyToolbarMenu'?
>
> That's all I can think of.
>
> P.S. I think you can use one style for multiple widget/class.
>
> Good luck,
> Matthew Brush
>

Can confirm it doesn't work for me either and I tried most of Matthews
ideas, and yeah its reading the ~/.gtkrc-2.0 file because it whinged
about a typo.

So unless a GTK expert pronounces here could you raise an issue at
https://github.com/geany/geany/issues.

Cheers
Lex


>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Mike Miller
Yep,

I just tried logging out, but it did not help.

I'm using Mate (Gnome2) so I don't think the menu's have been hijacked.

Don't think it is GTK3, because it still has a sane ui and scroll bar behavior.

Tried the "class" but it didn't appear to work.


On 2017-05-09 17:09, Lex Trotman wrote:
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Lex Trotman
In reply to this post by Lex Trotman
Mike,

It works if you use wildcard matches appropriately, eg

widget "*.GeanyMenubar*" ...


Cheers
Lex

On 10 May 2017 at 10:09, Lex Trotman <[hidden email]> wrote:

> On 10 May 2017 at 09:57, Matthew Brush <[hidden email]> wrote:
>> On 2017-05-09 3:55 PM, Mike Miller wrote:
>>>
>>> Hi all,
>>>
>>> I'd like to change the main menu font size on Geany.  Long story but I
>>> have two monitors with different DPIs and need the menus and notebook
>>> tabs to be smaller on the larger monitor, because they're huge.
>>>
>>> Using these instructions:
>>>
>>> http://www.geany.org/manual/current/#defining-own-widget-styles-using-gtkrc-2-0
>>>
>>>
>>> I put this in my ~/.gtkrc-2.0 and in the same file in my current theme,
>>> but it didn't work:
>>>
>>>
>>> style "geanyStyle"
>>> {
>>>     font_name="Sans 10"
>>> }
>>>
>>> widget "GeanyToolbarMenu" style "geanyStyle"
>>>
>>> style "geanyStyle2"
>>> {
>>>     font_name="Sans 10"
>>> }
>>> widget "GeanyMenubar" style "geanyStyle2"
>>>
>>>
>>> Not sure why it doesn't work.  :/
>>>
>>
>> A few ideas:
>>
>> 1) Make sure you aren't using a GTK3 build of Geany.
>> 2) Maybe the ~/.gtkrc-2.0 isn't reloaded until you log back in?
>> 3) Try an application-specific gtkrc file (by setting GTK_RC_FILES envvar
>> before running Geany)
>> 4) Try using  'class' instead of 'widget' and use GTK class names like
>> GtkToolbar and GtkMenuItem.
>> 5) Make sure you aren't using a bad desktop environment that hijacks the
>> menu from Geany using patched GTK/modules to move it into the panel (ex.
>> Unity/GNOME shill).
>> 6) Above, do you want 'GeanyToolbar' instead of 'GeanyToolbarMenu'?
>>
>> That's all I can think of.
>>
>> P.S. I think you can use one style for multiple widget/class.
>>
>> Good luck,
>> Matthew Brush
>>
>
> Can confirm it doesn't work for me either and I tried most of Matthews
> ideas, and yeah its reading the ~/.gtkrc-2.0 file because it whinged
> about a typo.
>
> So unless a GTK expert pronounces here could you raise an issue at
> https://github.com/geany/geany/issues.
>
> Cheers
> Lex
>
>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Matthew Brush-2
On 2017-05-09 05:38 PM, Lex Trotman wrote:
> Mike,
>
> It works if you use wildcard matches appropriately, eg
>
> widget "*.GeanyMenubar*" ...
>

Makes sense why the examples in the manual (presumably) work, both are
top-level widgets. Might be useful if "someone" wanted to change the
example in the manual, or add one on the wiki, to show a non-toplevel
widget being styled.

Regards,
Matthew Brush

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

Re: [Geany-Users] GTK Theming

Mike Miller
In reply to this post by Lex Trotman
Sorry, didn't work for me:


style "geanyStyle"
{
     font_name="Ubuntu 6"
}

widget "GeanyToolbarMenu" style "geanyStyle"

widget "*.GeanyMenubar*" style "geanyStyle"


Even logged out and back in.  It does complain if I put a typo in though.  The
font-size of the document notebook tabs is what I need to reduce most
importantly.  Not sure how to do that either.


On 2017-05-09 17:38, Lex Trotman wrote:
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Matthew Brush-2
On 2017-05-09 06:29 PM, Mike Miller wrote:

> Sorry, didn't work for me:
>
>
> style "geanyStyle"
> {
>     font_name="Ubuntu 6"
> }
>
> widget "GeanyToolbarMenu" style "geanyStyle"
>
> widget "*.GeanyMenubar*" style "geanyStyle"
>
>

Try:

        style "huge-font"
        {
          font_name="Sans 32"
        }
        widget "*GeanyToolbar*" style "huge-font"
        widget "*GeanyMenubar*" style "huge-font"

Regards,
Matthew Brush
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Lex Trotman
On 10 May 2017 at 11:33, Matthew Brush <[hidden email]> wrote:

> On 2017-05-09 06:29 PM, Mike Miller wrote:
>>
>> Sorry, didn't work for me:
>>
>>
>> style "geanyStyle"
>> {
>>     font_name="Ubuntu 6"
>> }
>>
>> widget "GeanyToolbarMenu" style "geanyStyle"
>>
>> widget "*.GeanyMenubar*" style "geanyStyle"
>>
>>
>
> Try:
>
>         style "huge-font"
>         {
>           font_name="Sans 32"
>         }
>         widget "*GeanyToolbar*" style "huge-font"
>         widget "*GeanyMenubar*" style "huge-font"
>
> Regards,
> Matthew Brush
>

And you don't need to log all the way out, just close and re-open Geany will do.

> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Mike Miller
Wow, it finally "took"  thanks all.  :-D

Any idea how to get the Menu Items and Notebook Tabs the same size?

Thanks again,


On 2017-05-09 18:35, Lex Trotman wrote:
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Mike Miller
So, are the document notebook tab labels unstyle-able?

Tried:

     class "*GeanyMainWindow*.*GtkNotebook*.*GtkMenuItem*" style "small-font"

-Mike


On 2017-05-09 19:00, Mike Miller wrote:
> Any idea how to get the Menu Items and Notebook Tabs the same size?
>
> Thanks again,
>
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] GTK Theming

Lex Trotman
On 11 May 2017 at 06:19, Mike Miller <[hidden email]> wrote:
> So, are the document notebook tab labels unstyle-able?
>
> Tried:
>
>     class "*GeanyMainWindow*.*GtkNotebook*.*GtkMenuItem*" style "small-font"

This is the line in the GTK2 version of my theme

widget_class "*<GtkNotebook>.<GtkLabel>"
style "notebook_tab_label"

Might be a place to start, but I guess it applies to all applications
as provided so you may need to limit it to Geany,

Cheers
Lex

>
> -Mike
>
>
> On 2017-05-09 19:00, Mike Miller wrote:
>>
>> Any idea how to get the Menu Items and Notebook Tabs the same size?
>>
>> Thanks again,
>>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Loading...