Skip to content

gitk: small quality of life improvements for themed Tk #1909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sommer
Copy link

@sommer sommer commented Apr 27, 2025

These three closely related patches build on https://lore.kernel.org/git/[email protected] to:

  1. also allow changing text wrapping preferences for users that do not use themed Tk (that is, users that have turned the "use themed widgets" preference off);
  2. no longer change the background color when using themed Tk (the default) as - at least on the platforms I tried - most widgets and the main window do not change their background color anyhow, whereas some widgets do, leading to a messy looking UI where different widgets seemingly assume different background colors; and
  3. use the now-available uicolor preference to draw a "sash" (grab handle) between the many panes of the main window when using themed Tk; on the platforms I tried, themed Tk was both the default and it was not rendering any sash, thus requiring users to guess where to click to resize window panes. Manually setting uicolor to a platform-dependent color (see https://www.tcl-lang.org/man/tcl/TkCmd/colors.htm#M4) in the config file works to get sashes that automatically adapt to light mode and dark mode.

cc: Johannes Sixt [email protected]

sommer added 3 commits April 27, 2025 22:02
Use a widget factory that works for both plain Tk and themed Tk.

Signed-off-by: Christoph Sommer <[email protected]>
Ignore the uicolor preference not just for win32, but also whenever
themed Tk is used. On themed Tk it was frequently only changing the
background of only a few select widgets rather than everything -
and the default uicolor was frequently not the background color that
themed Tk used for its widgets, resulting in a messy looking UI
(mostly light gray, with random widgets surrounded by darker gray borders)

Signed-off-by: Christoph Sommer <[email protected]>
Add a custom sash (grab/resize handle) where the window is split into
panes when using themed Tk as. Other than native Tk which draws sashes
by default, themed Tk does not, by default, render such handles leaving
users to guess where to click to start resizing window panes. The color
used for drawing these is uicolor, which is not needed on themed Tk,
allowing the user to make these elements as pronounced or as invisible
as desired.

Signed-off-by: Christoph Sommer <[email protected]>
@sommer
Copy link
Author

sommer commented Apr 28, 2025

/preview

Copy link

gitgitgadget bot commented Apr 28, 2025

Preview email sent as [email protected]

@sommer
Copy link
Author

sommer commented Apr 28, 2025

/submit

Copy link

gitgitgadget bot commented Apr 28, 2025

Submitted as [email protected]

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-1909/sommer/master-v1

To fetch this version to local tag pr-1909/sommer/master-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-1909/sommer/master-v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant