mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Resize dialog size on high DPI monitors
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user