From bf6904c1c8964a4b91bcaaf70244b7b3f17f5ac2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 11 Apr 2016 15:22:37 +0400 Subject: [PATCH] Moved PeerAvatarButton sources to SourceFiles. Beta 9040128. --- Telegram/Telegram.vcxproj | 4 +-- Telegram/Telegram.vcxproj.filters | 8 ++--- Telegram/ui/buttons/peer_avatar_button.cpp | 35 ------------------- Telegram/ui/buttons/peer_avatar_button.h | 40 ---------------------- 4 files changed, 6 insertions(+), 81 deletions(-) delete mode 100644 Telegram/ui/buttons/peer_avatar_button.cpp delete mode 100644 Telegram/ui/buttons/peer_avatar_button.h diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj index ea81c77954..c651652de3 100644 --- a/Telegram/Telegram.vcxproj +++ b/Telegram/Telegram.vcxproj @@ -1142,6 +1142,7 @@ + @@ -1165,10 +1166,8 @@ NotUsing NotUsing - - $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_winrt.h... @@ -1386,6 +1385,7 @@ .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/ui/countryinput.h" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" + diff --git a/Telegram/Telegram.vcxproj.filters b/Telegram/Telegram.vcxproj.filters index 998cda50d4..2c6bfa628b 100644 --- a/Telegram/Telegram.vcxproj.filters +++ b/Telegram/Telegram.vcxproj.filters @@ -1032,7 +1032,7 @@ dialogs - + ui\buttons @@ -1172,6 +1172,9 @@ dialogs + + ui\buttons + @@ -1414,9 +1417,6 @@ ui\toast - - ui\buttons - diff --git a/Telegram/ui/buttons/peer_avatar_button.cpp b/Telegram/ui/buttons/peer_avatar_button.cpp deleted file mode 100644 index 7dbadc50c1..0000000000 --- a/Telegram/ui/buttons/peer_avatar_button.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* -This file is part of Telegram Desktop, -the official desktop version of Telegram messaging app, see https://telegram.org - -Telegram Desktop is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -It is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -In addition, as a special exception, the copyright holders give permission -to link the code of portions of this program with the OpenSSL library. - -Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org -*/ -#include "stdafx.h" -#include "ui/buttons/peer_avatar_button.h" - -PeerAvatarButton::PeerAvatarButton(QWidget *parent, PeerData *peer, const style::PeerAvatarButton &st) : Button(parent) -, _peer(peer) -, _st(st) { - resize(_st.size, _st.size); -} - -void PeerAvatarButton::paintEvent(QPaintEvent *e) { - if (_peer) { - Painter p(this); - _peer->paintUserpic(p, _st.photoSize, (_st.size - _st.photoSize) / 2, (_st.size - _st.photoSize) / 2); - } -} diff --git a/Telegram/ui/buttons/peer_avatar_button.h b/Telegram/ui/buttons/peer_avatar_button.h deleted file mode 100644 index d0861fef9e..0000000000 --- a/Telegram/ui/buttons/peer_avatar_button.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -This file is part of Telegram Desktop, -the official desktop version of Telegram messaging app, see https://telegram.org - -Telegram Desktop is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -It is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -In addition, as a special exception, the copyright holders give permission -to link the code of portions of this program with the OpenSSL library. - -Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org -*/ -#pragma once - -#include "ui/button.h" -#include "ui/style.h" -#include "structs.h" - -class PeerAvatarButton : public Button { -public: - PeerAvatarButton(QWidget *parent, PeerData *peer, const style::PeerAvatarButton &st); - void setPeer(PeerData *peer) { - _peer = peer; - update(); - } - void paintEvent(QPaintEvent *e); - -private: - PeerData *_peer; - const style::PeerAvatarButton &_st; - -};