Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit ea90d6b9 authored by LE BRETON Come's avatar LE BRETON Come
Browse files

Merge branch 'develop' into...

Merge branch 'develop' into 66-improvement-factorize-the-code-of-dtkwidgetsparameterfilesave-and-dtkwidgetsparameterfilebrowser
parents 4b252428 d0ec1d0b
Pipeline #186190 passed with stage
in 0 seconds
# ChangeLog
## version 2.24.0 - 2020-10-01
- display doc and path in the tooltip, according if both, either one or none is available
- save button can be defined as read-only
- support multiple menubars: bugfix #67
- support multiple menubars: bugfix #68
## version 2.23.1 - 2020-05-28
- fix workspace: we must leave previous workspace before creating a new one
- apply theme in workspaceBar (also raise font size of popup menu) and dtkWidgetsHUDInfo
## version 2.23.0 - 2020-04-30
- expose parameter menubar widgets
## version 2.22.2 - 2020-04-27
......
......@@ -23,7 +23,7 @@ project(dtkWidgets)
## ###################################################################
set(${PROJECT_NAME}_VERSION_MAJOR 2)
set(${PROJECT_NAME}_VERSION_MINOR 23)
set(${PROJECT_NAME}_VERSION_MINOR 24)
set(${PROJECT_NAME}_VERSION_PATCH 0)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
......
......@@ -11,7 +11,6 @@ build:
requirements:
build:
- cmake >=3.14.0
- binutils_impl_linux-64<2.31.0 # [linux]
- {{ compiler('cxx') }}
- {{ cdt('xorg-x11-proto-devel') }} # [linux]
- {{ cdt('mesa-libgl-devel') }} # [linux]
......
......@@ -14,6 +14,7 @@
#include "dtkWidgetsHUDInfo.h"
#include <dtkThemes/dtkThemesEngine>
#include <QtGui>
// ///////////////////////////////////////////////////////////////////
......@@ -52,10 +53,13 @@ void dtkWidgetsHUDInfo::paintEvent(QPaintEvent *event)
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
painter.setPen(QColor("#cc2d2e2e"));
painter.setBrush(QColor("#cc2d2e2e"));
QColor fg = dtkThemesEngine::instance()->color("@fgalt");
QColor bg = dtkThemesEngine::instance()->color("@bgalt");
painter.setPen(bg);
painter.setBrush(bg);
painter.drawRoundedRect(event->rect(), 25 + 2, 25 + 2);
painter.setPen(QColor("#bebfbf"));
painter.setPen(fg);
painter.drawText(event->rect(), d->text, QTextOption(Qt::AlignCenter));
QFrame::paintEvent(event);
......
......@@ -398,8 +398,6 @@ void dtkWidgetsMenuBarContainerSlide::touch(const QVector<dtkWidgetsMenu *>& men
// dtkWidgetsMenuBarContainer implementation
// ///////////////////////////////////////////////////////////////////
QList<dtkWidgetsMenu *> stack;
dtkWidgetsMenuBarContainer::dtkWidgetsMenuBarContainer(QWidget *parent) : dtkWidgetsOverlayPane(parent)
{
this->slider = new dtkWidgetsOverlayPaneSlider;
......@@ -418,8 +416,8 @@ dtkWidgetsMenuBarContainer::dtkWidgetsMenuBarContainer(QWidget *parent) : dtkWid
return;
dtkWidgetsMenu *menu = nullptr;
if (::stack.count())
menu = ::stack.takeLast();
if (this->stack.count())
menu = this->stack.takeLast();
this->switchToPrevSlide(menu);
});
......@@ -430,6 +428,11 @@ dtkWidgetsMenuBarContainer::~dtkWidgetsMenuBarContainer(void)
}
int dtkWidgetsMenuBarContainer::stackCount(void) const
{
return stack.count();
}
void dtkWidgetsMenuBarContainer::setCurrentIndex(int index, std::function<void ()>& callback)
{
if (this->slider->is_in_transition)
......@@ -450,7 +453,7 @@ void dtkWidgetsMenuBarContainer::setCurrentIndex(int index, std::function<void (
this->slider->setCurrentIndex(index, ca);
};
if (::stack.count())
if (this->stack.count())
this->switchToRoot(cb);
else
cb();
......@@ -466,10 +469,10 @@ void dtkWidgetsMenuBarContainer::switchToRoot(std::function<void(void)> &callbac
this->slider->enableSpying(false);
this->slider->blockSignals(true);
static std::function<void(void)> cb = [=](void) -> void
std::function<void(void)> cb = [=](void) -> void
{
while (!::stack.isEmpty())
this->slider->remSlide(this->slides[::stack.takeLast()]);
while (!this->stack.isEmpty())
this->slider->remSlide(this->slides[this->stack.takeLast()]);
callback();
......@@ -488,8 +491,8 @@ void dtkWidgetsMenuBarContainer::switchToPrevSlide(dtkWidgetsMenu *m)
if (m)
emit q->left(m);
if (::stack.count())
this->navigator->setMenu(::stack.last());
if (this->stack.count())
this->navigator->setMenu(this->stack.last());
else
this->navigator->setMenu(0);
......@@ -506,8 +509,8 @@ void dtkWidgetsMenuBarContainer::switchToPrevSlide(dtkWidgetsMenu *m)
this->slider->slideToPrevious(callback);
}
if(::stack.count())
emit q->entered(::stack.last());
if(this->stack.count())
emit q->entered(this->stack.last());
}
void dtkWidgetsMenuBarContainer::switchToNextSlide(dtkWidgetsMenu *m)
......@@ -515,15 +518,15 @@ void dtkWidgetsMenuBarContainer::switchToNextSlide(dtkWidgetsMenu *m)
if (this->slider->is_in_transition)
return;
if(::stack.count())
emit q->left(::stack.last());
if(this->stack.count())
emit q->left(this->stack.last());
this->slider->addSlide(fa::cogs, this->slides[m]);
this->slider->slideToNext();
this->navigator->setMenu(m);
::stack << m;
this->stack << m;
emit q->entered(m);
}
......@@ -533,7 +536,7 @@ void dtkWidgetsMenuBarContainer::touch(void)
if (this->slider->is_in_transition)
return;
::stack.clear();
this->stack.clear();
navigator->setMenu(0);
this->master_slide->touch(this->master_menus, this);
}
......@@ -543,7 +546,7 @@ void dtkWidgetsMenuBarContainer::touch(dtkWidgetsMenuBar *mb)
if (this->slider->is_in_transition)
return;
::stack.clear();
this->stack.clear();
navigator->setMenu(0);
if(!this->master_slide) {
......@@ -576,7 +579,7 @@ void dtkWidgetsMenuBarContainer::decr(void)
this->slider->decr();
::stack.takeLast();
this->stack.takeLast();
}
void dtkWidgetsMenuBarContainer::build(const QVector<dtkWidgetsMenu *>& menus)
......@@ -1123,7 +1126,7 @@ QDebug operator<<(QDebug debug, const dtkWidgetsMenuBar &c)
{
debug << "MenuBar state in ";
debug << "d->layout->count() = " << c.d->layout->count();
debug << "::stack.count() = " << ::stack.count();
debug << "d->c->stackCount() = " << c.d->c->stackCount();
//c.d->c->slider->print();
return debug;
}
......@@ -1132,7 +1135,7 @@ QDebug operator<<(QDebug debug, dtkWidgetsMenuBar *c)
{
debug << "MenuBar state in ";
debug << "d->layout->count() = " << c->d->layout->count();
debug << "::stack.count() = " << ::stack.count();
debug << "d->c->stackCount() = " << c->d->c->stackCount();
//c->d->c->slider->print();
return debug;
}
......
......@@ -83,11 +83,13 @@ public:
public:
QVector<dtkWidgetsMenu *> master_menus;
int stackCount(void) const;
// /////////////////////////////////////////////////////////////////////////////
private:
friend class dtkWidgetsMenuBarButton;
QList<dtkWidgetsMenu *> stack;
};
// ///////////////////////////////////////////////////////////////////
......
......@@ -33,6 +33,9 @@ public:
tooltip += QString("Doc: %1").arg(doc);
}
if (!path.isEmpty()) {
if (!tooltip.isEmpty()) {
tooltip += "\n";
}
tooltip += QString("Path: %1").arg(path);
}
push_button->setToolTip( tooltip );
......
......@@ -15,6 +15,7 @@
#include "dtkWidgetsParameterFileBrowse.h"
#include <QtWidgets>
#include <QStringBuilder>
dtkWidgetsParameterFileBrowse::dtkWidgetsParameterFileBrowse(QWidget* parent) : dtkWidgetsParameterBrowse(parent)
{}
......
......@@ -17,6 +17,7 @@
#include "dtkWidgetsParameterFileSave.h"
#include <QtWidgets>
#include <QStringBuilder>
dtkWidgetsParameterFileSave::dtkWidgetsParameterFileSave(QWidget* parent) : dtkWidgetsParameterBrowse(parent)
{}
......
......@@ -116,6 +116,12 @@ void dtkWidgetsWorkspaceBarPrivate::createWorkspace(const QColor& color, const Q
q->setTabText(index, name);
q->setTabTextColor(index, color.isValid() ? color : dtkThemesEngine::instance()->color("@fg"));
connect(dtkThemesEngine::instance(), &dtkThemesEngine::changed,
[=] () {
q->setTabTextColor(index, color.isValid() ? color : dtkThemesEngine::instance()->color("@fg"));
});
this->workspace_map.insert(index, workspace);
q->repaint();
......@@ -273,15 +279,22 @@ void dtkWidgetsWorkspaceBar::createWorkspace(const QString& type)
void dtkWidgetsWorkspaceBar::createWorkspace(const QString &name, const QString& type, bool display_destroy)
{
dtkWidgetsWorkspace *workspace = dtk::widgets::workspace::pluginFactory().create(type);
// the leave() must be done BEFORE changing d->current_workspace (which is what d->createWorkspace DOES!!)
// and before creating new workspace
if (d->current_workspace)
d->current_workspace->leave();
workspace->setObjectName(name);
dtkWidgetsWorkspace *workspace = dtk::widgets::workspace::pluginFactory().create(type);
if (!workspace) {
qWarning() << "can't create workspace of type" << type << dtk::widgets::workspace::pluginFactory().keys();
if (d->current_workspace)
d->current_workspace->enter();
return;
}
workspace->setObjectName(name);
// the leave() must be done BEFORE changing d->current_workspace (which is what d->createWorkspace DOES!!)
if (d->current_workspace)
d->current_workspace->leave();
......
......@@ -57,6 +57,8 @@ Rectangle {
color: theme.value("@fg");
font.pointSize: 12;
Image {
anchors.verticalCenter: parent.verticalCenter;
anchors.right: parent.right;
......@@ -79,7 +81,7 @@ Rectangle {
text: description;
font.pointSize: 9;
font.pointSize: 12;
wrapMode: TextEdit.WordWrap;
}
......@@ -150,6 +152,8 @@ Rectangle {
color: theme.value("@fg");
text: "Choose package";
font.pointSize: 12;
}
Image {
......
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