Skip to content

Commit

Permalink
V0.8.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Salva Ardid committed Mar 17, 2020
1 parent c038b4e commit 87157ce
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 67 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

project(sierrabreezeenhanced)
set(PROJECT_VERSION "0.8.10")
set(PROJECT_VERSION "0.8.11")
set(PROJECT_VERSION_MAJOR 0)

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
V0.8.11
---------

* Changes to be in sync with upstream Breeze

V0.8.10
---------

Expand Down
1 change: 0 additions & 1 deletion breezedecoration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <QTextStream>
#include <QTimer>
#include <QVariantAnimation>
// #include <QDebug>

#if BREEZE_HAVE_X11
#include <QX11Info>
Expand Down
2 changes: 1 addition & 1 deletion breezesettingsprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace Breeze

private:

//* contructor
//* constructor
SettingsProvider();

//* default configuration
Expand Down
4 changes: 2 additions & 2 deletions breezesizegrip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace Breeze
case Qt::RightButton:
{
hide();
QTimer::singleShot(5000, this, SLOT(show()));
QTimer::singleShot(5000, this, &QWidget::show);
break;
}

Expand All @@ -181,7 +181,7 @@ namespace Breeze

}


}

//_______________________________________________________________________________
Expand Down
24 changes: 12 additions & 12 deletions config/breezeconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,34 @@ namespace Breeze
connect( m_ui.buttonSize, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.buttonSpacing, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.buttonPadding, SIGNAL(valueChanged(int)), SLOT(updateChanged()) );
connect( m_ui.unisonHovering, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.unisonHovering, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.cornerRadiusSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.drawBorderOnMaximizedWindows, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawSizeGrip, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.opaqueTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawBackgroundGradient, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawBorderOnMaximizedWindows, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.drawSizeGrip, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.opaqueTitleBar, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.drawBackgroundGradient, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.buttonStyle, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.opacitySpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.gradientSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.drawTitleBarSeparator, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawTitleBarSeparator, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.hideTitleBar, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.matchColorForTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.matchColorForTitleBar, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );

// track animations changes
connect( m_ui.animationsEnabled, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.animationsEnabled, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.animationsDuration, SIGNAL(valueChanged(int)), SLOT(updateChanged()) );

// track shadows changes
connect( m_ui.shadowSize, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.shadowStrength, SIGNAL(valueChanged(int)), SLOT(updateChanged()) );
connect( m_ui.shadowColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.specificShadowsInactiveWindows, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.shadowColor, &KColorButton::changed, this, &ConfigWidget::updateChanged );
connect( m_ui.specificShadowsInactiveWindows, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged );
connect( m_ui.shadowSizeInactiveWindows, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.shadowStrengthInactiveWindows, SIGNAL(valueChanged(int)), SLOT(updateChanged()) );
connect( m_ui.shadowColorInactiveWindows, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.shadowColorInactiveWindows, &KColorButton::changed, this, &ConfigWidget::updateChanged );

// track exception changes
connect( m_ui.exceptions, SIGNAL(changed(bool)), SLOT(updateChanged()) );
connect( m_ui.exceptions, &ExceptionListWidget::changed, this, &ConfigWidget::updateChanged );

}

Expand Down
4 changes: 2 additions & 2 deletions config/breezedetectwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace Breeze
// setup
m_ui.setupUi( this );

connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), SIGNAL(clicked()), this, SLOT(close()) );
connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QWidget::close );
m_ui.windowClassCheckBox->setChecked( true );

#if BREEZE_HAVE_X11
Expand Down Expand Up @@ -127,7 +127,7 @@ namespace Breeze
if( o != m_grabber ) return false;
if( e->type() != QEvent::MouseButtonRelease ) return false;

// need to explicitely release cursor for Qt5
// need to explicitly release cursor for Qt5
qApp->restoreOverrideCursor();

// delete old m_grabber
Expand Down
20 changes: 10 additions & 10 deletions config/breezeexceptiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,32 @@ namespace Breeze

m_ui.setupUi( this );

connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), SIGNAL(clicked()), this, SLOT(close()) );
connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QWidget::close );

// store checkboxes from ui into list
m_checkboxes.insert( BorderSize, m_ui.borderSizeCheckBox );

// detect window properties
connect( m_ui.detectDialogButton, SIGNAL(clicked()), SLOT(selectWindowProperties()) );
connect( m_ui.detectDialogButton, &QAbstractButton::clicked, this, &QWidget::close );

// connections
connect( m_ui.exceptionType, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.exceptionEditor, SIGNAL(textChanged(QString)), SLOT(updateChanged()) );
connect( m_ui.exceptionEditor, &QLineEdit::textChanged, this, &ExceptionDialog::updateChanged );
connect( m_ui.borderSizeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );

for( CheckBoxMap::iterator iter = m_checkboxes.begin(); iter != m_checkboxes.end(); ++iter )
{ connect( iter.value(), SIGNAL(clicked()), SLOT(updateChanged()) ); }
{ connect( iter.value(), &QAbstractButton::clicked, this, &ExceptionDialog::updateChanged ); }

connect( m_ui.hideTitleBar, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.matchColorForTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawTitleBarSeparator, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawBackgroundGradient, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.matchColorForTitleBar, &QAbstractButton::clicked, this, &QWidget::close );
connect( m_ui.drawTitleBarSeparator, &QAbstractButton::clicked, this, &QWidget::close );
connect( m_ui.drawBackgroundGradient, &QAbstractButton::clicked, this, &QWidget::close );
m_ui.gradientOverrideLabelSpinBox->setSpecialValueText(tr("None"));
connect( m_ui.gradientOverrideLabelSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.opaqueTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.opaqueTitleBar, &QAbstractButton::clicked, this, &QWidget::close );
m_ui.opacityOverrideLabelSpinBox->setSpecialValueText(tr("None"));
connect( m_ui.opacityOverrideLabelSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.isDialog, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.isDialog, &QAbstractButton::clicked, this, &QWidget::close );

// hide detection dialog on non X11 platforms
#if BREEZE_HAVE_X11
Expand Down Expand Up @@ -170,7 +170,7 @@ namespace Breeze
if( !m_detectDialog )
{
m_detectDialog = new DetectDialog( this );
connect( m_detectDialog, SIGNAL(detectionDone(bool)), SLOT(readWindowProperties(bool)) );
connect( m_detectDialog, &DetectDialog::detectionDone, this, &ExceptionDialog::readWindowProperties );
}

m_detectDialog->detect(0);
Expand Down
2 changes: 1 addition & 1 deletion config/breezeexceptiondialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace Breeze

Q_SIGNALS:

//* emmited when changed
//* emitted when changed
void changed( bool );

protected:
Expand Down
17 changes: 9 additions & 8 deletions config/breezeexceptionlistwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ namespace Breeze
m_ui.removeButton->setIcon( QIcon::fromTheme( QStringLiteral( "list-remove" ) ) );
m_ui.editButton->setIcon( QIcon::fromTheme( QStringLiteral( "edit-rename" ) ) );

connect( m_ui.addButton, SIGNAL(clicked()), SLOT(add()) );
connect( m_ui.editButton, SIGNAL(clicked()), SLOT(edit()) );
connect( m_ui.removeButton, SIGNAL(clicked()), SLOT(remove()) );
connect( m_ui.moveUpButton, SIGNAL(clicked()), SLOT(up()) );
connect( m_ui.moveDownButton, SIGNAL(clicked()), SLOT(down()) );
connect( m_ui.addButton, &QAbstractButton::clicked, this, &ExceptionListWidget::add );
connect( m_ui.editButton, &QAbstractButton::clicked, this, &ExceptionListWidget::edit );
connect( m_ui.removeButton, &QAbstractButton::clicked, this, &ExceptionListWidget::remove );
connect( m_ui.moveUpButton, &QAbstractButton::clicked, this, &ExceptionListWidget::up );
connect( m_ui.moveDownButton, &QAbstractButton::clicked, this, &ExceptionListWidget::down );

connect( m_ui.exceptionListView, SIGNAL(activated(QModelIndex)), SLOT(edit()) );
connect( m_ui.exceptionListView, SIGNAL(clicked(QModelIndex)), SLOT(toggle(QModelIndex)) );
connect( m_ui.exceptionListView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(updateButtons()) );
connect( m_ui.exceptionListView, &QAbstractItemView::activated, this, &ExceptionListWidget::edit );
connect( m_ui.exceptionListView, &QAbstractItemView::clicked, this, &ExceptionListWidget::toggle );
connect( m_ui.exceptionListView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ExceptionListWidget::updateButtons );

updateButtons();
resizeColumns();
Expand All @@ -86,6 +86,7 @@ namespace Breeze
InternalSettingsList ExceptionListWidget::exceptions()
{
return model().get();
setChanged( false );
}

//__________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion config/breezeitemmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace Breeze
void privateSort()
{ privateSort( m_sortColumn, m_sortOrder ); }

//* private sort, with no signals emmitted
//* private sort, with no signals emitted
virtual void privateSort( int column, Qt::SortOrder order ) = 0;

//* used to sort items in list
Expand Down
2 changes: 1 addition & 1 deletion config/breezelistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ namespace Breeze
}

//! return all values
const List& get() const
const List& get( void ) const
{ return _values; }

//! return value for given index
Expand Down
27 changes: 0 additions & 27 deletions libbreezecommon/breezeboxshadowrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,9 @@
// own
#include "breezeboxshadowrenderer.h"

// auto-generated
#include "config-breezecommon.h"

// Qt
#include <QPainter>

#ifdef BREEZE_COMMON_USE_KDE4
#include <QtCore/qmath.h>
#else
#include <QtMath>
#endif

namespace Breeze
{
Expand Down Expand Up @@ -96,10 +88,7 @@ static QVector<BoxLobes> computeLobes(int radius)
break;

default:
#if !BREEZE_COMMON_USE_KDE4
Q_UNREACHABLE();
#endif
break;
}

Q_ASSERT(major + minor + final == blurRadius);
Expand Down Expand Up @@ -258,16 +247,10 @@ static void renderShadow(QPainter *painter, const QRect &rect, qreal borderRadiu
const QSize inflation = calculateBlurExtent(radius);
const QSize size = rect.size() + 2 * inflation;

#if BREEZE_COMMON_USE_KDE4
const qreal dpr = 1.0;
#else
const qreal dpr = painter->device()->devicePixelRatioF();
#endif

QImage shadow(size * dpr, QImage::Format_ARGB32_Premultiplied);
#if !BREEZE_COMMON_USE_KDE4
shadow.setDevicePixelRatio(dpr);
#endif
shadow.fill(Qt::transparent);

QRect boxRect(QPoint(0, 0), rect.size());
Expand Down Expand Up @@ -335,30 +318,20 @@ QImage BoxShadowRenderer::render() const
}

QSize canvasSize;
#if BREEZE_COMMON_USE_KDE4
foreach (const Shadow &shadow, m_shadows) {
#else
for (const Shadow &shadow : qAsConst(m_shadows)) {
#endif
canvasSize = canvasSize.expandedTo(
calculateMinimumShadowTextureSize(m_boxSize, shadow.radius, shadow.offset));
}

QImage canvas(canvasSize * m_dpr, QImage::Format_ARGB32_Premultiplied);
#if !BREEZE_COMMON_USE_KDE4
canvas.setDevicePixelRatio(m_dpr);
#endif
canvas.fill(Qt::transparent);

QRect boxRect(QPoint(0, 0), m_boxSize);
boxRect.moveCenter(QRect(QPoint(0, 0), canvasSize).center());

QPainter painter(&canvas);
#if BREEZE_COMMON_USE_KDE4
foreach (const Shadow &shadow, m_shadows) {
#else
for (const Shadow &shadow : qAsConst(m_shadows)) {
#endif
renderShadow(&painter, boxRect, m_borderRadius, shadow.offset, shadow.radius, shadow.color);
}
painter.end();
Expand Down

0 comments on commit 87157ce

Please sign in to comment.