New logo and option to change icon
|
|
@ -1222,13 +1222,13 @@ if (LINUX AND DESKTOP_APP_USE_PACKAGED)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
configure_file("../lib/xdg/kotatogramdesktop.appdata.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/kotatogramdesktop.appdata.xml" @ONLY)
|
configure_file("../lib/xdg/kotatogramdesktop.appdata.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/kotatogramdesktop.appdata.xml" @ONLY)
|
||||||
install(TARGETS Telegram RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
install(TARGETS Telegram RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||||
install(FILES "Resources/art/icon16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "telegram.png")
|
install(FILES "Resources/art/icon16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "kotatogram.png")
|
||||||
install(FILES "Resources/art/icon32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "telegram.png")
|
install(FILES "Resources/art/icon32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "kotatogram.png")
|
||||||
install(FILES "Resources/art/icon48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "telegram.png")
|
install(FILES "Resources/art/icon48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "kotatogram.png")
|
||||||
install(FILES "Resources/art/icon64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "telegram.png")
|
install(FILES "Resources/art/icon64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "kotatogram.png")
|
||||||
install(FILES "Resources/art/icon128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "telegram.png")
|
install(FILES "Resources/art/icon128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "kotatogram.png")
|
||||||
install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "telegram.png")
|
install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "kotatogram.png")
|
||||||
install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "telegram.png")
|
install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "kotatogram.png")
|
||||||
install(FILES "../lib/xdg/kotatogramdesktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" RENAME "${TDESKTOP_LAUNCHER_BASENAME}.desktop")
|
install(FILES "../lib/xdg/kotatogramdesktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" RENAME "${TDESKTOP_LAUNCHER_BASENAME}.desktop")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kotatogramdesktop.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" RENAME "${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml")
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kotatogramdesktop.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" RENAME "${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 401 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
BIN
Telegram/Resources/art/icon256blue.ico
Normal file
|
After Width: | Height: | Size: 401 KiB |
BIN
Telegram/Resources/art/icon256green.ico
Normal file
|
After Width: | Height: | Size: 401 KiB |
BIN
Telegram/Resources/art/icon256old.ico
Normal file
|
After Width: | Height: | Size: 361 KiB |
BIN
Telegram/Resources/art/icon256orange.ico
Normal file
|
After Width: | Height: | Size: 401 KiB |
BIN
Telegram/Resources/art/icon256red.ico
Normal file
|
After Width: | Height: | Size: 401 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 60 KiB |
BIN
Telegram/Resources/art/icon512_blue@2x.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
Telegram/Resources/art/icon512_green@2x.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
Telegram/Resources/art/icon512_orange@2x.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
Telegram/Resources/art/icon512_red@2x.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
BIN
Telegram/Resources/art/logo_256_blue.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Telegram/Resources/art/logo_256_green.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
BIN
Telegram/Resources/art/logo_256_no_margin_blue.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
Telegram/Resources/art/logo_256_no_margin_green.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Telegram/Resources/art/logo_256_no_margin_old.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
Telegram/Resources/art/logo_256_no_margin_orange.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
Telegram/Resources/art/logo_256_no_margin_red.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Telegram/Resources/art/logo_256_old.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
Telegram/Resources/art/logo_256_orange.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Telegram/Resources/art/logo_256_red.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
Telegram/Resources/icons/intro_kotato_top.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
Telegram/Resources/icons/intro_kotato_top@2x.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
Telegram/Resources/icons/intro_kotato_top@3x.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
Telegram/Resources/icons/intro_kotato_trace.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
Telegram/Resources/icons/intro_kotato_trace@2x.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
Telegram/Resources/icons/intro_kotato_trace@3x.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
Telegram/Resources/icons/settings_kotato_old.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/settings_kotato_old@2x.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
Telegram/Resources/icons/settings_kotato_old@3x.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
|
|
@ -45,7 +45,17 @@
|
||||||
<file alias="art/bg.jpg">../../art/bg.jpg</file>
|
<file alias="art/bg.jpg">../../art/bg.jpg</file>
|
||||||
<file alias="art/bg_initial.jpg">../../art/bg_initial.jpg</file>
|
<file alias="art/bg_initial.jpg">../../art/bg_initial.jpg</file>
|
||||||
<file alias="art/logo_256.png">../../art/logo_256.png</file>
|
<file alias="art/logo_256.png">../../art/logo_256.png</file>
|
||||||
|
<file alias="art/logo_256_blue.png">../../art/logo_256_blue.png</file>
|
||||||
|
<file alias="art/logo_256_green.png">../../art/logo_256_green.png</file>
|
||||||
|
<file alias="art/logo_256_orange.png">../../art/logo_256_orange.png</file>
|
||||||
|
<file alias="art/logo_256_red.png">../../art/logo_256_red.png</file>
|
||||||
|
<file alias="art/logo_256_old.png">../../art/logo_256_old.png</file>
|
||||||
<file alias="art/logo_256_no_margin.png">../../art/logo_256_no_margin.png</file>
|
<file alias="art/logo_256_no_margin.png">../../art/logo_256_no_margin.png</file>
|
||||||
|
<file alias="art/logo_256_no_margin_blue.png">../../art/logo_256_no_margin_blue.png</file>
|
||||||
|
<file alias="art/logo_256_no_margin_green.png">../../art/logo_256_no_margin_green.png</file>
|
||||||
|
<file alias="art/logo_256_no_margin_orange.png">../../art/logo_256_no_margin_orange.png</file>
|
||||||
|
<file alias="art/logo_256_no_margin_red.png">../../art/logo_256_no_margin_red.png</file>
|
||||||
|
<file alias="art/logo_256_no_margin_old.png">../../art/logo_256_no_margin_old.png</file>
|
||||||
<file alias="art/sunrise.jpg">../../art/sunrise.jpg</file>
|
<file alias="art/sunrise.jpg">../../art/sunrise.jpg</file>
|
||||||
<file alias="day-blue.tdesktop-theme">../../day-blue.tdesktop-theme</file>
|
<file alias="day-blue.tdesktop-theme">../../day-blue.tdesktop-theme</file>
|
||||||
<file alias="night.tdesktop-theme">../../night.tdesktop-theme</file>
|
<file alias="night.tdesktop-theme">../../night.tdesktop-theme</file>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
// Icon with lowest ID value placed first to ensure application icon
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
// remains consistent on all systems.
|
// remains consistent on all systems.
|
||||||
IDI_ICON1 ICON "..\\art\\icon256.ico"
|
IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||||
|
IDI_ICON2 ICON "..\\art\\icon256blue.ico"
|
||||||
|
IDI_ICON3 ICON "..\\art\\icon256green.ico"
|
||||||
|
IDI_ICON4 ICON "..\\art\\icon256orange.ico"
|
||||||
|
IDI_ICON5 ICON "..\\art\\icon256red.ico"
|
||||||
|
IDI_ICON6 ICON "..\\art\\icon256old.ico"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -98,9 +98,29 @@ Application::Application(not_null<Launcher*> launcher)
|
||||||
, _emojiKeywords(std::make_unique<ChatHelpers::EmojiKeywords>())
|
, _emojiKeywords(std::make_unique<ChatHelpers::EmojiKeywords>())
|
||||||
, _audio(std::make_unique<Media::Audio::Instance>())
|
, _audio(std::make_unique<Media::Audio::Instance>())
|
||||||
, _logo(Window::LoadLogo())
|
, _logo(Window::LoadLogo())
|
||||||
, _logoNoMargin(Window::LoadLogoNoMargin()) {
|
, _logoBlue(Window::LoadLogo(1))
|
||||||
|
, _logoGreen(Window::LoadLogo(2))
|
||||||
|
, _logoOrange(Window::LoadLogo(3))
|
||||||
|
, _logoRed(Window::LoadLogo(4))
|
||||||
|
, _logoOld(Window::LoadLogo(5))
|
||||||
|
, _logoNoMargin(Window::LoadLogoNoMargin())
|
||||||
|
, _logoNoMarginBlue(Window::LoadLogoNoMargin(1))
|
||||||
|
, _logoNoMarginGreen(Window::LoadLogoNoMargin(2))
|
||||||
|
, _logoNoMarginOrange(Window::LoadLogoNoMargin(3))
|
||||||
|
, _logoNoMarginRed(Window::LoadLogoNoMargin(4))
|
||||||
|
, _logoNoMarginOld(Window::LoadLogoNoMargin(5)) {
|
||||||
Expects(!_logo.isNull());
|
Expects(!_logo.isNull());
|
||||||
|
Expects(!_logoBlue.isNull());
|
||||||
|
Expects(!_logoGreen.isNull());
|
||||||
|
Expects(!_logoOrange.isNull());
|
||||||
|
Expects(!_logoRed.isNull());
|
||||||
|
Expects(!_logoOld.isNull());
|
||||||
Expects(!_logoNoMargin.isNull());
|
Expects(!_logoNoMargin.isNull());
|
||||||
|
Expects(!_logoNoMarginBlue.isNull());
|
||||||
|
Expects(!_logoNoMarginGreen.isNull());
|
||||||
|
Expects(!_logoNoMarginOrange.isNull());
|
||||||
|
Expects(!_logoNoMarginRed.isNull());
|
||||||
|
Expects(!_logoNoMarginOld.isNull());
|
||||||
|
|
||||||
Ui::Integration::Set(&_private->uiIntegration);
|
Ui::Integration::Set(&_private->uiIntegration);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,10 +115,26 @@ public:
|
||||||
PeerData *ui_getPeerForMouseAction();
|
PeerData *ui_getPeerForMouseAction();
|
||||||
|
|
||||||
QPoint getPointForCallPanelCenter() const;
|
QPoint getPointForCallPanelCenter() const;
|
||||||
QImage logo() const {
|
QImage logo(int variant = 0) const {
|
||||||
|
switch (variant) {
|
||||||
|
case 1: return _logoBlue;
|
||||||
|
case 2: return _logoGreen;
|
||||||
|
case 3: return _logoOrange;
|
||||||
|
case 4: return _logoRed;
|
||||||
|
case 5: return _logoOld;
|
||||||
|
}
|
||||||
|
|
||||||
return _logo;
|
return _logo;
|
||||||
}
|
}
|
||||||
QImage logoNoMargin() const {
|
QImage logoNoMargin(int variant = 0) const {
|
||||||
|
switch (variant) {
|
||||||
|
case 1: return _logoNoMarginBlue;
|
||||||
|
case 2: return _logoNoMarginGreen;
|
||||||
|
case 3: return _logoNoMarginOrange;
|
||||||
|
case 4: return _logoNoMarginRed;
|
||||||
|
case 5: return _logoNoMarginOld;
|
||||||
|
}
|
||||||
|
|
||||||
return _logoNoMargin;
|
return _logoNoMargin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -281,7 +297,17 @@ private:
|
||||||
|
|
||||||
const std::unique_ptr<Media::Audio::Instance> _audio;
|
const std::unique_ptr<Media::Audio::Instance> _audio;
|
||||||
const QImage _logo;
|
const QImage _logo;
|
||||||
|
const QImage _logoBlue;
|
||||||
|
const QImage _logoGreen;
|
||||||
|
const QImage _logoOrange;
|
||||||
|
const QImage _logoRed;
|
||||||
|
const QImage _logoOld;
|
||||||
const QImage _logoNoMargin;
|
const QImage _logoNoMargin;
|
||||||
|
const QImage _logoNoMarginBlue;
|
||||||
|
const QImage _logoNoMarginGreen;
|
||||||
|
const QImage _logoNoMarginOrange;
|
||||||
|
const QImage _logoNoMarginRed;
|
||||||
|
const QImage _logoNoMarginOld;
|
||||||
|
|
||||||
rpl::variable<bool> _passcodeLock;
|
rpl::variable<bool> _passcodeLock;
|
||||||
rpl::event_stream<bool> _termsLockChanges;
|
rpl::event_stream<bool> _termsLockChanges;
|
||||||
|
|
|
||||||
|
|
@ -327,6 +327,12 @@ bool Manager::readCustomFile() {
|
||||||
ReadBoolOption(settings, "always_show_top_userpic", [&](auto v) {
|
ReadBoolOption(settings, "always_show_top_userpic", [&](auto v) {
|
||||||
cSetShowTopBarUserpic(v);
|
cSetShowTopBarUserpic(v);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ReadIntOption(settings, "custom_app_icon", [&](auto v) {
|
||||||
|
if (v >= 0 || v <= 5) {
|
||||||
|
cSetCustomAppIcon(v);
|
||||||
|
}
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -370,6 +376,7 @@ void Manager::writeDefaultFile() {
|
||||||
settings.insert(qsl("recent_stickers_limit"), RecentStickersLimit());
|
settings.insert(qsl("recent_stickers_limit"), RecentStickersLimit());
|
||||||
settings.insert(qsl("userpic_corner_type"), cUserpicCornersType());
|
settings.insert(qsl("userpic_corner_type"), cUserpicCornersType());
|
||||||
settings.insert(qsl("always_show_top_userpic"), cShowTopBarUserpic());
|
settings.insert(qsl("always_show_top_userpic"), cShowTopBarUserpic());
|
||||||
|
settings.insert(qsl("custom_app_icon"), cCustomAppIcon());
|
||||||
|
|
||||||
auto settingsScales = QJsonArray();
|
auto settingsScales = QJsonArray();
|
||||||
settings.insert(qsl("scales"), settingsScales);
|
settings.insert(qsl("scales"), settingsScales);
|
||||||
|
|
@ -434,6 +441,7 @@ void Manager::writeCurrentSettings() {
|
||||||
settings.insert(qsl("recent_stickers_limit"), RecentStickersLimit());
|
settings.insert(qsl("recent_stickers_limit"), RecentStickersLimit());
|
||||||
settings.insert(qsl("userpic_corner_type"), cUserpicCornersType());
|
settings.insert(qsl("userpic_corner_type"), cUserpicCornersType());
|
||||||
settings.insert(qsl("always_show_top_userpic"), cShowTopBarUserpic());
|
settings.insert(qsl("always_show_top_userpic"), cShowTopBarUserpic());
|
||||||
|
settings.insert(qsl("custom_app_icon"), cCustomAppIcon());
|
||||||
|
|
||||||
auto settingsScales = QJsonArray();
|
auto settingsScales = QJsonArray();
|
||||||
auto currentScales = cInterfaceScales();
|
auto currentScales = cInterfaceScales();
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ void PeerData::clearUserpic() {
|
||||||
const auto loc = StorageImageLocation();
|
const auto loc = StorageImageLocation();
|
||||||
const auto photo = [&] {
|
const auto photo = [&] {
|
||||||
if (isNotificationsUser()) {
|
if (isNotificationsUser()) {
|
||||||
auto image = Core::App().logoNoMargin().scaledToWidth(
|
auto image = Core::App().logoNoMargin(cCustomAppIcon()).scaledToWidth(
|
||||||
kUserpicSize,
|
kUserpicSize,
|
||||||
Qt::SmoothTransformation);
|
Qt::SmoothTransformation);
|
||||||
return _userpic
|
return _userpic
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@ introCoverIcon: icon {
|
||||||
{ "intro_plane_outer", introCoverPlaneOuter },
|
{ "intro_plane_outer", introCoverPlaneOuter },
|
||||||
{ "intro_plane_top", introCoverPlaneTop },
|
{ "intro_plane_top", introCoverPlaneTop },
|
||||||
};
|
};
|
||||||
|
introKotatoCoverIcon: icon {
|
||||||
|
{ "intro_kotato_trace", introCoverPlaneTrace },
|
||||||
|
{ "intro_kotato_top", introCoverPlaneTop },
|
||||||
|
};
|
||||||
introCoverIconLeft: 50px;
|
introCoverIconLeft: 50px;
|
||||||
introCoverIconTop: 46px;
|
introCoverIconTop: 46px;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,7 @@ void Step::paintCover(Painter &p, int top) {
|
||||||
st::introCoverLeft.paint(p, left, coverHeight - st::introCoverLeft.height(), width());
|
st::introCoverLeft.paint(p, left, coverHeight - st::introCoverLeft.height(), width());
|
||||||
st::introCoverRight.paint(p, width() - right - st::introCoverRight.width(), coverHeight - st::introCoverRight.height(), width());
|
st::introCoverRight.paint(p, width() - right - st::introCoverRight.width(), coverHeight - st::introCoverRight.height(), width());
|
||||||
|
|
||||||
auto planeLeft = (width() - st::introCoverIcon.width()) / 2 - st::introCoverIconLeft;
|
auto planeLeft = (width() - st::introKotatoCoverIcon.width()) / 2 - st::introCoverIconLeft;
|
||||||
auto planeTop = top + st::introCoverIconTop;
|
auto planeTop = top + st::introCoverIconTop;
|
||||||
if (top < 0 && !_hasCover) {
|
if (top < 0 && !_hasCover) {
|
||||||
auto deltaLeft = -qRound(float64(st::introPlaneWidth / st::introPlaneHeight) * top);
|
auto deltaLeft = -qRound(float64(st::introPlaneWidth / st::introPlaneHeight) * top);
|
||||||
|
|
@ -348,7 +348,7 @@ void Step::paintCover(Painter &p, int top) {
|
||||||
planeLeft += deltaLeft;
|
planeLeft += deltaLeft;
|
||||||
// planeTop += top;
|
// planeTop += top;
|
||||||
}
|
}
|
||||||
st::introCoverIcon.paint(p, planeLeft, planeTop, width());
|
st::introKotatoCoverIcon.paint(p, planeLeft, planeTop, width());
|
||||||
}
|
}
|
||||||
|
|
||||||
int Step::contentLeft() const {
|
int Step::contentLeft() const {
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
||||||
QImage iconImage(cWorkingDir() + "tdata/icon.png");
|
QImage iconImage(cWorkingDir() + "tdata/icon.png");
|
||||||
|
|
||||||
auto logo = iconImage.isNull()
|
auto logo = iconImage.isNull()
|
||||||
? Core::App().logo()
|
? Core::App().logo(cCustomAppIcon())
|
||||||
: iconImage;
|
: iconImage;
|
||||||
|
|
||||||
icon16 = logo.scaledToWidth(16, Qt::SmoothTransformation);
|
icon16 = logo.scaledToWidth(16, Qt::SmoothTransformation);
|
||||||
|
|
@ -89,7 +89,7 @@ MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
||||||
icon64 = logo.scaledToWidth(64, Qt::SmoothTransformation);
|
icon64 = logo.scaledToWidth(64, Qt::SmoothTransformation);
|
||||||
|
|
||||||
auto logoNoMargin = iconImage.isNull()
|
auto logoNoMargin = iconImage.isNull()
|
||||||
? Core::App().logoNoMargin()
|
? Core::App().logoNoMargin(cCustomAppIcon())
|
||||||
: iconImage;
|
: iconImage;
|
||||||
|
|
||||||
iconbig16 = logoNoMargin.scaledToWidth(16, Qt::SmoothTransformation);
|
iconbig16 = logoNoMargin.scaledToWidth(16, Qt::SmoothTransformation);
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ QIcon TrayIconGen(int counter, bool muted) {
|
||||||
} else {
|
} else {
|
||||||
currentImageBack = QImage(cWorkingDir() + "tdata/icon.png");
|
currentImageBack = QImage(cWorkingDir() + "tdata/icon.png");
|
||||||
if (currentImageBack.isNull()) {
|
if (currentImageBack.isNull()) {
|
||||||
currentImageBack = Core::App().logo();
|
currentImageBack = Core::App().logo(cCustomAppIcon());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -686,7 +686,7 @@ void MainWindow::psSetupTrayIcon() {
|
||||||
trayIcon = new QSystemTrayIcon(this);
|
trayIcon = new QSystemTrayIcon(this);
|
||||||
auto icon = QIcon(cWorkingDir() + "tdata/icon.png");
|
auto icon = QIcon(cWorkingDir() + "tdata/icon.png");
|
||||||
if (icon.isNull()) {
|
if (icon.isNull()) {
|
||||||
icon = QIcon(App::pixmapFromImageInPlace(Core::App().logoNoMargin()));
|
icon = QIcon(App::pixmapFromImageInPlace(Core::App().logoNoMargin(cCustomAppIcon())));
|
||||||
}
|
}
|
||||||
|
|
||||||
trayIcon->setIcon(icon);
|
trayIcon->setIcon(icon);
|
||||||
|
|
|
||||||
|
|
@ -318,3 +318,4 @@ rpl::producer<int> RecentStickersLimitChanges() {
|
||||||
|
|
||||||
int gUserpicCornersType = 3;
|
int gUserpicCornersType = 3;
|
||||||
bool gShowTopBarUserpic = false;
|
bool gShowTopBarUserpic = false;
|
||||||
|
int gCustomAppIcon = 0;
|
||||||
|
|
|
||||||
|
|
@ -248,3 +248,4 @@ void SetRecentStickersLimit(int limit);
|
||||||
|
|
||||||
DeclareSetting(int, UserpicCornersType);
|
DeclareSetting(int, UserpicCornersType);
|
||||||
DeclareSetting(bool, ShowTopBarUserpic);
|
DeclareSetting(bool, ShowTopBarUserpic);
|
||||||
|
DeclareSetting(int, CustomAppIcon);
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ settingsIconStickers: icon {{ "settings_stickers", menuIconFg }};
|
||||||
settingsIconEmoji: icon {{ "settings_emoji", menuIconFg }};
|
settingsIconEmoji: icon {{ "settings_emoji", menuIconFg }};
|
||||||
settingsIconThemes: icon {{ "settings_themes", menuIconFg }};
|
settingsIconThemes: icon {{ "settings_themes", menuIconFg }};
|
||||||
settingsIconKotato: icon {{ "settings_kotato", menuIconFg }};
|
settingsIconKotato: icon {{ "settings_kotato", menuIconFg }};
|
||||||
|
settingsIconKotatoOld: icon {{ "settings_kotato_old", menuIconFg }};
|
||||||
|
|
||||||
settingsSetPhotoSkip: 7px;
|
settingsSetPhotoSkip: 7px;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,9 @@ void SetupSections(
|
||||||
addSection(
|
addSection(
|
||||||
tr::ktg_settings_kotato(),
|
tr::ktg_settings_kotato(),
|
||||||
Type::Kotato,
|
Type::Kotato,
|
||||||
&st::settingsIconKotato);
|
(cCustomAppIcon() == 5
|
||||||
|
? &st::settingsIconKotatoOld
|
||||||
|
: &st::settingsIconKotato));
|
||||||
|
|
||||||
SetupLanguageButton(container);
|
SetupLanguageButton(container);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ void NotificationsCount::prepareNotificationSampleSmall() {
|
||||||
void NotificationsCount::prepareNotificationSampleUserpic() {
|
void NotificationsCount::prepareNotificationSampleUserpic() {
|
||||||
if (_notificationSampleUserpic.isNull()) {
|
if (_notificationSampleUserpic.isNull()) {
|
||||||
_notificationSampleUserpic = App::pixmapFromImageInPlace(
|
_notificationSampleUserpic = App::pixmapFromImageInPlace(
|
||||||
Core::App().logoNoMargin().scaled(
|
Core::App().logoNoMargin(cCustomAppIcon()).scaled(
|
||||||
st::notifyPhotoSize * cIntRetinaFactor(),
|
st::notifyPhotoSize * cIntRetinaFactor(),
|
||||||
st::notifyPhotoSize * cIntRetinaFactor(),
|
st::notifyPhotoSize * cIntRetinaFactor(),
|
||||||
Qt::IgnoreAspectRatio,
|
Qt::IgnoreAspectRatio,
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,24 @@ constexpr auto kSaveWindowPositionTimeout = crl::time(1000);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
QImage LoadLogo() {
|
QString LogoVariant(int variant) {
|
||||||
return QImage(qsl(":/gui/art/logo_256.png"));
|
switch (variant) {
|
||||||
|
case 1: return QString("_blue");
|
||||||
|
case 2: return QString("_green");
|
||||||
|
case 3: return QString("_orange");
|
||||||
|
case 4: return QString("_red");
|
||||||
|
case 5: return QString("_old");
|
||||||
|
}
|
||||||
|
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage LoadLogoNoMargin() {
|
QImage LoadLogo(int variant) {
|
||||||
return QImage(qsl(":/gui/art/logo_256_no_margin.png"));
|
return QImage(qsl(":/gui/art/logo_256%1.png").arg(LogoVariant(variant)));
|
||||||
|
}
|
||||||
|
|
||||||
|
QImage LoadLogoNoMargin(int variant) {
|
||||||
|
return QImage(qsl(":/gui/art/logo_256_no_margin%1.png").arg(LogoVariant(variant)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConvertIconToBlack(QImage &image) {
|
void ConvertIconToBlack(QImage &image) {
|
||||||
|
|
@ -106,7 +118,7 @@ void ConvertIconToBlack(QImage &image) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon CreateOfficialIcon(Main::Account *account) {
|
QIcon CreateOfficialIcon(Main::Account *account) {
|
||||||
auto image = Core::IsAppLaunched() ? Core::App().logo() : LoadLogo();
|
auto image = Core::IsAppLaunched() ? Core::App().logo(cCustomAppIcon()) : LoadLogo(cCustomAppIcon());
|
||||||
if (account
|
if (account
|
||||||
&& account->sessionExists()
|
&& account->sessionExists()
|
||||||
&& account->session().supportMode()) {
|
&& account->session().supportMode()) {
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,9 @@ class SessionController;
|
||||||
class TitleWidget;
|
class TitleWidget;
|
||||||
struct TermsLock;
|
struct TermsLock;
|
||||||
|
|
||||||
QImage LoadLogo();
|
QString LogoVariant(int variant = 0);
|
||||||
QImage LoadLogoNoMargin();
|
QImage LoadLogo(int variant = 0);
|
||||||
|
QImage LoadLogoNoMargin(int variant = 0);
|
||||||
QIcon CreateIcon(Main::Account *account = nullptr);
|
QIcon CreateIcon(Main::Account *account = nullptr);
|
||||||
void ConvertIconToBlack(QImage &image);
|
void ConvertIconToBlack(QImage &image);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ Manager::QueuedNotification::QueuedNotification(
|
||||||
|
|
||||||
QPixmap Manager::hiddenUserpicPlaceholder() const {
|
QPixmap Manager::hiddenUserpicPlaceholder() const {
|
||||||
if (_hiddenUserpicPlaceholder.isNull()) {
|
if (_hiddenUserpicPlaceholder.isNull()) {
|
||||||
_hiddenUserpicPlaceholder = App::pixmapFromImageInPlace(Core::App().logoNoMargin().scaled(st::notifyPhotoSize, st::notifyPhotoSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
_hiddenUserpicPlaceholder = App::pixmapFromImageInPlace(Core::App().logoNoMargin(cCustomAppIcon()).scaled(st::notifyPhotoSize, st::notifyPhotoSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||||
_hiddenUserpicPlaceholder.setDevicePixelRatio(cRetinaFactor());
|
_hiddenUserpicPlaceholder.setDevicePixelRatio(cRetinaFactor());
|
||||||
}
|
}
|
||||||
return _hiddenUserpicPlaceholder;
|
return _hiddenUserpicPlaceholder;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ QString CachedUserpics::get(const InMemoryKey &key, PeerData *peer) {
|
||||||
peer->saveUserpic(v.path, st::notifyMacPhotoSize);
|
peer->saveUserpic(v.path, st::notifyMacPhotoSize);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Core::App().logoNoMargin().save(v.path, "PNG");
|
Core::App().logoNoMargin(cCustomAppIcon()).save(v.path, "PNG");
|
||||||
}
|
}
|
||||||
i = _images.insert(key, v);
|
i = _images.insert(key, v);
|
||||||
_someSavedFlag = true;
|
_someSavedFlag = true;
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 60 KiB |