mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Fix CounterLayerArgs devicePixelRatio order
This commit is contained in:
parent
8dee2a1c8b
commit
590be6d6e7
2 changed files with 3 additions and 3 deletions
Telegram/SourceFiles/window
|
@ -250,9 +250,9 @@ QImage GenerateCounterLayer(CounterLayerArgs &&args) {
|
|||
}();
|
||||
|
||||
auto result = QImage(
|
||||
QSize(d.size, d.size) * d.devicePixelRatio,
|
||||
QSize(d.size, d.size) * args.devicePixelRatio,
|
||||
QImage::Format_ARGB32);
|
||||
result.setDevicePixelRatio(d.devicePixelRatio);
|
||||
result.setDevicePixelRatio(args.devicePixelRatio);
|
||||
result.fill(Qt::transparent);
|
||||
|
||||
auto p = QPainter(&result);
|
||||
|
|
|
@ -48,10 +48,10 @@ struct CounterLayerArgs {
|
|||
using required = base::required<T>;
|
||||
|
||||
required<int> size = 16;
|
||||
double devicePixelRatio = 1.;
|
||||
required<int> count = 1;
|
||||
required<style::color> bg;
|
||||
required<style::color> fg;
|
||||
double devicePixelRatio = 1.;
|
||||
};
|
||||
|
||||
[[nodiscard]] QImage GenerateCounterLayer(CounterLayerArgs &&args);
|
||||
|
|
Loading…
Add table
Reference in a new issue