Skip to content

Commit

Permalink
1) fixed right click on linux
Browse files Browse the repository at this point in the history
2) SelectableTextBlock.axaml in gallery textblock
3) default template for SelectableTextBlock.axaml
  • Loading branch information
jinek committed Dec 19, 2024
1 parent ee3e836 commit f299a2a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
FontWeight="Bold"
Background="DarkMagenta"
Foreground="Chartreuse" />
<SelectableTextBlock SelectionStart="17" SelectionEnd="26">
Selectable text: Loreum ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis
</SelectableTextBlock>

<StackPanel Orientation="Vertical"
Margin="0"
Expand Down
12 changes: 6 additions & 6 deletions src/Consolonia.PlatformSupport/CursesConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ private static readonly FlagTranslator<Key, ConsoleKey>
(Curses.Event.Button1Pressed, RawPointerEventType.LeftButtonDown),
(Curses.Event.Button1Clicked, RawPointerEventType.LeftButtonDown),
(Curses.Event.Button1Released, RawPointerEventType.LeftButtonUp),
(Curses.Event.Button2Pressed, RawPointerEventType.RightButtonDown),
(Curses.Event.Button2Clicked, RawPointerEventType.RightButtonDown),
(Curses.Event.Button2Released, RawPointerEventType.RightButtonUp),
(Curses.Event.Button3Pressed, RawPointerEventType.MiddleButtonDown),
(Curses.Event.Button3Clicked, RawPointerEventType.MiddleButtonDown),
(Curses.Event.Button3Released, RawPointerEventType.MiddleButtonUp),
(Curses.Event.Button2Pressed, RawPointerEventType.MiddleButtonDown),
(Curses.Event.Button2Clicked, RawPointerEventType.MiddleButtonDown),
(Curses.Event.Button2Released, RawPointerEventType.MiddleButtonUp),
(Curses.Event.Button3Pressed, RawPointerEventType.RightButtonDown),
(Curses.Event.Button3Clicked, RawPointerEventType.RightButtonDown),
(Curses.Event.Button3Released, RawPointerEventType.RightButtonUp),
(Curses.Event.Button4Pressed, RawPointerEventType.XButton1Down),
(Curses.Event.Button4Clicked, RawPointerEventType.XButton1Down),
(Curses.Event.Button4Released, RawPointerEventType.XButton1Up),
Expand Down
1 change: 1 addition & 0 deletions src/Consolonia.Themes/Templates/Controls/AllControls.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<MergeResourceInclude Source="/Templates/Controls/TextBlock.axaml" />
<MergeResourceInclude Source="/Templates/Controls/SelectableTextBlock.axaml"/>
<MergeResourceInclude Source="/Templates/Controls/Window.axaml" />
<MergeResourceInclude Source="/Templates/Controls/Button.axaml" />
<MergeResourceInclude Source="/Templates/Controls/TextBox.axaml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTheme x:Key="{x:Type SelectableTextBlock}"
TargetType="SelectableTextBlock">
<Setter Property="SelectionBrush" Value="{StaticResource ThemeActionBackgroundBrush}"/>
</ControlTheme>
</ResourceDictionary>

0 comments on commit f299a2a

Please sign in to comment.