dmedvinsky / gsimplecal

Simple and lightweight GTK calendar (BSD license)
http://dmedvinsky.github.io/gsimplecal
Other
197 stars 19 forks source link

Set font #30

Closed lockie closed 6 years ago

lockie commented 6 years ago

Hello! Thanks for the delightful application! I have one minor feature request though. Is there any possibility to change the font used in calendar widget, except tweaking gtk.css (at which I've failed miserably)?

dglava commented 6 years ago

It can be done with a global GTK3 theme override. Add this to your gtk.css file:

calendar {
    font-family: "DejaVu Sans Mono";
}

I think that will change the font for every GTK3 calendar widget, so I don't know how viable that is for you. But it should be a temporary workaround.

lockie commented 6 years ago

Thanks, this snippet did the trick! I'm not using GTK apps with calendars that much, so I guess I'm okay with this workaround.

marciniuk commented 5 years ago

Hi! I have a small question. How do you change the font in "clock_format"? These lines in gtk.css only change the appearance of the top part of the calendar 2018-12-19-191752_1366x768_scrot

venteto commented 4 years ago

I'm also seeking a way to change the font attributes (in my case, the size specifically, as it's tiny on my screen). I tried the gtk.css modification mentioned above, and I agree that it only seems to change the calendar section but not the timezones section.

In the absence of new feature in gsimplecal, does anyone know what css element would work on the timezones section?

dglava commented 4 years ago

The problem is selecting just the labels of gsimplecal. I haven't found a way to do that yet without modifying the source and naming the labels with gtk_widget_set_name().

A hacky solution is: create a new directory with a new GTK config and tell gsimplecal to use that directory as the config directory.

  1. Create a new directory:mkdir ~/.config/gsimplecal-config)
  2. Move your gsimplecal config in there
  3. Copy your GTK3 config in there: cp -r ~/.config/gtk-3.0 ~/.config/gsimplecal-config
  4. Add this gtk.css override snippet label {font-size: 20px }
  5. Start gsimplecal with XDG_CONFIG_HOME=/home/yourname/.config/gsimplecal-config/ gsimplecal