2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Default background changed to green, "video file" -> "video" in lang.

This commit is contained in:
John Preston
2016-11-07 18:24:28 +03:00
parent dd9bd43331
commit fac8e48381
34 changed files with 251 additions and 227 deletions

View File

@@ -73,15 +73,14 @@ BackgroundBox::Inner::Inner(QWidget *parent) : TWidget(parent)
void BackgroundBox::Inner::gotWallpapers(const MTPVector<MTPWallPaper> &result) {
App::WallPapers wallpapers;
auto oldBackground = ImagePtr(qsl(":/gui/art/bg_old.png"));
wallpapers.push_back(App::WallPaper(Window::Theme::kOldBackground, oldBackground, oldBackground));
const auto &v(result.c_vector().v);
for (int i = 0, l = v.size(); i < l; ++i) {
const auto &w(v.at(i));
auto oldBackground = ImagePtr(qsl(":/gui/art/bg_initial.png"));
wallpapers.push_back(App::WallPaper(Window::Theme::kInitialBackground, oldBackground, oldBackground));
auto &v = result.c_vector().v;
for_const (auto &w, v) {
switch (w.type()) {
case mtpc_wallPaper: {
const auto &d(w.c_wallPaper());
const auto &sizes(d.vsizes.c_vector().v);
auto &d = w.c_wallPaper();
auto &sizes = d.vsizes.c_vector().v;
const MTPPhotoSize *thumb = 0, *full = 0;
int32 thumbLevel = -1, fullLevel = -1;
for (QVector<MTPPhotoSize>::const_iterator j = sizes.cbegin(), e = sizes.cend(); j != e; ++j) {
@@ -89,14 +88,14 @@ void BackgroundBox::Inner::gotWallpapers(const MTPVector<MTPWallPaper> &result)
int32 w = 0, h = 0;
switch (j->type()) {
case mtpc_photoSize: {
const auto &s(j->c_photoSize().vtype.c_string().v);
auto &s = j->c_photoSize().vtype.c_string().v;
if (s.size()) size = s[0];
w = j->c_photoSize().vw.v;
h = j->c_photoSize().vh.v;
} break;
case mtpc_photoCachedSize: {
const auto &s(j->c_photoCachedSize().vtype.c_string().v);
auto &s = j->c_photoCachedSize().vtype.c_string().v;
if (s.size()) size = s[0];
w = j->c_photoCachedSize().vw.v;
h = j->c_photoCachedSize().vh.v;
@@ -120,7 +119,7 @@ void BackgroundBox::Inner::gotWallpapers(const MTPVector<MTPWallPaper> &result)
} break;
case mtpc_wallPaperSolid: {
const auto &d(w.c_wallPaperSolid());
auto &d = w.c_wallPaperSolid();
} break;
}
}

View File

@@ -166,13 +166,13 @@ contactsPhotoCheckbox: RoundImageCheckbox {
imageRadius: 21px;
imageSmallRadius: 18px;
selectWidth: 2px;
selectFg: windowActiveFill;
selectFg: windowActiveBg;
selectDuration: 150;
checkBorder: windowBg;
checkBg: windowActiveFill;
checkBg: windowActiveBg;
checkRadius: 10px;
checkSmallRadius: 3px;
checkIcon: icon {{ "default_checkbox_check", windowBg, point(3px, 6px) }};
checkIcon: icon {{ "default_checkbox_check", windowActiveFg, point(3px, 6px) }};
}
contactsPhotoDisabledCheckFg: #bbbbbb;
contactsNameCheckedFg: #2b88b8;

View File

@@ -356,7 +356,7 @@ void ContactsBox::onFilterUpdate(const QString &filter) {
void ContactsBox::addPeerToMultiSelect(PeerData *peer, bool skipAnimation) {
using AddItemWay = Ui::MultiSelect::AddItemWay;
auto addItemWay = skipAnimation ? AddItemWay::SkipAnimation : AddItemWay::Default;
_select->entity()->addItem(peer->id, peer->shortName(), st::windowActiveFill, PaintUserpicCallback(peer), addItemWay);
_select->entity()->addItem(peer->id, peer->shortName(), st::activeButtonBg, PaintUserpicCallback(peer), addItemWay);
}
void ContactsBox::onPeerSelectedChanged(PeerData *peer, bool checked) {

View File

@@ -236,7 +236,7 @@ void ShareBox::onFilterUpdate(const QString &query) {
void ShareBox::addPeerToMultiSelect(PeerData *peer, bool skipAnimation) {
using AddItemWay = Ui::MultiSelect::AddItemWay;
auto addItemWay = skipAnimation ? AddItemWay::SkipAnimation : AddItemWay::Default;
_select->addItem(peer->id, peer->shortName(), st::windowActiveFill, PaintUserpicCallback(peer), addItemWay);
_select->addItem(peer->id, peer->shortName(), st::activeButtonBg, PaintUserpicCallback(peer), addItemWay);
}
void ShareBox::onPeerSelectedChanged(PeerData *peer, bool checked) {