File tree Expand file tree Collapse file tree 3 files changed +26
-20
lines changed
Expand file tree Collapse file tree 3 files changed +26
-20
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+
4+ using System . Text ;
5+ using System . Windows ;
6+ using System . Windows . Media ;
7+
8+ namespace JitExplorer . Component
9+ {
10+ public static class ThinBorder
11+ {
12+ public static void SetThinBorder ( object sender , EventArgs e )
13+ {
14+ var s = ( Window ) sender ;
15+ Matrix m = PresentationSource . FromVisual ( s ) . CompositionTarget . TransformToDevice ;
16+ double dpiFactor = 1 / m . M11 ;
17+ s . BorderThickness = new Thickness ( dpiFactor ) ;
18+ }
19+ }
20+ }
Original file line number Diff line number Diff line change 55using ICSharpCode . AvalonEdit . Highlighting ;
66using ICSharpCode . AvalonEdit . Highlighting . Xshd ;
77using JitExplorer . Completion ;
8+ using JitExplorer . Component ;
89using JitExplorer . Controls ;
910using JitExplorer . Engine ;
1011using JitExplorer . Engine . Compile ;
@@ -73,7 +74,7 @@ public static void Execute()
7374
7475 this . AssemblerView . MouseDoubleClick += AssemblerView_MouseDoubleClick ;
7576
76- this . Loaded += a_Loaded ;
77+ this . Loaded += ThinBorder . SetThinBorder ;
7778
7879 // in the constructor:
7980 this . CodeEditor . TextArea . TextEntering += textEditor_TextArea_TextEntering ;
@@ -99,13 +100,7 @@ public static void Execute()
99100 this . AsmTab . CloseButtonEnabled = true ;
100101 }
101102
102- void a_Loaded ( object sender , EventArgs e )
103- {
104- var s = ( Window ) sender ;
105- Matrix m = PresentationSource . FromVisual ( s ) . CompositionTarget . TransformToDevice ;
106- double dpiFactor = 1 / m . M11 ;
107- this . BorderThickness = new Thickness ( dpiFactor ) ;
108- }
103+
109104
110105 // Scroll to line
111106 private void AssemblerView_MouseDoubleClick ( object sender , MouseButtonEventArgs e )
Original file line number Diff line number Diff line change 1- using MahApps . Metro . Controls ;
1+ using JitExplorer . Component ;
2+ using MahApps . Metro . Controls ;
23using System ;
34using System . Collections . Generic ;
45using System . Text ;
@@ -22,17 +23,7 @@ public partial class Splash : MetroWindow
2223 public Splash ( )
2324 {
2425 InitializeComponent ( ) ;
25- this . Loaded += a_Loaded ;
26- }
27-
28- void a_Loaded ( object sender , EventArgs e )
29- {
30- var s = ( Window ) sender ;
31-
32- Matrix m = PresentationSource . FromVisual ( s ) . CompositionTarget . TransformToDevice ;
33- double dpiFactor = 1 / m . M11 ;
34-
35- this . BorderThickness = new Thickness ( dpiFactor ) ;
26+ this . Loaded += ThinBorder . SetThinBorder ;
3627 }
3728 }
3829}
You can’t perform that action at this time.
0 commit comments