Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b09b216f authored by Nathaniel Graham's avatar Nathaniel Graham

Use standard QToolButtons so that their icons use the right colors

Summary:
BUG: 383059

For the inline context buttons, use the standard QToolButton widget which respects theming so that icons are always visible

Test Plan:
Tested in KDE Neon with Breeze light and dark, Oxygen, and all default color schemes. Big improvement.

Current with Breeze:
{F4047019}

Patched version with Breeze:
{F4103061}

Patched version with Breeze Dark:
{F4103078}

Reviewers: #kde_applications, vtasoulas, broulik, rkflx

Reviewed By: rkflx

Subscribers: mart, rkflx

Differential Revision: https://phabricator.kde.org/D7988
parent b74114a1
......@@ -52,7 +52,6 @@
<summary xml:lang="el">Προβολέας εικόνων</summary>
<summary xml:lang="en-GB">Image Viewer</summary>
<summary xml:lang="es">Visor de imágenes</summary>
<summary xml:lang="fr">Afficheur d'image</summary>
<summary xml:lang="it">Visualizzatore di immagini</summary>
<summary xml:lang="nl">Afbeeldingenviewer</summary>
<summary xml:lang="nn">Biletvisar</summary>
......@@ -81,7 +80,6 @@
<p xml:lang="el">Το Gwenview είναι ένας γρήγορος και εύχρηστος προβολέας εικόνων για το KDE, ιδανικός για περιήγηση και εμφάνιση συλλογών από εικόνες.</p>
<p xml:lang="en-GB">Gwenview is a fast and easy to use image viewer by KDE, ideal for browsing and displaying a collection of images.</p>
<p xml:lang="es">Gwenview es un visor de imágenes rápido y fácil de usar creado por KDE, ideal para explorar y mostrar una colección de imágenes.</p>
<p xml:lang="fr">Gwenview est un afficheur d'images rapide et facile à utiliser pour KDE, idéal pour parcourir et afficher une collection d'images.</p>
<p xml:lang="it">Gwenview è un visore di immagini veloce e semplice da usare di KDE, ideale per sfogliare e visualizzare una collezione di immagini.</p>
<p xml:lang="nl">Gwenview is een snelle en gemakkelijk te gebruiken viewer voor afbeeldingen door KDE, ideaal voor bladeren door en weergeven van een verzameling afbeeldingen.</p>
<p xml:lang="nn">Gwenview er ein biletvisar frå KDE. Han passar svært godt for å bla gjennom og visa ei samling med bilete.</p>
......
......@@ -18,6 +18,17 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA.
*/
/*
*****************************************************
******************************************************
**** NOTE: This class is deprecated. Do not use it. **
**** It will be removed in the QT 6 timeframe. **
******************************************************
******************************************************
*/
// Self
#include "contextbarbutton.h"
......
......@@ -18,6 +18,17 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA.
*/
/*
*****************************************************
******************************************************
**** NOTE: This class is deprecated. Do not use it. **
**** It will be removed in the QT 6 timeframe. **
******************************************************
******************************************************
*/
#ifndef CONTEXTBARBUTTON_H
#define CONTEXTBARBUTTON_H
......
......@@ -37,6 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <QHoverEvent>
#include <QDateTime>
#include <QDebug>
#include <QToolButton>
// KDE
#include <KDirModel>
......@@ -48,7 +49,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
// Local
#include "archiveutils.h"
#include "contextbarbutton.h"
#include "itemeditor.h"
#include "paintutils.h"
#include "thumbnailview.h"
......@@ -610,16 +610,20 @@ PreviewItemDelegate::PreviewItemDelegate(ThumbnailView* view)
d->mContextBar = new QWidget(d->mView->viewport());
d->mContextBar->hide();
d->mToggleSelectionButton = new ContextBarButton("list-add");
d->mToggleSelectionButton = new QToolButton;
d->mToggleSelectionButton->setIcon(SmallIcon("list-add"));
connect(d->mToggleSelectionButton, &QToolButton::clicked, this, &PreviewItemDelegate::slotToggleSelectionClicked);
d->mFullScreenButton = new ContextBarButton("view-fullscreen");
d->mFullScreenButton = new QToolButton;
d->mFullScreenButton->setIcon(SmallIcon("view-fullscreen"));
connect(d->mFullScreenButton, &QToolButton::clicked, this, &PreviewItemDelegate::slotFullScreenClicked);
d->mRotateLeftButton = new ContextBarButton("object-rotate-left");
d->mRotateLeftButton = new QToolButton;
d->mRotateLeftButton->setIcon(SmallIcon("object-rotate-left"));
connect(d->mRotateLeftButton, &QToolButton::clicked, this, &PreviewItemDelegate::slotRotateLeftClicked);
d->mRotateRightButton = new ContextBarButton("object-rotate-right");
d->mRotateRightButton = new QToolButton;
d->mRotateRightButton->setIcon(SmallIcon("object-rotate-right"));
connect(d->mRotateRightButton, &QToolButton::clicked, this, &PreviewItemDelegate::slotRotateRightClicked);
QHBoxLayout* layout = new QHBoxLayout(d->mContextBar);
......@@ -631,7 +635,8 @@ PreviewItemDelegate::PreviewItemDelegate(ThumbnailView* view)
layout->addWidget(d->mRotateRightButton);
// Save button
d->mSaveButton = new ContextBarButton("document-save", d->mView->viewport());
d->mSaveButton = new QToolButton(d->mView->viewport());
d->mSaveButton->setIcon(SmallIcon("document-save"));
d->mSaveButton->hide();
connect(d->mSaveButton, &QToolButton::clicked, this, &PreviewItemDelegate::slotSaveClicked);
}
......
......@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <QScrollBar>
#include <QPainter>
#include <QTimeLine>
#include <QToolButton>
#include <QToolTip>
#include <QDebug>
......@@ -43,7 +44,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include "lib/hud/hudtheme.h"
#include "lib/paintutils.h"
#include "lib/thumbnailview/abstractthumbnailviewhelper.h"
#include "lib/thumbnailview/contextbarbutton.h"
namespace Gwenview
{
......@@ -73,16 +73,17 @@ struct ThumbnailBarItemDelegatePrivate
ThumbnailBarItemDelegate* q;
ThumbnailView* mView;
ContextBarButton* mToggleSelectionButton;
QToolButton* mToggleSelectionButton;
QColor mBorderColor;
QPersistentModelIndex mIndexUnderCursor;
void setupToggleSelectionButton()
{
mToggleSelectionButton = new ContextBarButton("list-add", mView->viewport());
mToggleSelectionButton = new QToolButton(mView->viewport());
mToggleSelectionButton->setIcon(SmallIcon("list-add"));
mToggleSelectionButton->hide();
QObject::connect(mToggleSelectionButton, &ContextBarButton::clicked, q, &ThumbnailBarItemDelegate::toggleSelection);
QObject::connect(mToggleSelectionButton, &QToolButton::clicked, q, &ThumbnailBarItemDelegate::toggleSelection);
}
void showToolTip(QHelpEvent* helpEvent)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment