Commit graph

45 commits

Author SHA1 Message Date
GadflyFang
92065dee12
fix: Ensure each ImageView instance calculates its own aspect ratio (#929)
* fix: Ensure each ImageView instance calculates its own aspect ratio

- Modified ArrangeOverride methods in ImageView class to independently calculate and apply the aspect ratio based on the instance's image.

Signed-off-by: Gadfly <gadfly@gadfly.vip>

* fix: Make IgnoredWhitespace toggle button visible based on IsTextDiff

---------

Signed-off-by: Gadfly <gadfly@gadfly.vip>
2025-02-06 09:49:45 +08:00
wl2776
6e5626f267
fix: several typos in source code (#895) 2025-01-13 10:11:28 +08:00
leo
26ebd5ae7e
feature: add option to only highlight current branch in commit graph (#848)
- add a toggle button to only highlight current branch in commit graph
- re-order buttons in histories toolbar
- remove unused icons and styles
2025-01-06 14:59:27 +08:00
leo
723263d099
fix: wrong binding modes
Signed-off-by: leo <longshuang@msn.cn>
2024-12-08 21:47:20 +08:00
leo
15d3ad355d
code_review: PR #703
* change the name of this feature to `Enable Block-Navigation`
* change the icon of the toggle button used to enable this feature
* use a new class `BlockNavigation` to hold all the data about this feature
* create `BlockNavigation` data only when it is enabled

Signed-off-by: leo <longshuang@msn.cn>
2024-12-08 21:02:30 +08:00
Göran W
655d71b0bc
Add navigation and highlighting of change-blocks in Text Diff (#616, #717) (#703)
* Corrected misspelled local variable nextHigh(t)light

* Implemented change-block navigation

* Modified behavior of the Prev/Next Change buttons in DiffView toolbar.
* Well-defined change-blocks are pre-calculated and can be navigated between.
* Current change-block is highlighted in the Diff panel(s).
* Prev/next at start/end of range (re-)scrolls to first/last change-block
(I.e when unset, or already at first/last change-block, or at the only one.)
* Current change-block is unset in RefreshContent().

* Added safeguards for edge cases

* Added indicator of current/total change-blocks in DiffView toolbar

* Added new Icon and String (en-US) for Highlighted Diff Navigation

* Added Preference and ToggleButton for diff navigation style
2024-12-08 17:50:33 +08:00
leo
134c71064e
feature: add buttons to go to prev/next change in text diff view (#616)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-16 15:17:29 +08:00
leo
6209326fe0
code_review: PR #652
* update localization for zh_CN and zh_TW
* change the icon for `Icons.Lines.All`
* reorder diff view toolbar buttons
* move private methods after protected

Signed-off-by: leo <longshuang@msn.cn>
2024-11-04 16:49:15 +08:00
Göran W
1a8acbf934
feature: diff - toggle show all lines (#615) (#652)
* Renamed 1 of 2 SyncScrollOffset props, for clarity

The property "SyncScrollOffset" in TextDiff is distinct from the one with the same name in TwoSideTextDiff. These two properties are used in separate (though slightly related) ways and are not really connected.

The one in TwoSideTextDiff is mainly used to keep the scroll-pos of the two SingleSideTextDiffPresenter views in sync (aligned), while the one in TextDiff is used only to preserve/reset the scroll-pos in the single CombinedTextDiffPresenter view when (re)loading Diff Content (so not really syncing anything).

To clarify this and to make the two properties more distinguishable, I renamed the one in TextDiff to simply "ScrollOffset".

* Added icon and string for "Show All Lines"

New StreamGeometry "Icons.Lines.All" using SVG path from "text_line_spacing_regular" at https://avaloniaui.github.io/icons.html.
New String "Text.Diff.VisualLines.All" for en_US locale (no translations yet).

* Implemented new TextDiff feature "Show All Lines" (toggle)

* Added new ToggleButton in DiffView toolbar, visible when IsTextDiff, disabling the buttons "Increase/Decrease Number of Visible Lines" when on.

* Added new Preference property "UseFullTextDiff".

* Added StyledProperty "UseFullTextDiffProperty" in TextDiffView, with a DataTemplate binding to the corresponding preference property.

* When changed, UseFullTextDiffProperty is handled identically as UseSideBySideDiffProperty (via new helper method RefreshContent(), for unification with OnDataContextChanged()).

* Added new method DiffContext.ToggleFullTextDiff() for changing the preference property and reloading the diff content.

* Implemented the new feature by overriding the "unified" (number of context lines) for Commands.Diff() with a very high number.

NOTE: The number used (~1 billion) is supposed to be the highest one working on Mac, according to this forum comment: https://stackoverflow.com/questions/28727424/for-git-diff-is-there-a-uinfinity-option-to-show-the-whole-file#comment135202820_28846576
2024-11-04 16:32:51 +08:00
leo
d2a005c532
feature: add a button in diff view to ignore all whitespace changes (--ignore-all-space) 2024-09-30 11:34:09 +08:00
leo
8f7567a060
feature: do NOT save visual diff context lines 2024-08-25 11:33:38 +08:00
leo
34a598d421
feature: add commit web links (#357) 2024-08-13 17:15:17 +08:00
leo
327b8033b6
rename: rename monospace style to primary 2024-07-29 20:48:04 +08:00
leo
15e7df6085
ux: disable WordWrap in side-by-side diff because it may lead to alignment issue between two sides 2024-07-04 14:12:39 +08:00
leo
4fa388501a
ux: add a new color Color.BadgeFG for text in badge 2024-06-29 10:47:09 +08:00
leo
faabfd6b80
enhance: save last visual line numbers in diff view (#207) 2024-06-25 18:15:31 +08:00
leo
8e88df92b3
feature: add two view mode for image diff - side-by-side and blend 2024-06-21 17:48:19 +08:00
leo
fec2b402e0
code_review: PR #187
* replace icon with common whitespace icon in other editors
* button tooltip translations
* rename `_showHiddenSymbols` to `_showHiddenSymbolsInDiffView` to make its usage clear
* change the order of this button
2024-06-19 18:15:32 +08:00
Giuseppe Lippolis
9c7ac5b067 feature: Allows you to show space and tab symbols in DiffView 2024-06-19 11:33:34 +02:00
leo
a168b05ac6
ux: re-design submodule preview in revision files 2024-06-19 14:24:49 +08:00
leo
68061f82b1
refactor: rewrite TextDiffView 2024-06-12 21:12:45 +08:00
leo
c3cbb6d895 fix: submodule diff missing commit message 2024-06-08 21:13:59 +08:00
leo
cf02c890bf
ux: re-design the image diff view 2024-06-06 11:09:28 +08:00
leo
8b1f28ac95
enhance: show file size change in image diff 2024-06-06 10:36:17 +08:00
leo
54ef9c0bf7
refactor: use bindings instead of sync manually 2024-06-06 10:01:14 +08:00
leo
d1eb9e15ef ux: use TextTrimming="CharacterEllipsis" for diff view title 2024-06-04 20:34:18 +08:00
leo
802b429cc8 enhance: supports word wrap in text diff view 2024-06-04 20:26:47 +08:00
leo
fa3a3b2dad refactor: code cleanup 2024-05-30 15:13:59 +08:00
leo
69f9dceece feature: new way to display changes of submodules 2024-05-29 12:50:26 +08:00
leo
1040bbe4d2 feature: add buttons to increase/decrease visible lines in text diff view (#145) 2024-05-27 10:29:15 +08:00
leo
ab26bb83e9 refactor: re-design toolbar of Views.DiffView 2024-04-14 12:27:09 +08:00
Gadfly
54c9552985
refactor: remove duplicate ObjectConverters, remove unused using 2024-04-13 18:54:46 +08:00
Gadfly
f4e1e0fb6b
fix: use TextTrimming alternative PathConverters 2024-04-13 02:05:26 +08:00
Gadfly
f7dd856e49
fix: enhance diff view by truncating long file paths with ellipsis and adding tooltips for full path display 2024-04-13 01:34:08 +08:00
Gadfly
83728c1a5f
fix: change file mode status postion to right 2024-04-12 21:58:54 +08:00
Gadfly
a249eed1ac
feat: show git file mode change if exist 2024-04-12 21:38:36 +08:00
leo
eea3d2c6c0 feature: enable to use external merge tool for all type of files (#53) 2024-04-03 09:43:17 +08:00
leo
96d4150d26 project: reorganize the structure of the project.
* remove dotnet-tool.json because the project does not rely on any dotnet tools.
* remove Directory.Build.props because the solution has only one project.
* move src/SourceGit to src. It's not needed to put all sources into a subfolder of src since there's only one project.
2024-04-02 20:00:33 +08:00
Enner Pérez
a1a14f8858 Project Location 2024-03-20 02:38:28 -05:00
leo
f175f5abc1 optimize: use combined diff view as default. 2024-03-20 13:08:01 +08:00
leo
59b7fd8c61 optimize: better supports for LFS object 2024-03-07 17:04:57 +08:00
leo
f834af10a2 refactor: change the way loading custom fonts 2024-03-05 16:02:47 +08:00
leo
cfe680ffd5 fix<DiffViewer>: wrong TextDiffView mode indicator icon 2024-02-28 18:42:58 +08:00
leo
c73c5372d2 style<*>: use mono font for all contents 2024-02-18 10:41:41 +08:00
leo
2a62596999 refactor<*>: rewrite all with AvaloniaUI 2024-02-06 15:08:37 +08:00