mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Resize dialog size on high DPI monitors
This commit is contained in:
parent
aaaa67050c
commit
27cf98a962
26 changed files with 125 additions and 80 deletions
|
@ -39,7 +39,15 @@ namespace Utils
|
|||
{
|
||||
namespace Gui
|
||||
{
|
||||
void resize(QWidget *widget, const QSize &newSize = {});
|
||||
qreal screenScalingFactor(const QWidget *widget);
|
||||
|
||||
template <typename T>
|
||||
T scaledSize(const QWidget *widget, const T &size)
|
||||
{
|
||||
return (size * screenScalingFactor(widget));
|
||||
}
|
||||
|
||||
QPixmap scaledPixmap(const QString &path, const QWidget *widget, const int height = 0);
|
||||
QSize smallIconSize(const QWidget *widget = nullptr);
|
||||
QSize mediumIconSize(const QWidget *widget = nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue