mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-26 16:43:33 +00:00
Version 0.10.9: fixed interface scaling and Windows build.
This commit is contained in:
parent
ef2faf676e
commit
4a5f467560
@ -23,6 +23,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
|
||||
#include "dialogs/dialogs_layout.h"
|
||||
#include "styles/style_dialogs.h"
|
||||
#include "ui/popupmenu.h"
|
||||
#include "zip.h"
|
||||
#include "lang.h"
|
||||
#include "shortcuts.h"
|
||||
|
@ -27,6 +27,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
#include "application.h"
|
||||
#include "lang.h"
|
||||
#include "localstorage.h"
|
||||
#include "ui/popupmenu.h"
|
||||
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
@ -143,19 +144,10 @@ public:
|
||||
QImage cornersImage(_fullsize, _fullsize, QImage::Format_ARGB32_Premultiplied);
|
||||
{
|
||||
Painter p(&cornersImage);
|
||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
st::wndShadow.paint(p, 0, 0, _fullsize);
|
||||
}
|
||||
if (rtl()) cornersImage = cornersImage.mirrored(true, false);
|
||||
uchar *bits = cornersImage.bits();
|
||||
if (bits) {
|
||||
for (
|
||||
quint32 *p = (quint32*)bits, *end = (quint32*)(bits + cornersImage.byteCount());
|
||||
p < end;
|
||||
++p
|
||||
) {
|
||||
*p = (*p ^ 0x00ffffff) << 24;
|
||||
}
|
||||
}
|
||||
|
||||
_metaSize = _fullsize + 2 * _shift;
|
||||
_alphas.reserve(_metaSize);
|
||||
|
@ -21,10 +21,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
#pragma once
|
||||
|
||||
#include "window/main_window.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
class NotifyWindow;
|
||||
class PopupMenu;
|
||||
|
||||
namespace Platform {
|
||||
|
||||
|
@ -30,7 +30,6 @@ SysBtn::SysBtn(QWidget *parent, const style::sysButton &st, const QString &text)
|
||||
, _st(st)
|
||||
, a_color(_st.color->c)
|
||||
, _a_color(animation(this, &SysBtn::step_color))
|
||||
, _overLevel(0)
|
||||
, _text(text) {
|
||||
int32 w = _st.size.width() + (_text.isEmpty() ? 0 : ((_st.size.width() - _st.icon.width()) / 2 + st::titleTextButton.font->width(_text)));
|
||||
resize(w, _st.size.height());
|
||||
|
@ -68,7 +68,7 @@ protected:
|
||||
anim::cvalue a_color;
|
||||
Animation _a_color;
|
||||
|
||||
float64 _overLevel;
|
||||
float64 _overLevel = 0.;
|
||||
QString _text;
|
||||
|
||||
};
|
||||
|
@ -32,8 +32,11 @@ uint32 colorKey(const QColor &c) {
|
||||
using IconPixmaps = QMap<QPair<const IconMask*, uint32>, QPixmap>;
|
||||
NeverFreedPointer<IconPixmaps> iconPixmaps;
|
||||
|
||||
int pxAdjust(int value, int scale) {
|
||||
return qRound((value * scale) / 4. - 0.01);
|
||||
inline int pxAdjust(int value, int scale) {
|
||||
if (value < 0) {
|
||||
return -pxAdjust(-value, scale);
|
||||
}
|
||||
return qFloor((value * scale / 4.) + 0.1);
|
||||
}
|
||||
|
||||
QPixmap createIconPixmap(const IconMask *mask, const Color &color) {
|
||||
|
Loading…
Reference in New Issue
Block a user