mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-31 02:08:03 +01:00
removed unused GetColors api
This commit is contained in:
@@ -1241,51 +1241,33 @@ namespace Terminal.Gui {
|
||||
var validClip = IsValidContent (ccol, crow, Clip);
|
||||
|
||||
if (validClip) {
|
||||
if (runeWidth == 0 && ccol > 0) {
|
||||
var r = contents [crow, ccol - 1, 0];
|
||||
var s = new string (new char [] { (char)r, (char)rune });
|
||||
string sn;
|
||||
if (!s.IsNormalized ()) {
|
||||
sn = s.Normalize ();
|
||||
} else {
|
||||
sn = s;
|
||||
}
|
||||
var c = sn [0];
|
||||
contents [crow, ccol - 1, 0] = c;
|
||||
contents [crow, ccol - 1, 1] = currentAttribute;
|
||||
contents [crow, ccol - 1, 2] = 1;
|
||||
if (runeWidth < 2 && ccol > 0
|
||||
&& Rune.ColumnWidth ((char)contents [crow, ccol - 1, 0]) > 1) {
|
||||
|
||||
} else {
|
||||
if (runeWidth < 2 && ccol > 0
|
||||
&& Rune.ColumnWidth ((char)contents [crow, ccol - 1, 0]) > 1) {
|
||||
contents [crow, ccol - 1, 0] = (int)(uint)' ';
|
||||
|
||||
contents [crow, ccol - 1, 0] = (int)(uint)' ';
|
||||
} else if (runeWidth < 2 && ccol <= Clip.Right - 1
|
||||
&& Rune.ColumnWidth ((char)contents [crow, ccol, 0]) > 1) {
|
||||
|
||||
} else if (runeWidth < 2 && ccol <= Clip.Right - 1
|
||||
&& Rune.ColumnWidth ((char)contents [crow, ccol, 0]) > 1) {
|
||||
|
||||
contents [crow, ccol + 1, 0] = (int)(uint)' ';
|
||||
contents [crow, ccol + 1, 2] = 1;
|
||||
|
||||
}
|
||||
if (runeWidth > 1 && ccol == Clip.Right - 1) {
|
||||
contents [crow, ccol, 0] = (int)(uint)' ';
|
||||
} else {
|
||||
contents [crow, ccol, 0] = (int)(uint)rune;
|
||||
}
|
||||
contents [crow, ccol, 1] = currentAttribute;
|
||||
contents [crow, ccol, 2] = 1;
|
||||
contents [crow, ccol + 1, 0] = (int)(uint)' ';
|
||||
contents [crow, ccol + 1, 2] = 1;
|
||||
|
||||
}
|
||||
if (runeWidth > 1 && ccol == Clip.Right - 1) {
|
||||
contents [crow, ccol, 0] = (int)(uint)' ';
|
||||
} else {
|
||||
contents [crow, ccol, 0] = (int)(uint)rune;
|
||||
}
|
||||
contents [crow, ccol, 1] = CurrentAttribute;
|
||||
contents [crow, ccol, 2] = 1;
|
||||
|
||||
dirtyLine [crow] = true;
|
||||
}
|
||||
|
||||
if (runeWidth < 0 || runeWidth > 0) {
|
||||
ccol++;
|
||||
}
|
||||
ccol++;
|
||||
if (runeWidth > 1) {
|
||||
if (validClip && ccol < Clip.Right) {
|
||||
contents [crow, ccol, 1] = currentAttribute;
|
||||
contents [crow, ccol, 1] = CurrentAttribute;
|
||||
contents [crow, ccol, 2] = 0;
|
||||
}
|
||||
ccol++;
|
||||
@@ -1358,12 +1340,14 @@ namespace Terminal.Gui {
|
||||
cols = Console.WindowWidth;
|
||||
rows = Console.WindowHeight;
|
||||
|
||||
CurrentAttribute = MakeColor (Color.White, Color.Black);
|
||||
InitalizeColorSchemes ();
|
||||
|
||||
ResizeScreen ();
|
||||
UpdateOffScreen ();
|
||||
|
||||
StartReportingMouseMoves ();
|
||||
|
||||
CreateColors ();
|
||||
|
||||
Clear ();
|
||||
}
|
||||
@@ -1503,7 +1487,7 @@ namespace Terminal.Gui {
|
||||
outputWidth++;
|
||||
var rune = contents [row, col, 0];
|
||||
char [] spair;
|
||||
if (Rune.DecodeSurrogatePair ((uint)rune, out spair)) {
|
||||
if (Rune.DecodeSurrogatePair((uint) rune, out spair)) {
|
||||
output.Append (spair);
|
||||
} else {
|
||||
output.Append ((char)rune);
|
||||
@@ -1631,10 +1615,10 @@ namespace Terminal.Gui {
|
||||
{
|
||||
}
|
||||
|
||||
Attribute currentAttribute;
|
||||
|
||||
public override void SetAttribute (Attribute c)
|
||||
{
|
||||
currentAttribute = c;
|
||||
base.SetAttribute (c);
|
||||
}
|
||||
|
||||
public ConsoleKeyInfo FromVKPacketToKConsoleKeyInfo (ConsoleKeyInfo consoleKeyInfo)
|
||||
@@ -1954,7 +1938,7 @@ namespace Terminal.Gui {
|
||||
|
||||
public override Attribute GetAttribute ()
|
||||
{
|
||||
return currentAttribute;
|
||||
return CurrentAttribute;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -2017,9 +2001,6 @@ namespace Terminal.Gui {
|
||||
}
|
||||
|
||||
#region Unused
|
||||
public override void SetColors (ConsoleColor foreground, ConsoleColor background)
|
||||
{
|
||||
}
|
||||
|
||||
public override void SetColors (short foregroundColorId, short backgroundColorId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user