From 5a400ab7388026a4b6fdf2762d67b6adee84e64e Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 17 Nov 2021 11:34:40 -0800 Subject: [PATCH] Change highlight region The ListView style was using "Stretch" for TextBoxes in the code list, which caused the background of the entire address / label / operand field to be drawn in the highlight color, rather than just the area covered by the text. This is fine for address and label, but it just felt weird for the operand field because that tends to be very wide (to accommodate strings, bulk hex data, etc). There doesn't seem to be a way to specify HorizontalContentAlignment per-column in WPF. (Note this is different from HorizontalAlignment, which *is* is a per-column property.) This changes the style to use HorizontalContentAlignment=Left, so the highlight just covers the text. The only time this causes a functional change is when you highlight an operand for a line that doesn't have a label, because instead of highlighting an empty rectangle you now see nothing at all. (The address field is still highlighted though.) --- SourceGen/WpfGui/CodeListItemStyle.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceGen/WpfGui/CodeListItemStyle.xaml b/SourceGen/WpfGui/CodeListItemStyle.xaml index 9b32fd2..26ea650 100644 --- a/SourceGen/WpfGui/CodeListItemStyle.xaml +++ b/SourceGen/WpfGui/CodeListItemStyle.xaml @@ -329,7 +329,7 @@ See also https://github.com/fadden/DisasmUiTest - +