Remove concept of resolution dependent cursors
Summary: It's not a concept that makes sense with proper scaling. Cursor should be the big if you chose a big size, small if you choose a small size, regardless of what output it happens to be on. Test Plan: Set size to 0 Ran kwin Cursor size was fine Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D13607
This commit is contained in:
parent
2cc42ecc12
commit
6bdfea6d2f
1 changed files with 2 additions and 13 deletions
|
@ -52,19 +52,8 @@ void WaylandCursorTheme::loadTheme()
|
|||
Cursor *c = Cursor::self();
|
||||
int size = c->themeSize();
|
||||
if (size == 0) {
|
||||
// resolution depended
|
||||
// as we don't support per screen cursor sizes yet, we use the first screen
|
||||
KWayland::Server::Display *display = waylandServer()->display();
|
||||
auto output = display->outputs().first();
|
||||
// calculate dots per inch, multiplied with magic constants
|
||||
if (output->physicalSize().height()) {
|
||||
size = qreal(output->pixelSize().height()) / (qreal(output->physicalSize().height()) * 0.0393701) * 16.0 / 72.0;
|
||||
} else {
|
||||
// use sensible default
|
||||
size = 24;
|
||||
}
|
||||
connect(output, &KWayland::Server::OutputInterface::pixelSizeChanged, this, &WaylandCursorTheme::loadTheme, Qt::UniqueConnection);
|
||||
connect(output, &KWayland::Server::OutputInterface::physicalSizeChanged, this, &WaylandCursorTheme::loadTheme, Qt::UniqueConnection);
|
||||
//set a default size
|
||||
size = 24;
|
||||
}
|
||||
|
||||
auto theme = wl_cursor_theme_load(c->themeName().toUtf8().constData(),
|
||||
|
|
Loading…
Reference in a new issue