mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Fixes #1206. NetDriver now print the selected text. Attribute struct now create a valid Value for the current driver. Insert key is detected by NetDriver. (#1207)
This commit is contained in:
@@ -969,6 +969,9 @@ namespace Terminal.Gui {
|
||||
case '1':
|
||||
key = ConsoleKey.F10;
|
||||
break;
|
||||
case '2':
|
||||
key = ConsoleKey.Insert;
|
||||
break;
|
||||
case '3':
|
||||
if (length == 5) {
|
||||
key = ConsoleKey.F11;
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Terminal.Gui {
|
||||
/// <param name="background">Background</param>
|
||||
public Attribute (Color foreground = new Color (), Color background = new Color ())
|
||||
{
|
||||
Value = (int)foreground | ((int)background << 4);
|
||||
Value = Make (foreground, background).Value;
|
||||
Foreground = foreground;
|
||||
Background = background;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace Terminal.Gui {
|
||||
var rune = text [idx];
|
||||
var cols = Rune.ColumnWidth (rune);
|
||||
if (idx == point && HasFocus && !Used && length == 0 && !ReadOnly) {
|
||||
Driver.SetAttribute (Colors.Menu.HotFocus);
|
||||
Driver.SetAttribute (selColor);
|
||||
} else if (ReadOnly) {
|
||||
Driver.SetAttribute (idx >= start && length > 0 && idx < start + length ? selColor : roc);
|
||||
} else if (!HasFocus) {
|
||||
|
||||
Reference in New Issue
Block a user