D3484: Center systemmonitor window properly on multi-screen setup

Sebastian Kügler noreply at phabricator.kde.org
Wed Jun 7 13:48:57 UTC 2017


sebas added inline comments.

INLINE COMMENTS

> ksystemactivitydialog.cpp:78
>  {
> -    saveDialogSettings();
> -    event->accept();
> -}
> -
> -
> -void KSystemActivityDialog::reject ()
> -{
> -    saveDialogSettings();
> -    QDialog::reject();
> -}
> -
> -void KSystemActivityDialog::saveDialogSettings()
> -{
> -    //When the user closes the dialog, save the position and the KeepAbove state
> -    KConfigGroup cg = KSharedConfig::openConfig()->group("TaskDialog");
> -    KWindowConfig::saveWindowSize(windowHandle(), cg);
> -    m_processList.saveSettings(cg);
> -
> -    // Since we default to forcing the window to be KeepAbove, if the user turns this off, remember this
> -    // vHanda: Temporarily commented out
> -    // bool keepAbove = KWindowSystem::windowInfo(winId(), NET::WMState).hasState(NET::KeepAbove);
> -    // KRunnerSettings::setKeepTaskDialogAbove(keepAbove);
> -    KSharedConfig::openConfig()->sync();
> +    return QSize(650, 420);
>  }

This doesn't work with scaling, different font settings or different widget themes. Hardcoded sizes are a no-no in general.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D3484

To: valeriymalov, #plasma_workspaces, aacid, mart
Cc: sebas, aacid, graesslin, plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170607/513d9d6f/attachment-0001.html>


More information about the Plasma-devel mailing list