gitk: make color preferences visually more pleasing and better usable - #2194
gitk: make color preferences visually more pleasing and better usable#2194j6t wants to merge 5 commits into
Conversation
|
/submit |
|
Error: git --git-dir=pr-repo.git fetch --no-tags https://github.com/gitgitgadget/git/ -- +refs/notes/gitgitgadget:refs/notes/gitgitgadget +refs/heads/maint:refs/remotes/upstream/maint +refs/heads/seen:refs/remotes/upstream/seen +refs/heads/master:refs/remotes/upstream/master +refs/heads/next:refs/remotes/upstream/next +refs/pull/2194/head:refs/pull/2194/head +refs/pull/2194/merge:refs/pull/2194/merge failed: 128, |
|
Hmm, these patches are sourced directly from j6t/gitk/pull/48, so the edits lack the |
Yes, I think we also need to mirror |
|
@j6t I re-ran the workflow run that wanted to handle your |
|
Error: Unrecognized project |
That's what I feared. There's special logic in GitGitGadget for Git GUI... And none yet for |
|
|
@dscho What if I just rewrite the branch by cherry-picking the commits into the git code? The branch here would be abandoned once I merge my original PR in the gitk repository, but at least I should be able to use Gitgitgadget as the ML gateway. |
|
That would make for a fine stop-gap solution. |
After the user has selected a color in the Preferences dialog, the helper proc prefspage_set_colorswatches is used update the colors shown in the Preferences dialog. Use this proc also after the Preferences dialog is constructed to show the initial colors. This keeps the procedure that gives the UI elements their colors in a single place. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
The color selection elements in the Preferences dialog are set up in a very uniform manner. The code doing that has grown in the past by simply modifying a copy of a paragraph. Extract the varying parts into a list and then operate the repeating parts in a foreach loop. This helps a later change where we want to set up the UI elements in a different way. Change the UI names "markbgsep" and "selbgsep" to drop the "sep", which has obviously been left over by accident when "hunksep" was copied. Change the suffix "but" to "btn", which resonates a bit better when reading the code. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
When the user goes to the color preferences, the eye is automatically drawn to the color samples. However, clicking on the sample with the intent to change it does nothing. Instead, the text label also acts as a button and must be clicked to change the color. Turn the color samples into clickable buttons and the text labels into static text. Use non-themed buttons because their color can be changed by simply specifying the color properties. (Themed buttons would need a lot more elaboration.) Signed-off-by: Johannes Sixt <j6t@kdbg.org>
The labels used to be clickable buttons. These would have looked funny if they carried long texts. For this reason, abbreviations and "nerdy" texts were used to keep them short. Since these labels are now static text, bring them closer to natural language. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
When the user clicks a color preference, a color selection dialog is presented whose title is provided in parts by the caller. The dialog implementation must supply the rest of the title. This is unfriendly for translations. Provide the full title by the caller. Rewrite the texts to be more natural language. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
22c2797 to
1e1bcfa
Compare
I find the user interface to set the color preferences a bit ugly for these reasons:
The color samples are not clickable as one would expect who enters the dialog. Instead, the description is the button that must be clicked.
Since the descriptive texts are different for the preferences, the width of the buttons are different, too.
The descriptions themselves are not always natural language (read: they are nerdy) and use abbreviations.
This series makes the descriptions static text and turns the color samples into the clickable buttons. It also makes the descriptions and dialog titles more natural language.
This is the dialog before the change:


And this is the dialog after the change: