lah7 / gtk3-classic

Patches to bring back a traditional experience for GTK+3
Other
338 stars 24 forks source link

Request: Text color in progress bar #58

Open luigifab opened 2 years ago

luigifab commented 2 years ago

What should be patched?

Perhaps for good reasons, GTK has moved the progress text outside the progress bar. (the double text color still works with progress bars in treeviews)

I suggest to add something like: GTK_PROGRESS_TEXT_INSIDE=1. When this environment variable exists:

How? I don't know, I found how to put the text inside the progress bar, and how to add a CSS class to the progress bar. But for the colors... Draft.

Screenshots

Ambiance theme with Ubuntu 11.10 - GTK 3.2: image

Ambiance theme with Ubuntu 13.04 - GTK 3.6: image

Ambiance theme with Ubuntu 13.10 - GTK 3.8: image

My theme with GTK 3.24 (without any GTK changes): image

Commits

The old method, GTK 3.6: gtk_progress_bar_paint_text The new method (not sure), GTK 3.24: gtk_progress_bar_render_text

For progress bar in treeview, the method (not sure), GTK 3.24: gtk_cell_renderer_progress_render

luigifab commented 1 year ago

I tried some ideas (appearance__progress_text.patch).

I think the idea is simple:

For now, the patch doesn't calculate clip position/size correctly...

lah7 commented 1 year ago

You may be interested in the code for this patch that was going to introduce this classic style of progress bar to the MATE shut down / log out dialog:

luigifab commented 1 year ago

Yolo! done for gtk3! horizontal! vertical! ltr! rtl!

image image

for gtk3: automatic width/height without min-width/height from css theme + position of the text, currently text node is added here: progressbar trough progress text, but text is displayed before the progress bar, not on it!

for gtk4: nothing works, the text is displayed under the progress bar, I tried to move it like with gtk3, but the text is not rendered any more...