Add diff options as icon buttons#108
Conversation
Shows tabs and spaces in diff view if setting is enabled
Add option in settings->code to select between different whitespace and line ending display methods
Add buttons to the right above the diff pane that allows user to select diff view options. All icons are MIT Licensed according to: https://www.svgrepo.com/svg/361077/clear-all https://www.svgrepo.com/svg/361075/circle-slash https://www.svgrepo.com/svg/361072/circle-large-filled https://www.svgrepo.com/svg/361073/circle-large-outline https://www.svgrepo.com/svg/361403/whitespace https://www.svgrepo.com/svg/361405/word-wrap
|
License update: I found the proper reference repo for the icons: License: While the license for the code in the repo is MIT, the icons are under The license is Creative Commons Attribution 4.0 International. Not great. Not terrible, I guess. |
|
Super neat!! I've wanted to do this for a long time, this'll be sure to make people happy. It looks well polished from what I can see. Awesome! I'll cook up some SVG icons by hand so we don't have to worry about licensing. Please, can you convert your identifiers to camelCase for consistency with the rest of the code? (The only place with snake_case is porcelain.py because it's an extension to pygit2; the rest of the code more or less follows Qt's naming conventions.) I will review the rest of your code in detail soon. Thank you for your hard work! |
f89f357 to
a991b77
Compare
a991b77 to
94dd588
Compare
|
Fixed name case, also added a simple test for the formatting marks button |
Overview
Adds toolbar controls to the right side of the diff file header for common diff display options, with matching entries in Preferences -> Code.
Toolbar
Preferences
New settings under Code:
(Note: Word wrap was already in Preferences, no change to this)
Comparison method
Controls how
git diffis run when loading a patch for the diff view. Options map to Git’s built-in flags:--ignore-cr-at-eol--ignore-cr-at-eol,--ignore-space-change--ignore-cr-at-eol,--ignore-all-spaceNote: Comparison method affects how patches are displayed on-screen only. This does not affect exporting patches, reverting files, etc. This still uses the precise methods.
Changing the comparison method reloads the current patch (re-runs
git diff). Word wrap and formatting marks apply immediately without reloading.Icons
Notes about icons I have used:
All icons are MIT Licensed according to these pages:Update: See comments below.
https://www.svgrepo.com/svg/361077/clear-all
https://www.svgrepo.com/svg/361075/circle-slash
https://www.svgrepo.com/svg/361072/circle-large-filled
https://www.svgrepo.com/svg/361073/circle-large-outline
https://www.svgrepo.com/svg/361403/whitespace
https://www.svgrepo.com/svg/361405/word-wrap