2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Closed beta 10020003: All colors moved to palette, some bug fixes.

This commit is contained in:
John Preston
2016-12-21 18:05:58 +03:00
parent b030824ef5
commit eb4d2a38b6
52 changed files with 839 additions and 609 deletions

View File

@@ -212,46 +212,46 @@ int32 documentColorIndex(DocumentData *document, QString &ext) {
const style::color &documentColor(int32 colorIndex) {
static const style::color *colors[] = {
&st::msgFileBlueColor,
&st::msgFileGreenColor,
&st::msgFileRedColor,
&st::msgFileYellowColor
&st::msgFile1Bg,
&st::msgFile2Bg,
&st::msgFile3Bg,
&st::msgFile4Bg
};
return *colors[colorIndex & 3];
}
const style::color &documentDarkColor(int32 colorIndex) {
static const style::color *colors[] = {
&st::msgFileBlueDark,
&st::msgFileGreenDark,
&st::msgFileRedDark,
&st::msgFileYellowDark
&st::msgFile1BgDark,
&st::msgFile2BgDark,
&st::msgFile3BgDark,
&st::msgFile4BgDark
};
return *colors[colorIndex & 3];
}
const style::color &documentOverColor(int32 colorIndex) {
static const style::color *colors[] = {
&st::msgFileBlueOver,
&st::msgFileGreenOver,
&st::msgFileRedOver,
&st::msgFileYellowOver
&st::msgFile1BgOver,
&st::msgFile2BgOver,
&st::msgFile3BgOver,
&st::msgFile4BgOver
};
return *colors[colorIndex & 3];
}
const style::color &documentSelectedColor(int32 colorIndex) {
static const style::color *colors[] = {
&st::msgFileBlueSelected,
&st::msgFileGreenSelected,
&st::msgFileRedSelected,
&st::msgFileYellowSelected
&st::msgFile1BgSelected,
&st::msgFile2BgSelected,
&st::msgFile3BgSelected,
&st::msgFile4BgSelected
};
return *colors[colorIndex & 3];
}
RoundCorners documentCorners(int32 colorIndex) {
return RoundCorners(DocBlueCorners + (colorIndex & 3));
return RoundCorners(Doc1Corners + (colorIndex & 3));
}
bool documentIsValidMediaFile(const QString &filepath) {