Tooltip calendar text overflows
Hi, after fixing my calendar configuration that was broken with version 0.9.18, I configured the year/month toggleable calendar - very useful.
However, the year calendar has some unexpected text overflow which breaks the formatting. This is how it looks on openSUSE Tumbleweed:
This is the configuration that results in the above screenshot:
"clock#date": {
"format": "{:%F %a}",
"smooth-scrolling-threshold": 4,
"tooltip-format": "<span color='#35b9ab'><tt><small>{calendar}</small></tt></span>",
"calendar": {
"mode-mon-col" : 4,
"weeks-pos" : "left",
"on-scroll" : 1,
"on-click-right" : "mode",
"format": {
"months": "<span color='#35b9ab'><b>{}</b></span>",
"weeks": "<span color='#73ba25'><b>{}</b></span>",
"weekdays": "<span color='#21a4df'><b>{}</b></span>",
"today": "<span color='#35b9ab' background='#173f4f'><b>{}</b></span>"
}
},
"actions": {
"on-click-right" : "mode",
"on-scroll-up" : "shift_up",
"on-scroll-down" : "shift_down"
},
"tooltip": true
},
Is there something wrong with the configuration here or the css? Or is there a problem in the calendar with how text is split into a new line?
Try to reduce mode-mon-col or, for test purposes, move clock to the center of waybar just to check
The issue seems to me here with GTK Label Tooltip. I didn't find any API's which can help to increase the tooltip width. I'll create an issue to upstream once I have time .
FYI: Calendar scrolling works for both modes: moth/year.
Upd: @FilippoBonazziSUSE here is new cava module you might be interested in. See an example
Upstream issue raised: GTK Label Tooltip
Thanks for raising the upstream issue.
Upd: @FilippoBonazziSUSE here is new cava module you might be interested in. See an example
How is this related?
I've waybar running on Arch Linux but installed directly from github, no pacman, except dependencies. My calendar window continues misconfigured. Has anyone found how to solve that issue? I am not sure if it has any kind of relationship with the fonts, becouase it doesn't recognize the calendar icon, but all other icons of the other modules. Thanks in advance.
Change the columns to 2 in "mode-mon-col" solves the issue, but it looks very small
Hi, this is still broken, any chance this can be fixed?
Hi @FilippoBonazziSUSE , unfortunately not any news from the gtk upstream GTK3. Label tooltip shifted text
I have had some luck hacking a workaround by specifying the sizing in the pango markup in a very weird way, I set the font-size larger than I want, then set the size as "x-small" in the pango markup. See attached screenshot of 3-month wide example:
Okay, so, this is a very simple hack, but it works pretty well, and doesn't require font sizing shenanigans:
"clock#date": {
"rotate": 0,
"format-alt": "{:%Y/%m/%d}",
"format": "{:%b %d, %Y}",
// To set calendar width, write out the entire length of an entire line in the calendar:
// `10 11 12 13 14 15 16 W00 10 11 12 13 14 15 16 W00 10 11 12 13 14 15 16 W00 10 11 12 13 14 15 16 W00`
// Then replace every character in that line with a space:
// ` `
// Then take that space, and put it before or after (or both) of `{calendar}` with a newline (`\n`) between that empty line and the `{calendar}`.
// For best results, probably both? Then also limit the amount of padding-top and/or padding-bottom in the `tooltip label` css.
// Example: 10 11 12 13 14 15 16 W00 10 11 12 13 14 15 16 W00 10 11 12 13 14 15 16 W00 10 11 12 13 14 15 16 W00
"tooltip-format": "<tt> \n{calendar}</tt>",
"calendar": {
"mode" : "year",
"mode-mon-col" : 4,
"weeks-pos": "right",
"on-scroll" : 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"interval": 1
},
Hi there. there is merge request which should solve an issue. In the same time it created an issue and discussion in Gnome comunity:
In my case the problem was solved by installing ttf-font-awesome-4.tar.gz from AUR
According to the gtk maintainer's mention tooltip for GtkLabel has limitations. So, this MR fixes the issue without any additional actions from the user side. And works well for me l