mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile-widget: remove SettingsObjectWrapper and update qPref calls
remove use of SettingsObjectWrapper:: remove include of SettingsObjectWrapper.h use qPrefFoo:: for setters and getters replace prefs.foo with qPrefXYZ::foo() where feasible (this expands to the same code, but gives us more control over the variable). Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
50c58b4065
commit
1cc7c05170
6 changed files with 35 additions and 33 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "core/profile.h"
|
||||
#include "core/membuffer.h"
|
||||
#include "core/metrics.h"
|
||||
#include "core/settings/qPrefAnimations.h"
|
||||
#include <QPropertyAnimation>
|
||||
#include <QSettings>
|
||||
#include <QGraphicsView>
|
||||
|
@ -61,7 +62,7 @@ void ToolTipItem::collapse()
|
|||
{
|
||||
int dim = defaultIconMetrics().sz_small;
|
||||
|
||||
if (prefs.animation_speed) {
|
||||
if (qPrefAnimations::animation_speed()) {
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(this, "rect");
|
||||
animation->setDuration(100);
|
||||
animation->setStartValue(nextRectangle);
|
||||
|
@ -119,7 +120,7 @@ void ToolTipItem::expand()
|
|||
nextRectangle.setHeight(height);
|
||||
|
||||
if (nextRectangle != rect()) {
|
||||
if (prefs.animation_speed) {
|
||||
if (qPrefAnimations::animation_speed()) {
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(this, "rect", this);
|
||||
animation->setDuration(prefs.animation_speed);
|
||||
animation->setStartValue(rect());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue