Skip to content

Commit

Permalink
upstream updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kupiqu committed Dec 29, 2019
1 parent 523d31e commit 0644181
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 98 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

project(sierrabreezeenhanced)
set(PROJECT_VERSION "0.8.8")
set(PROJECT_VERSION "0.8.9")
set(PROJECT_VERSION_MAJOR 0)

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
Expand Down Expand Up @@ -34,7 +34,7 @@ find_package(Qt5 CONFIG REQUIRED COMPONENTS DBus)
find_package(XCB COMPONENTS XCB)
set_package_properties(XCB PROPERTIES
DESCRIPTION "X protocol C-language Binding"
URL "http://xcb.freedesktop.org"
URL "https://xcb.freedesktop.org/"
TYPE OPTIONAL
PURPOSE "Required to pass style properties to native Windows on X11 Platform"
)
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.9
---------

* added upstream updates from Breeze theme

V0.8.8
---------

Expand Down
11 changes: 11 additions & 0 deletions breeze.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ namespace Breeze

};

//* standard pen widths
namespace PenWidth
{
/* Using 1 instead of slightly more than 1 causes symbols drawn with
* pen strokes to look skewed. The exact amount added does not matter
* as long as it isn't too visible.
*/
// The standard pen stroke width for symbols.
static constexpr qreal Symbol = 1.01;
}

//* exception
enum ExceptionMask
{
Expand Down
153 changes: 78 additions & 75 deletions breezebutton.cpp

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions breezebutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

#include <QHash>
#include <QImage>
#include <QPropertyAnimation>

class QVariantAnimation;

namespace Breeze
{
Expand All @@ -35,9 +36,6 @@ namespace Breeze
{
Q_OBJECT

//* declare active state opacity
Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity )

public:

//* constructor
Expand Down Expand Up @@ -144,7 +142,7 @@ namespace Breeze
Flag m_flag = FlagNone;

//* active state change animation
QPropertyAnimation *m_animation;
QVariantAnimation *m_animation;

//* vertical offset (for rendering)
QPointF m_offset;
Expand Down
21 changes: 12 additions & 9 deletions breezedecoration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
#include <QPainter>
#include <QTextStream>
#include <QTimer>
#include <QDebug>
#include <QVariantAnimation>
// #include <QDebug>

#if BREEZE_HAVE_X11
#include <QX11Info>
Expand Down Expand Up @@ -183,7 +184,7 @@ namespace Breeze
//________________________________________________________________
Decoration::Decoration(QObject *parent, const QVariantList &args)
: KDecoration2::Decoration(parent, args)
, m_animation( new QPropertyAnimation( this ) )
, m_animation( new QVariantAnimation( this ) )
{
g_sDecoCount++;
}
Expand Down Expand Up @@ -288,7 +289,7 @@ namespace Breeze
outlineColor = titleBarColor.lighter(140);
}

if( m_animation->state() == QPropertyAnimation::Running )
if( m_animation->state() == QAbstractAnimation::Running )
{
// QColor outlineColor( c->palette().color( QPalette::Highlight ) );
outlineColor.setAlpha( outlineColor.alpha()*m_opacity );
Expand All @@ -306,7 +307,7 @@ namespace Breeze
QColor titleBarColor;

if ( !matchColorForTitleBar() ) {
if( m_animation->state() == QPropertyAnimation::Running )
if( m_animation->state() == QAbstractAnimation::Running )
{
titleBarColor = KColorUtils::mix(
c->color( ColorGroup::Inactive, ColorRole::TitleBar ),
Expand Down Expand Up @@ -373,11 +374,13 @@ namespace Breeze
auto c = client().data();

// active state change animation
m_animation->setStartValue( 0 );
// It is important start and end value are of the same type, hence 0.0 and not just 0
m_animation->setStartValue( 0.0 );
m_animation->setEndValue( 1.0 );
m_animation->setTargetObject( this );
m_animation->setPropertyName( "opacity" );
m_animation->setEasingCurve( QEasingCurve::InOutQuad );
connect(m_animation, &QVariantAnimation::valueChanged, this, [this](const QVariant &value) {
setOpacity(value.toReal());
});

reconfigure();
updateTitleBar();
Expand Down Expand Up @@ -445,8 +448,8 @@ namespace Breeze
{

auto c = client().data();
m_animation->setDirection( c->isActive() ? QPropertyAnimation::Forward : QPropertyAnimation::Backward );
if( m_animation->state() != QPropertyAnimation::Running ) m_animation->start();
m_animation->setDirection( c->isActive() ? QAbstractAnimation::Forward : QAbstractAnimation::Backward );
if( m_animation->state() != QAbstractAnimation::Running ) m_animation->start();

} else {

Expand Down
8 changes: 3 additions & 5 deletions breezedecoration.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
#include <KDecoration2/DecorationSettings>

#include <QPalette>
#include <QPropertyAnimation>
#include <QVariant>

class QVariantAnimation;

namespace KDecoration2
{
class DecorationButton;
Expand All @@ -47,9 +48,6 @@ namespace Breeze
{
Q_OBJECT

//* declare active state opacity
Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity )

public:

//* constructor
Expand Down Expand Up @@ -170,7 +168,7 @@ namespace Breeze
SizeGrip *m_sizeGrip = nullptr;

//* active state change animation
QPropertyAnimation *m_animation;
QVariantAnimation *m_animation;

//* active state change opacity
qreal m_opacity = 0;
Expand Down
2 changes: 1 addition & 1 deletion config/breezeexceptionlistwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace Breeze
m_ui.exceptionListView->setRootIsDecorated( false );
m_ui.exceptionListView->setSortingEnabled( false );
m_ui.exceptionListView->setModel( &model() );
m_ui.exceptionListView->sortByColumn( ExceptionModel::ColumnType );
m_ui.exceptionListView->sortByColumn( ExceptionModel::ColumnType, Qt::AscendingOrder );
m_ui.exceptionListView->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Ignored ) );

m_ui.moveUpButton->setIcon( QIcon::fromTheme( QStringLiteral( "arrow-up" ) ) );
Expand Down
2 changes: 1 addition & 1 deletion config/breezelistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace Breeze
//! flags
Qt::ItemFlags flags(const QModelIndex &index) const override
{
if (!index.isValid()) return nullptr;
if (!index.isValid()) return Qt::NoItemFlags;
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
}

Expand Down

0 comments on commit 0644181

Please sign in to comment.