mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 22:15:57 +03:00
(Maybe) finished implementation of themed wizard buttons and accessibility refinements and thus implementation of helper fct. to retrieve themed QIcons.
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
parent
544229d1e8
commit
ace3da841c
4 changed files with 22 additions and 14 deletions
|
@ -76,17 +76,13 @@
|
|||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../theme.qrc">
|
||||
<normaloff>:/client/theme/black/control-prev.svg</normaloff>:/client/theme/black/control-prev.svg</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -113,17 +109,13 @@
|
|||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../theme.qrc">
|
||||
<normaloff>:/client/theme/black/control-next.svg</normaloff>:/client/theme/black/control-next.svg</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -418,14 +410,11 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="installLink">
|
||||
<property name="text">
|
||||
<string><a href="https://docs.nextcloud.com/server/15/admin_manual/installation/index.html#installation"><span style=" text-decoration: underline; color:#0000ff;">Host your own server</span></a></string>
|
||||
<string><a href="https://docs.nextcloud.com/server/15/admin_manual/installation/index.html#installation"><span style=" text-decoration: underline; color:#7a7a7a;">Host your own server</span></a></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -89,6 +89,9 @@ OwncloudSetupPage::OwncloudSetupPage(QWidget *parent)
|
|||
connect(_ui.nextButton, &QPushButton::clicked, _ui.slideShow, &SlideShow::nextSlide);
|
||||
connect(_ui.prevButton, &QPushButton::clicked, _ui.slideShow, &SlideShow::prevSlide);
|
||||
|
||||
_ui.nextButton->setIcon(theme->uiThemeIcon(QString("control-next.svg"), false));
|
||||
_ui.prevButton->setIcon(theme->uiThemeIcon(QString("control-prev.svg"), false));
|
||||
|
||||
_ui.slideShow->startShow();
|
||||
|
||||
QPalette pal = _ui.slideShow->palette();
|
||||
|
|
|
@ -177,6 +177,14 @@ QIcon Theme::themeIcon(const QString &name, bool sysTray, bool sysTrayMenuVisibl
|
|||
return cached;
|
||||
}
|
||||
|
||||
QIcon Theme::uiThemeIcon(const QString &iconName, bool uiHasDarkBg) const
|
||||
{
|
||||
QString themeResBasePath = ":/client/theme/";
|
||||
QString iconPath = themeResBasePath + (uiHasDarkBg?"white/":"black/") + iconName;
|
||||
std::string icnPath = iconPath.toUtf8().constData();
|
||||
return QIcon(QPixmap(iconPath));
|
||||
}
|
||||
|
||||
QString Theme::hidpiFileName(const QString &fileName, QPaintDevice *dev)
|
||||
{
|
||||
qreal devicePixelRatio = dev ? dev->devicePixelRatio() : qApp->primaryScreen()->devicePixelRatio();
|
||||
|
|
|
@ -348,6 +348,14 @@ public:
|
|||
*/
|
||||
virtual QString versionSwitchOutput() const;
|
||||
|
||||
/**
|
||||
* @brief Request suitable QIcon resource depending on the background colour of the parent widget.
|
||||
*
|
||||
* This should be replaced (TODO) by a real theming implementation for the client UI
|
||||
* (actually 2019/09/13 only systray theming).
|
||||
*/
|
||||
virtual QIcon uiThemeIcon(const QString &iconName, bool uiHasDarkBg) const;
|
||||
|
||||
protected:
|
||||
#ifndef TOKEN_AUTH_ONLY
|
||||
QIcon themeIcon(const QString &name, bool sysTray = false, bool sysTrayMenuVisible = false) const;
|
||||
|
|
Loading…
Reference in a new issue