Compare commits
17 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
05a48ef125 | |
|
|
81442f521c | |
|
|
67dc851fd0 | |
|
|
04913bf8b4 | |
|
|
431d8244b9 | |
|
|
731810a0b2 | |
|
|
ce163f1bd0 | |
|
|
65ff769712 | |
|
|
7676ee45c3 | |
|
|
13e07788c3 | |
|
|
93b3065760 | |
|
|
e627358800 | |
|
|
f3907549c0 | |
|
|
d08e74d508 | |
|
|
6caffc027f | |
|
|
5ca6b4261c | |
|
|
26f2baf371 |
51
CHANGELOG.md
51
CHANGELOG.md
|
|
@ -5,6 +5,57 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [5.7.25] - 2025-10-30
|
||||
|
||||
### Added
|
||||
|
||||
- Add support for custom line edit icon margin
|
||||
|
||||
### Changed
|
||||
|
||||
- Improve navigation widget styling
|
||||
|
||||
### Fixed
|
||||
|
||||
- Correct button order in settings dialog
|
||||
- Handle font change events in dialog
|
||||
- Adjust feature item widget height calculation
|
||||
- Improve dialog sizing and remove unused event filter
|
||||
|
||||
## [5.7.24] - 2025-10-16
|
||||
|
||||
### Added
|
||||
|
||||
- Support Qt 6.10
|
||||
|
||||
### Changed
|
||||
|
||||
- Translate dtkwidget.ts in sq
|
||||
|
||||
### Fixed
|
||||
|
||||
- Clear DCi icon state when setting other icon types
|
||||
|
||||
## [5.7.23] - 2025-09-25
|
||||
|
||||
### Changed
|
||||
|
||||
- Enhance window effect support detection
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix search icon color inconsistency in DSearchEdit
|
||||
|
||||
## [5.7.22] - 2025-09-04
|
||||
|
||||
### Changed
|
||||
|
||||
- I18n: [dtkwidget] Updates for project Deepin Tool Kit (#681)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Prevent potential tab index out of bounds crash
|
||||
|
||||
## [5.7.21] - 2025-08-14
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Maintainer: justforlxz <justforlxz@gmail.com>
|
||||
pkgname=dtkwidget-git
|
||||
pkgver=5.7.21
|
||||
pkgver=5.7.25
|
||||
pkgrel=1
|
||||
sourcename=dtkwidget
|
||||
sourcetars=("$sourcename"_"$pkgver".tar.xz)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,27 @@
|
|||
dtkwidget (5.7.25) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.25
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 30 Oct 2025 21:45:45 +0800
|
||||
|
||||
dtkwidget (5.7.24) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.24
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 16 Oct 2025 19:45:32 +0800
|
||||
|
||||
dtkwidget (5.7.23) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.23
|
||||
|
||||
-- yeshanshan <packages@deepin.org> Thu, 25 Sep 2025 16:49:19 +0800
|
||||
|
||||
dtkwidget (5.7.22) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.22
|
||||
|
||||
-- yeshanshan <yeshanshan@uniontech.com> Thu, 04 Sep 2025 19:27:01 +0800
|
||||
|
||||
dtkwidget (5.7.21) unstable; urgency=medium
|
||||
|
||||
* Release 5.7.21
|
||||
|
|
|
|||
|
|
@ -49,6 +49,13 @@ find_package(PkgConfig REQUIRED)
|
|||
|
||||
if("${QT_VERSION_MAJOR}" STREQUAL "5")
|
||||
find_package(Qt5 REQUIRED COMPONENTS X11Extras)
|
||||
elseif("${QT_VERSION_MAJOR}" STREQUAL "6")
|
||||
if (${Qt6Core_VERSION} VERSION_GREATER_EQUAL "6.10.0")
|
||||
set(QT_NO_PRIVATE_MODULE_WARNING ON)
|
||||
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate WidgetsPrivate PrintSupportPrivate)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported Qt Version: ${QT_VERSION_MAJOR}")
|
||||
endif()
|
||||
|
||||
file(GLOB D_HEADERS "${PROJECT_SOURCE_DIR}/include/DWidget/*")
|
||||
|
|
|
|||
|
|
@ -239,6 +239,7 @@ public:
|
|||
static void setFrameRadius(QWidget *widget, int radius);
|
||||
static void setUncheckedItemIndicatorVisible(QWidget *widget, bool visible);
|
||||
static void setRedPointVisible(QObject *object, bool visible);
|
||||
static void setLineEditIconMargin(QObject *object, int margin);
|
||||
|
||||
static void setShortcutUnderlineVisible(bool visible);
|
||||
static bool shortcutUnderlineVisible();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
Name: dtkwidget
|
||||
Version: 5.7.21
|
||||
Version: 5.7.25
|
||||
Release: 1%{?dist}
|
||||
Summary: Deepin tool kit widget modules
|
||||
License: LGPLv3+
|
||||
|
|
|
|||
|
|
@ -659,12 +659,12 @@ SPDX-License-Identifier: LGPL-3.0-or-later
|
|||
<message>
|
||||
<location filename="../widgets/dlineedit.cpp" line="526"/>
|
||||
<source>&Copy</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>コピー(&C)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widgets/dlineedit.cpp" line="529"/>
|
||||
<source>Cu&t</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>切り取り(&T)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widgets/dlineedit.cpp" line="534"/>
|
||||
|
|
|
|||
|
|
@ -659,12 +659,12 @@ SPDX-License-Identifier: LGPL-3.0-or-later
|
|||
<message>
|
||||
<location filename="../widgets/dlineedit.cpp" line="526"/>
|
||||
<source>&Copy</source>
|
||||
<translation>&Copiar</translation>
|
||||
<translation>Copiar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widgets/dlineedit.cpp" line="529"/>
|
||||
<source>Cu&t</source>
|
||||
<translation>Recor&tar</translation>
|
||||
<translation>Recortar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widgets/dlineedit.cpp" line="534"/>
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
|
|||
<message>
|
||||
<location filename="../widgets/dprintpreviewdialog.cpp" line="1470"/>
|
||||
<source>Input page numbers like this: 1,3,5-7,11-15,18,21</source>
|
||||
<translation>Numrat e faqeve jepni kështu: 1,3,5-7,11-15,18,21</translation>
|
||||
<translation>Numrat e faqeve jepini kështu: 1,3,5-7,11-15,18,21</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widgets/dprintpreviewdialog.cpp" line="1700"/>
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ void DButtonBoxButton::setIcon(const QIcon &icon)
|
|||
D_D(DButtonBoxButton);
|
||||
|
||||
d->iconType = -1;
|
||||
d->dciIcon = DDciIcon();
|
||||
QAbstractButton::setIcon(icon);
|
||||
}
|
||||
|
||||
|
|
@ -140,6 +141,7 @@ void DButtonBoxButton::setIcon(QStyle::StandardPixmap iconType)
|
|||
D_D(DButtonBoxButton);
|
||||
|
||||
d->iconType = iconType;
|
||||
d->dciIcon = DDciIcon();
|
||||
QAbstractButton::setIcon(style()->standardIcon(iconType, nullptr, this));
|
||||
}
|
||||
|
||||
|
|
@ -154,6 +156,7 @@ void DButtonBoxButton::setIcon(DStyle::StandardPixmap iconType)
|
|||
{
|
||||
D_D(DButtonBoxButton);
|
||||
|
||||
d->dciIcon = DDciIcon();
|
||||
d->iconType = iconType;
|
||||
QAbstractButton::setIcon(DStyleHelper(style()).standardIcon(iconType, nullptr, this));
|
||||
}
|
||||
|
|
@ -163,6 +166,7 @@ void DButtonBoxButton::setIcon(const DDciIcon &icon)
|
|||
D_D(DButtonBoxButton);
|
||||
|
||||
d->dciIcon = icon;
|
||||
QAbstractButton::setIcon(QIcon());
|
||||
}
|
||||
|
||||
DDciIcon DButtonBoxButton::dciIcon() const
|
||||
|
|
|
|||
|
|
@ -218,7 +218,10 @@ void DDialogPrivate::updateSize()
|
|||
if (!q->testAttribute(Qt::WA_Resized)) {
|
||||
QSize size = q->sizeHint();
|
||||
|
||||
size.setWidth(qMax(size.width(), DIALOG::DEFAULT_WIDTH));
|
||||
size.setWidth(qMin(q->maximumWidth(), qMax(size.width(), DIALOG::DEFAULT_WIDTH)));
|
||||
if (auto layout = q->layout()) {
|
||||
size.setHeight(layout->totalHeightForWidth(size.width()));
|
||||
}
|
||||
size.setHeight(qMax(size.height(), DIALOG::DEFAULT_HEIGHT));
|
||||
|
||||
q->resize(size);
|
||||
|
|
@ -1191,22 +1194,6 @@ void DDialog::keyPressEvent(QKeyEvent *event)
|
|||
|
||||
bool DDialog::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
Q_D(DDialog);
|
||||
|
||||
if (watched == d->messageLabel || watched == d->titleLabel) {
|
||||
if (event->type() == QEvent::FontChange) {
|
||||
QLabel *label = qobject_cast<QLabel *>(watched);
|
||||
|
||||
if (label && !label->text().isEmpty() && label->wordWrap()) {
|
||||
QSize sz = style()->itemTextRect(label->fontMetrics(), label->rect(), Qt::TextWordWrap, false, label->text()).size();
|
||||
|
||||
label->setMinimumHeight(qMax(sz.height(), label->sizeHint().height()));
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return DAbstractDialog::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
|
|
@ -1220,6 +1207,8 @@ void DDialog::changeEvent(QEvent *event)
|
|||
}
|
||||
}
|
||||
d->updateSize();
|
||||
} else if (event->type() == QEvent::FontChange) {
|
||||
d->updateSize();
|
||||
}
|
||||
return DAbstractDialog::changeEvent(event);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ DFeatureItemWidget::DFeatureItemWidget(const QIcon &icon, const QString &name,
|
|||
setMinimumWidth(360);
|
||||
auto fontMetrics = m_featureDescriptionLabel->fontMetrics();
|
||||
auto size = fontMetrics.size(Qt::TextShowMnemonic, description);
|
||||
setFixedHeight(size.width() <= DefaultTextLineWidth ? 66 : 86);
|
||||
setMinimumHeight(size.width() <= DefaultTextLineWidth ? 66 : 86);
|
||||
}
|
||||
|
||||
DFeatureItemWidget::~DFeatureItemWidget()
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ void DIconButton::setIcon(const QIcon &icon)
|
|||
{
|
||||
D_D(DIconButton);
|
||||
|
||||
d->dciIcon = DDciIcon();
|
||||
d->iconType = -1;
|
||||
QAbstractButton::setIcon(icon);
|
||||
}
|
||||
|
|
@ -82,6 +83,7 @@ void DIconButton::setIcon(QStyle::StandardPixmap iconType)
|
|||
{
|
||||
D_D(DIconButton);
|
||||
|
||||
d->dciIcon = DDciIcon();
|
||||
d->iconType = iconType;
|
||||
QAbstractButton::setIcon(style()->standardIcon(iconType, nullptr, this));
|
||||
}
|
||||
|
|
@ -95,6 +97,7 @@ void DIconButton::setIcon(DStyle::StandardPixmap iconType)
|
|||
{
|
||||
D_D(DIconButton);
|
||||
|
||||
d->dciIcon = DDciIcon();
|
||||
d->iconType = iconType;
|
||||
QAbstractButton::setIcon(DStyleHelper(style()).standardIcon(iconType, nullptr, this));
|
||||
}
|
||||
|
|
@ -105,6 +108,7 @@ void DIconButton::setIcon(const DDciIcon &icon)
|
|||
|
||||
d->iconType = -1;
|
||||
d->dciIcon = icon;
|
||||
QAbstractButton::setIcon(QIcon());
|
||||
this->update();
|
||||
this->updateGeometry();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ void ColorButton::paintEvent(QPaintEvent *)
|
|||
}
|
||||
}
|
||||
|
||||
static bool supportWindowEffect()
|
||||
{
|
||||
return DWindowManagerHelper::instance()->hasComposite() && DWindowManagerHelper::instance()->hasBlurWindow();
|
||||
}
|
||||
DPrintPickColorWidget::DPrintPickColorWidget(QWidget *parent)
|
||||
: DWidget(parent)
|
||||
, pinterface(nullptr)
|
||||
|
|
@ -115,7 +119,7 @@ void DPrintPickColorWidget::initUI()
|
|||
pickColorBtn->setFixedSize(55, 36);
|
||||
pickColorBtn->setIcon(DIconTheme::findQIcon("dorpper_normal"));
|
||||
pickColorBtn->setIconSize(QSize(32, 32));
|
||||
pickColorBtn->setEnabled(DWindowManagerHelper::instance()->hasComposite());
|
||||
pickColorBtn->setEnabled(supportWindowEffect());
|
||||
rgbPickColorLayout->addWidget(rgbLabel);
|
||||
rgbPickColorLayout->addWidget(rEdit);
|
||||
rgbPickColorLayout->addWidget(gEdit);
|
||||
|
|
@ -162,7 +166,10 @@ void DPrintPickColorWidget::initConnection()
|
|||
|
||||
connect(valueLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotEditColor(QString)));
|
||||
connect(DWindowManagerHelper::instance(), &DWindowManagerHelper::hasCompositeChanged, this, [this]() {
|
||||
this->pickColorBtn->setEnabled(DWindowManagerHelper::instance()->hasComposite());
|
||||
this->pickColorBtn->setEnabled(supportWindowEffect());
|
||||
});
|
||||
connect(DWindowManagerHelper::instance(), &DWindowManagerHelper::hasBlurWindowChanged, this, [this]() {
|
||||
this->pickColorBtn->setEnabled(supportWindowEffect());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#endif
|
||||
|
||||
#include <QAction>
|
||||
#include <QWidgetAction>
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
#include <QLabel>
|
||||
|
|
@ -292,21 +293,27 @@ void DSearchEditPrivate::init()
|
|||
{
|
||||
D_Q(DSearchEdit);
|
||||
label = new QLabel;
|
||||
DIconButton *iconbtn = new DIconButton(DStyle::SP_IndicatorSearch);
|
||||
|
||||
iconbtn->setFlat(true);
|
||||
iconbtn->setFocusPolicy(Qt::NoFocus);
|
||||
iconbtn->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
iconbtn->setAccessibleName("DSearchEditIconButton");
|
||||
auto createSearchIconButton = []() {
|
||||
DIconButton *iconbtn = new DIconButton(DStyle::SP_IndicatorSearch);
|
||||
iconbtn->setFlat(true);
|
||||
iconbtn->setFocusPolicy(Qt::NoFocus);
|
||||
iconbtn->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
iconbtn->setAccessibleName("DSearchEditIconButton");
|
||||
iconbtn->setIconSize(QSize(20, 20));
|
||||
return iconbtn;
|
||||
};
|
||||
|
||||
auto iconbtn = createSearchIconButton();
|
||||
|
||||
placeHolder = qApp->translate("DSearchEdit", "Search");
|
||||
|
||||
action = new QAction(q);
|
||||
action = new QWidgetAction(q);
|
||||
action->setObjectName("_d_search_leftAction");
|
||||
action->setIcon(DIconTheme::findQIcon("search_indicator"));
|
||||
auto iconAction = createSearchIconButton();
|
||||
action->setDefaultWidget(iconAction);
|
||||
q->lineEdit()->addAction(action, QLineEdit::LeadingPosition);
|
||||
action->setVisible(false);
|
||||
iconbtn->setIconSize(QSize(20, 20));
|
||||
action->defaultWidget()->setVisible(false);
|
||||
|
||||
DPalette pe;
|
||||
QStyleOption opt;
|
||||
|
|
@ -405,7 +412,7 @@ void DSearchEditPrivate::_q_toEditMode(bool focus)
|
|||
q->lineEdit()->setTextMargins(textMargins);
|
||||
if (animation->direction() == QPropertyAnimation::Direction::Forward) {
|
||||
iconWidget->setVisible(false);
|
||||
action->setVisible(true);
|
||||
action->defaultWidget()->setVisible(true);
|
||||
lineEdit->setPlaceholderText(placeholderText);
|
||||
} else {
|
||||
iconWidget->setVisible(true);
|
||||
|
|
@ -420,7 +427,7 @@ void DSearchEditPrivate::_q_toEditMode(bool focus)
|
|||
if (focus) {
|
||||
animation->setDirection(QPropertyAnimation::Direction::Forward);
|
||||
} else {
|
||||
action->setVisible(false);
|
||||
action->defaultWidget()->setVisible(false);
|
||||
animation->setDirection(QPropertyAnimation::Direction::Backward);
|
||||
}
|
||||
|
||||
|
|
@ -429,11 +436,11 @@ void DSearchEditPrivate::_q_toEditMode(bool focus)
|
|||
animation->start();
|
||||
} else {
|
||||
if (focus || !q->lineEdit()->text().isEmpty()) {
|
||||
action->setVisible(true);
|
||||
action->defaultWidget()->setVisible(true);
|
||||
iconWidget->setVisible(false);
|
||||
lineEdit->setPlaceholderText(placeholderText);
|
||||
} else {
|
||||
action->setVisible(false);
|
||||
action->defaultWidget()->setVisible(false);
|
||||
iconWidget->setVisible(true);
|
||||
lineEdit->setPlaceholderText(QString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public:
|
|||
setMessage(str);
|
||||
cancel->setAccessibleName("ChangeDDialogCancelButton");
|
||||
replace->setAccessibleName("ChangeDDialogReplaceButton");
|
||||
insertButton(1, cancel);
|
||||
insertButton(0, cancel);
|
||||
insertButton(1, replace);
|
||||
connect(replace, &DSuggestButton::clicked, [ = ] { //替换
|
||||
auto value = shortcutMap.value(key);
|
||||
|
|
|
|||
|
|
@ -171,6 +171,11 @@ void DStyle::setRedPointVisible(QObject *object, bool visible)
|
|||
object->setProperty("_d_menu_item_redpoint", visible);
|
||||
}
|
||||
|
||||
void DStyle::setLineEditIconMargin(QObject *object, int margin)
|
||||
{
|
||||
object->setProperty("_d_dtk_lineeditIconMargin", margin);
|
||||
}
|
||||
|
||||
void DStyle::setShortcutUnderlineVisible(bool visible)
|
||||
{
|
||||
qApp->setProperty("_d_menu_underlineshortcut", visible);
|
||||
|
|
@ -2255,6 +2260,20 @@ int DStyle::pixelMetric(QStyle::PixelMetric m, const QStyleOption *opt, const QW
|
|||
return 16;
|
||||
case PM_MenuButtonIndicator:
|
||||
return DSizeModeHelper::element(8, QCommonStyle::pixelMetric(m, opt, widget));
|
||||
// since Qt 6.3 or applied patch Add-setting-thc-ICON-size-attribute-in-lineedit-to-the-style-plugin.patch( uos or deepin).
|
||||
case PM_LineEditIconMargin: {
|
||||
if (widget) {
|
||||
const QVariant &margin_value = widget->property("_d_dtk_lineeditIconMargin");
|
||||
if (margin_value.isValid()) {
|
||||
bool ok = false;
|
||||
int margin = margin_value.toInt(&ok);
|
||||
if (ok && margin >= 0) {
|
||||
return margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
case PM_FloatingButtonFrameMargin:
|
||||
return 3;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -687,6 +687,7 @@ void DTabBarPrivate::layoutTab(int index)
|
|||
Q_ASSERT(index >= 0);
|
||||
QTabBarPrivate *d = reinterpret_cast<QTabBarPrivate *>(qGetPtrHelper(d_ptr));
|
||||
QTabBarPrivate::Tab *tab = d->at(index);
|
||||
Q_ASSERT(tab);
|
||||
bool vertical = dtk_verticalTabs(d->shape);
|
||||
|
||||
if (!(tab->leftWidget || tab->rightWidget))
|
||||
|
|
@ -1279,7 +1280,7 @@ void DTabBarPrivate::paintEvent(QPaintEvent *e)
|
|||
}
|
||||
|
||||
// Draw the selected tab last to get it "on top"
|
||||
if (selected >= 0) {
|
||||
if (selected >= 0 && d->validIndex(selected)) {
|
||||
QStyleOptionTab tab;
|
||||
initStyleOption(&tab, selected);
|
||||
// 强制让文本居中
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAudioInput;
|
||||
class QWidgetAction;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
DWIDGET_BEGIN_NAMESPACE
|
||||
|
|
@ -32,7 +33,7 @@ public:
|
|||
void _q_clearFocus();
|
||||
|
||||
public:
|
||||
QAction *action;
|
||||
QWidgetAction *action;
|
||||
QString placeHolder;
|
||||
QString placeholderText;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,10 +78,6 @@ Navigation::Navigation(QWidget *parent) :
|
|||
d->navbar->setContentsMargins(0, 0, 0, 0);
|
||||
d->navbar->setAutoFillBackground(true);
|
||||
d->navbar->setViewportMargins(10, 0, 10, 0);
|
||||
DPalette pa = DPaletteHelper::instance()->palette(d->navbar);
|
||||
pa.setBrush(DPalette::ItemBackground, Qt::transparent);
|
||||
DPaletteHelper::instance()->setPalette(d->navbar, pa);
|
||||
|
||||
d->navbar->setSelectionMode(QListView::SingleSelection);
|
||||
d->navbar->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
|
|
@ -92,6 +88,9 @@ Navigation::Navigation(QWidget *parent) :
|
|||
d->navbar->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
d->navbar->setItemDelegate(new NavigationDelegate(d->navbar));
|
||||
|
||||
d->navbar->setItemSpacing(0);
|
||||
d->navbar->setBackgroundType(static_cast<DStyledItemDelegate::BackgroundType>(DStyledItemDelegate::RoundedBackground | DStyledItemDelegate::NoNormalState));
|
||||
|
||||
layout->addWidget(d->navbar);
|
||||
|
||||
connect(d->navbar->selectionModel(), &QItemSelectionModel::currentChanged, this, [=] (const QModelIndex ¤t) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue