settings: Add Piece highlight color setting
Default value is Red.
This commit is contained in:
parent
c37bd7cc74
commit
795a3f3271
|
@ -66,6 +66,7 @@ class Config {
|
|||
static int boardBackgroundColor = AppTheme.boardBackgroundColor.value;
|
||||
static int whitePieceColor = AppTheme.whitePieceColor.value;
|
||||
static int blackPieceColor = AppTheme.blackPieceColor.value;
|
||||
static int pieceHighlightColor = AppTheme.pieceHighlightColor.value;
|
||||
static int messageColor = AppTheme.messageColor.value;
|
||||
static int drawerColor = AppTheme.drawerColor.value;
|
||||
static int drawerBackgroundColor = AppTheme.drawerBackgroundColor.value;
|
||||
|
@ -150,6 +151,8 @@ class Config {
|
|||
settings['WhitePieceColor'] ?? AppTheme.whitePieceColor.value;
|
||||
Config.blackPieceColor =
|
||||
settings['BlackPieceColor'] ?? AppTheme.blackPieceColor.value;
|
||||
Config.pieceHighlightColor =
|
||||
settings['PieceHighlightColor'] ?? AppTheme.pieceHighlightColor.value;
|
||||
Config.messageColor =
|
||||
settings['MessageColor'] ?? AppTheme.messageColor.value;
|
||||
Config.drawerColor = settings['DrawerColor'] ?? AppTheme.drawerColor.value;
|
||||
|
@ -247,6 +250,7 @@ class Config {
|
|||
settings['BoardBackgroundColor'] = Config.boardBackgroundColor;
|
||||
settings['WhitePieceColor'] = Config.whitePieceColor;
|
||||
settings['BlackPieceColor'] = Config.blackPieceColor;
|
||||
settings['PieceHighlightColor'] = Config.pieceHighlightColor;
|
||||
settings['MessageColor'] = Config.messageColor;
|
||||
settings['DrawerColor'] = Config.drawerColor;
|
||||
settings['DrawerBackgroundColor'] = Config.drawerBackgroundColor;
|
||||
|
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "يرسم",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "لون تسليط الضوء على قطعة",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Рисувам",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Цвят за подчертаване на парче",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "আঁকা",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "পিস হাইলাইট কালার",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Kreslit",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Barva zvýraznění kusu",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Tegne",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Stykke fremhæve farve",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Zeichnen",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Farbe des Stein-Highlights",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Zeichnen",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Farbe des Stein-Highlights",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Σχεδιάζω",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Χρώμα φωτισμού κομμάτι",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Draw",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Piece highlight color",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Dibujar",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Color de resaltado de la pieza",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Joonista",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Tükk esiletõstetud värv",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "قرعه کشی",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "رنگ برجسته آجیل",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Tasapeli",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Kappaleen korostusväri",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Dessiner",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Couleur de surbrillance de la pièce",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "દોરો",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "પીસ હાઇલાઇટ કલર",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "खींचना",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "टुकड़ा हाइलाइट रंग",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "crtati",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Boja isticanja komada",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Húz",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "A lemez kiemelésének színe",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Seri",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Warna sorot potongan",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Disegno",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Colore evidenziazione pezzo",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "描く",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "チェッカーのハイライト色",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "ಡ್ರಾ",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "ಪೀಸ್ ಹೈಲೈಟ್ ಬಣ್ಣ",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "그리다",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "체크 하이라이트 색상",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Lygiosios",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Kūrinio paryškinimo spalva",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Zīmēt",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Gabalu izceltā krāsa",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Нацртај",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Боја за истакнување на парче",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Lukis",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Warna kemuncak kepingan",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Tekenen",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Stuk markeerkleur",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Tegne",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Farge på høydepunktet",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Remis",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Kolor podświetlenia kawałka",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Empate",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Cor de destaque da peça",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "A desena",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Culoarea de evidențiere a piesei",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Рисовать",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Цвет выделения детали",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Nakreslite",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Farba zvýraznenia kusu",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Žrebanje",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Barva poudarka kosa",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Barazim",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Ngjyra e theksimit të copës",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Нерешено",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Боја за истакнување на парче",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Dra",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Del markera färg",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "గీయండి",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "పీస్ హైలైట్ రంగు",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "วาด",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "ชิ้นไฮไลท์สี",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Çizmek",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Parça vurgu rengi",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Chizma",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Rangni ajratib ko'rsatish",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Vẽ",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "Màu nổi bật mảnh",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "和棋",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "棋子高亮颜色",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -1192,5 +1192,9 @@
|
|||
"draw": "Draw",
|
||||
"@draw": {
|
||||
"description": "Draw"
|
||||
},
|
||||
"pieceHighlightColor": "棋子高亮顏色",
|
||||
"@pieceHighlightColor": {
|
||||
"description": "Piece highlight color"
|
||||
}
|
||||
}
|
|
@ -184,6 +184,7 @@ class PiecesPainter extends PiecesBasePainter {
|
|||
if (focusIndex != invalidIndex) {
|
||||
final int row = focusIndex! ~/ 7, column = focusIndex % 7;
|
||||
|
||||
/*
|
||||
focusPositionColor = Color.fromARGB(
|
||||
(Color(Config.whitePieceColor).alpha +
|
||||
Color(Config.blackPieceColor).alpha) ~/
|
||||
|
@ -198,6 +199,9 @@ class PiecesPainter extends PiecesBasePainter {
|
|||
Color(Config.blackPieceColor).blue) ~/
|
||||
2)
|
||||
.withOpacity(0.5);
|
||||
*/
|
||||
|
||||
focusPositionColor = Color(Config.pieceHighlightColor);
|
||||
|
||||
paint.color = focusPositionColor;
|
||||
paint.style = PaintingStyle.stroke;
|
||||
|
|
|
@ -26,10 +26,11 @@ class AppTheme {
|
|||
static var mainToolbarBackgroundColor = UIColors.burlyWood;
|
||||
static var navigationToolbarBackgroundColor = UIColors.burlyWood;
|
||||
static var boardLineColor = Color(0x996D000D);
|
||||
static var blackPieceColor = Color.fromARGB(0xFF, 0x00, 0x00, 0x00);
|
||||
static var blackPieceBorderColor = Color.fromARGB(0xFF, 0x22, 0x22, 0x22);
|
||||
static var whitePieceColor = Color.fromARGB(0xFF, 0xFF, 0xFF, 0xFF);
|
||||
static var whitePieceBorderColor = Color.fromARGB(0xFF, 0x66, 0x00, 0x00);
|
||||
static var blackPieceColor = Color.fromARGB(0xFF, 0x00, 0x00, 0x00);
|
||||
static var blackPieceBorderColor = Color.fromARGB(0xFF, 0x22, 0x22, 0x22);
|
||||
static var pieceHighlightColor = Colors.red;
|
||||
static var messageColor = Colors.white;
|
||||
static var banColor = Color.fromARGB(0xFF, 0xFF, 0x00, 0x00); // unused
|
||||
static var banBorderColor = Color.fromARGB(0x80, 0xFF, 0x00, 0x00); // unused
|
||||
|
|
|
@ -58,6 +58,7 @@ class _PersonalizationSettingsPageState
|
|||
S.of(context).lineColor: Config.boardLineColor,
|
||||
S.of(context).whitePieceColor: Config.whitePieceColor,
|
||||
S.of(context).blackPieceColor: Config.blackPieceColor,
|
||||
S.of(context).pieceHighlightColor: Config.pieceHighlightColor,
|
||||
S.of(context).messageColor: Config.messageColor,
|
||||
S.of(context).drawerColor: Config.drawerColor,
|
||||
S.of(context).drawerBackgroundColor: Config.drawerBackgroundColor,
|
||||
|
@ -109,6 +110,8 @@ class _PersonalizationSettingsPageState
|
|||
Config.whitePieceColor = pickerColor.value;
|
||||
} else if (colorString == S.of(context).blackPieceColor) {
|
||||
Config.blackPieceColor = pickerColor.value;
|
||||
} else if (colorString == S.of(context).pieceHighlightColor) {
|
||||
Config.pieceHighlightColor = pickerColor.value;
|
||||
} else if (colorString == S.of(context).messageColor) {
|
||||
Config.messageColor = pickerColor.value;
|
||||
} else if (colorString == S.of(context).drawerColor) {
|
||||
|
@ -517,6 +520,13 @@ class _PersonalizationSettingsPageState
|
|||
onTap: () => showColorDialog(S.of(context).blackPieceColor),
|
||||
),
|
||||
ListItemDivider(),
|
||||
SettingsListTile(
|
||||
context: context,
|
||||
titleString: S.of(context).pieceHighlightColor,
|
||||
trailingColor: Config.pieceHighlightColor,
|
||||
onTap: () => showColorDialog(S.of(context).pieceHighlightColor),
|
||||
),
|
||||
ListItemDivider(),
|
||||
SettingsListTile(
|
||||
context: context,
|
||||
titleString: S.of(context).messageColor,
|
||||
|
|
Loading…
Reference in New Issue