summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorleaeasy2018-04-23 10:57:39 +0800
committerleaeasy2018-04-23 11:00:08 +0800
commitbfcaa16c8f8c923f0a36836eaf01f244726e09bc (patch)
tree60bf7da45febecbe8c691d2a4310fcfb53149f25
parente37fabe7d3b2d1de8ab6ed371c2fc3cac68d0bc3 (diff)
downloadaur-konsole-blurry.tar.gz
update 18.04.0
-rw-r--r--.SRCINFO12
-rw-r--r--0001-add-blur-effect-when-set-transparency.patch47
-rw-r--r--0002-add-rainbows-support.patch211
-rw-r--r--0003-fix-qttab-default-style.patch36
-rw-r--r--PKGBUILD14
5 files changed, 284 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9169e04d0079..f915bf3e92d5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = konsole-blurry
pkgdesc = Konsole with blurry support
- pkgver = 16.12.2
+ pkgver = 18.04.0
pkgrel = 1
url = http://kde.org/applications/system/konsole/
arch = i686
@@ -20,10 +20,14 @@ pkgbase = konsole-blurry
provides = konsole
conflicts = kdebase-konsole<4.14.3-2
replaces = kdebase-konsole
- source = http://download.kde.org/stable/applications/16.12.2/src/konsole-16.12.2.tar.xz
+ source = http://download.kde.org/stable/applications/18.04.0/src/konsole-18.04.0.tar.xz
source = 0001-add-blur-effect-when-set-transparency.patch
- sha1sums = d889147f592bcdd40576756a4ba3a861807cee24
- sha1sums = b3f8b444181e8e6f60d15d160375c26804429e9b
+ source = 0002-add-rainbows-support.patch
+ source = 0003-fix-qttab-default-style.patch
+ sha1sums = b7b3ef35d3575d6a544e8b9f8a3f37d201f6f77c
+ sha1sums = c130165b09c0fe1b7ec81342ab6d33576a67e82b
+ sha1sums = 7eaa9b5a47e7d824283481c8c6262b6b78295813
+ sha1sums = 78348b2a4c2c2e9dc5d97b06d7f99c52aff1c9a8
pkgname = konsole-blurry
diff --git a/0001-add-blur-effect-when-set-transparency.patch b/0001-add-blur-effect-when-set-transparency.patch
index 66d19c11fb37..82067d18ab2b 100644
--- a/0001-add-blur-effect-when-set-transparency.patch
+++ b/0001-add-blur-effect-when-set-transparency.patch
@@ -1,40 +1,31 @@
-From 20e6d6223e3c14bf173edbf4633859146cb60a97 Mon Sep 17 00:00:00 2001
+From ffd6778743a5dd992f8dd195aa3d51b9c4a2ba80 Mon Sep 17 00:00:00 2001
From: leaeasy <leaeasy@gmail.com>
-Date: Sun, 23 Oct 2016 20:17:42 +0800
-Subject: [PATCH] add-blur-effect-when-set-transparency
+Date: Mon, 23 Apr 2018 10:37:14 +0800
+Subject: [PATCH 1/3] add blur effect when set transparency
---
- CMakeLists.txt | 3 ++-
+ CMakeLists.txt | 1 +
src/CMakeLists.txt | 2 ++
src/MainWindow.cpp | 11 +++++++++++
- 3 files changed, 15 insertions(+), 1 deletion(-)
+ 3 files changed, 14 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 18b6e49..51f7c0e 100644
+index ef79ae2..493a924 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -35,6 +35,7 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
+@@ -38,6 +38,7 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
+ DBus
PrintSupport
- Script
Widgets
+ X11Extras
)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
-@@ -42,7 +43,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
- CoreAddons Crash GuiAddons DBusAddons
- I18n IconThemes Init KIO Notifications NotifyConfig
- Parts Pty Service TextWidgets WidgetsAddons
-- WindowSystem XmlGui DBusAddons
-+ WindowSystem XmlGui DBusAddons
- )
-
- find_package(KF5DocTools ${KF5_MIN_VERSION})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 25f6e57..6077ed0 100644
+index fa15a52..1d8ab0c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -108,6 +108,7 @@ set(konsole_LIBS
+@@ -113,6 +113,7 @@ set(konsole_LIBS
KF5::XmlGui
Qt5::PrintSupport
Qt5::Xml
@@ -42,19 +33,19 @@ index 25f6e57..6077ed0 100644
KF5::Notifications
KF5::WindowSystem
KF5::TextWidgets
-@@ -118,6 +119,7 @@ set(konsole_LIBS
- KF5::Pty
- KF5::KIOWidgets
+@@ -125,6 +126,7 @@ set(konsole_LIBS
KF5::DBusAddons
-+ ${X11_LIBRARIES}
+ KF5::GlobalAccel
+ KF5::NewStuff
++ ${X11_LIBRARIES}
)
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
-index 803eeaf..dfca483 100644
+index e78858d..928eedd 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
-@@ -56,6 +56,12 @@
+@@ -59,6 +59,12 @@
#include "settings/ProfileSettings.h"
#include "settings/TabBarSettings.h"
@@ -66,8 +57,8 @@ index 803eeaf..dfca483 100644
+
using namespace Konsole;
- MainWindow::MainWindow()
-@@ -135,6 +141,11 @@ void MainWindow::updateUseTransparency()
+ MainWindow::MainWindow() :
+@@ -151,6 +157,11 @@ void MainWindow::updateUseTransparency()
setAttribute(Qt::WA_TranslucentBackground, useTranslucency);
setAttribute(Qt::WA_NoSystemBackground, false);
WindowSystemInfo::HAVE_TRANSPARENCY = useTranslucency;
@@ -80,5 +71,5 @@ index 803eeaf..dfca483 100644
void MainWindow::rememberMenuAccelerators()
--
-2.10.1
+2.17.0
diff --git a/0002-add-rainbows-support.patch b/0002-add-rainbows-support.patch
new file mode 100644
index 000000000000..e91794350ef1
--- /dev/null
+++ b/0002-add-rainbows-support.patch
@@ -0,0 +1,211 @@
+From aac1ca5fcb30a27f785a3a0156dfc8bbbfefb040 Mon Sep 17 00:00:00 2001
+From: leaeasy <leaeasy@gmail.com>
+Date: Mon, 23 Apr 2018 10:38:41 +0800
+Subject: [PATCH 2/3] add rainbows support
+
+---
+ src/EditProfileDialog.cpp | 9 +++++++++
+ src/EditProfileDialog.h | 1 +
+ src/EditProfileDialog.ui | 7 +++++++
+ src/Profile.cpp | 2 ++
+ src/Profile.h | 7 +++++++
+ src/TerminalDisplay.cpp | 13 +++++++++++++
+ src/TerminalDisplay.h | 15 +++++++++++++++
+ src/ViewManager.cpp | 1 +
+ 8 files changed, 55 insertions(+)
+
+diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp
+index 9548d64..081a80a 100644
+--- a/src/EditProfileDialog.cpp
++++ b/src/EditProfileDialog.cpp
+@@ -611,6 +611,9 @@ void EditProfileDialog::setupAppearancePage(const Profile::Ptr profile)
+ connect(_ui->useFontLineCharactersButton, &QCheckBox::toggled, this,
+ &Konsole::EditProfileDialog::useFontLineCharacters);
+
++ _ui->rainbowButton->setChecked(profile->rainbow());
++ connect(_ui->rainbowButton, &QCheckBox::toggled, this, &Konsole::EditProfileDialog::setRainbow);
++
+ _ui->enableMouseWheelZoomButton->setChecked(profile->mouseWheelZoomEnabled());
+ connect(_ui->enableMouseWheelZoomButton, &QCheckBox::toggled, this,
+ &Konsole::EditProfileDialog::toggleMouseWheelZoom);
+@@ -648,6 +651,12 @@ void EditProfileDialog::useFontLineCharacters(bool enable)
+ updateTempProfileProperty(Profile::UseFontLineCharacters, enable);
+ }
+
++void EditProfileDialog::setRainbow(bool enable)
++{
++ preview(Profile::Rainbow, enable);
++ updateTempProfileProperty(Profile::Rainbow, enable);
++}
++
+ void EditProfileDialog::toggleMouseWheelZoom(bool enable)
+ {
+ updateTempProfileProperty(Profile::MouseWheelZoomEnabled, enable);
+diff --git a/src/EditProfileDialog.h b/src/EditProfileDialog.h
+index cfc4cbd..ca64ae3 100644
+--- a/src/EditProfileDialog.h
++++ b/src/EditProfileDialog.h
+@@ -128,6 +128,7 @@ private Q_SLOTS:
+ void showAllFontsButtonWarning(bool enable);
+ void setAntialiasText(bool enable);
+ void setBoldIntense(bool enable);
++ void setRainbow(bool enable);
+ void useFontLineCharacters(bool enable);
+ void showFontDialog();
+ void newColorScheme();
+diff --git a/src/EditProfileDialog.ui b/src/EditProfileDialog.ui
+index 60dec9b..f73a76e 100644
+--- a/src/EditProfileDialog.ui
++++ b/src/EditProfileDialog.ui
+@@ -673,6 +673,13 @@
+ </property>
+ </widget>
+ </item>
++ <item>
++ <widget class="QCheckBox" name="rainbowButton">
++ <property name="text">
++ <string>Rainbow Powers!</string>
++ </property>
++ </widget>
++ </item>
+ </layout>
+ </widget>
+ </item>
+diff --git a/src/Profile.cpp b/src/Profile.cpp
+index d51a84c..ec2a674 100644
+--- a/src/Profile.cpp
++++ b/src/Profile.cpp
+@@ -81,6 +81,7 @@ const Profile::PropertyInfo Profile::DefaultPropertyNames[] = {
+ , { AntiAliasFonts, "AntiAliasFonts" , APPEARANCE_GROUP , QVariant::Bool }
+ , { BoldIntense, "BoldIntense", APPEARANCE_GROUP, QVariant::Bool }
+ , { UseFontLineCharacters, "UseFontLineChararacters", APPEARANCE_GROUP, QVariant::Bool }
++ , { Rainbow, "Rainbow", APPEARANCE_GROUP, QVariant::Bool }
+ , { LineSpacing , "LineSpacing" , APPEARANCE_GROUP , QVariant::Int }
+
+ // Keyboard
+@@ -211,6 +212,7 @@ void Profile::useFallback()
+ setProperty(AntiAliasFonts, true);
+ setProperty(BoldIntense, true);
+ setProperty(UseFontLineCharacters, false);
++ setProperty(Rainbow, false);
+
+ setProperty(WordCharacters, QStringLiteral(":@-./_~?&=%+#"));
+
+diff --git a/src/Profile.h b/src/Profile.h
+index 8b89342..f8c16a9 100644
+--- a/src/Profile.h
++++ b/src/Profile.h
+@@ -270,6 +270,8 @@ public:
+ */
+ MouseWheelZoomEnabled,
+ /** (int) Keyboard modifiers to show URL hints */
++ /** (bool) Whether characters have rainbow powers */
++ Rainbow,
+ UrlHintsModifiers
+ };
+
+@@ -538,6 +540,11 @@ public:
+ return property<bool>(Profile::BoldIntense);
+ }
+
++ /** Convenience method for property<bool>(Profile::Rainbow) */
++ bool rainbow() const {
++ return property<bool>(Profile::Rainbow);
++ }
++
+ /** Convenience method for property<bool>(Profile::UseFontLineCharacters)*/
+ bool useFontLineCharacters() const
+ {
+diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
+index ec48ffb..3620d10 100644
+--- a/src/TerminalDisplay.cpp
++++ b/src/TerminalDisplay.cpp
+@@ -21,6 +21,7 @@
+ */
+
+ // Own
++#include <cmath>
+ #include "TerminalDisplay.h"
+
+ // Config
+@@ -358,6 +359,7 @@ TerminalDisplay::TerminalDisplay(QWidget* parent)
+ , _fontWidth(1)
+ , _fontAscent(1)
+ , _boldIntense(true)
++ , _rainbow(false)
+ , _lines(1)
+ , _columns(1)
+ , _usedLines(1)
+@@ -1615,6 +1617,7 @@ void TerminalDisplay::drawContents(QPainter& paint, const QRect& rect)
+ const RenditionFlags currentRendition = _image[loc(x, y)].rendition;
+
+ while (x + len <= rlx &&
++ (!_rainbow || (_image[loc(x + len, y)].isSpace() && !_screenWindow->isSelected(x, y)) ) &&
+ _image[loc(x + len, y)].foregroundColor == currentForeground &&
+ _image[loc(x + len, y)].backgroundColor == currentBackground &&
+ (_image[loc(x + len, y)].rendition & ~RE_EXTENDED_CHAR) == (currentRendition & ~RE_EXTENDED_CHAR) &&
+@@ -1688,6 +1691,16 @@ void TerminalDisplay::drawContents(QPainter& paint, const QRect& rect)
+ //(instead of textArea.topLeft() * painter-scale)
+ textArea.moveTopLeft(textScale.inverted().map(textArea.topLeft()));
+
++ if ( _rainbow ) {
++ qreal hue = qreal(x) / _usedColumns;
++ qreal offset = sin(qreal(y) / _usedLines * M_PI * 2) + 1;
++ qreal factor = fmod(hue + offset, 1);
++ _image[loc(x, y)].foregroundColor =
++ CharacterColor(COLOR_SPACE_RGB,
++ QColor::fromHsvF(factor, 0.7, 1).rgba());
++ }
++
++
+ //paint text fragment
+ if (_printerFriendly) {
+ drawPrinterFriendlyTextFragment(paint,
+diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h
+index f6da500..940177a 100644
+--- a/src/TerminalDisplay.h
++++ b/src/TerminalDisplay.h
+@@ -449,6 +449,20 @@ public:
+ return _boldIntense;
+ }
+
++ /**
++ * Specified whether magical unicorn powers are enabled or not.
++ * Defaults to disabled.
++ */
++ void setRainbow(bool value) {
++ _rainbow = value;
++ }
++ /**
++ * Returns true if magical unicorn powers are enabled.
++ */
++ bool rainbow() const {
++ return _rainbow;
++ }
++
+ /**
+ * Specifies whether line characters will be displayed using font instead
+ * of builtin code.
+@@ -900,6 +914,7 @@ private:
+ int _fontWidth; // width
+ int _fontAscent; // ascend
+ bool _boldIntense; // Whether intense colors should be rendered with bold font
++ bool _rainbow; // Whether are we a magical unicorn
+
+ int _leftMargin; // offset
+ int _topMargin; // offset
+diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
+index dd97650..dc89b5c 100644
+--- a/src/ViewManager.cpp
++++ b/src/ViewManager.cpp
+@@ -890,6 +890,7 @@ void ViewManager::applyProfileToView(TerminalDisplay *view, const Profile::Ptr p
+ view->setAntialias(profile->antiAliasFonts());
+ view->setBoldIntense(profile->boldIntense());
+ view->setUseFontLineCharacters(profile->useFontLineCharacters());
++ view->setRainbow(profile->rainbow());
+ view->setVTFont(profile->font());
+
+ // set scroll-bar position
+--
+2.17.0
+
diff --git a/0003-fix-qttab-default-style.patch b/0003-fix-qttab-default-style.patch
new file mode 100644
index 000000000000..d314cf420f22
--- /dev/null
+++ b/0003-fix-qttab-default-style.patch
@@ -0,0 +1,36 @@
+diff --git a/src/settings/konsole.kcfg b/src/settings/konsole.kcfg
+index 44533d1..fa86095 100644
+--- a/src/settings/konsole.kcfg
++++ b/src/settings/konsole.kcfg
+@@ -82,7 +82,30 @@
+ </entry>
+ <entry name="TabBarStyleSheet" type="String">
+ <label>Control the visual style of the tab bar</label>
+- <default>QTabBar::tab { min-width: 2em ; max-width: 25em }</default>
++ <default>
++ QTabBar,QTabBar::tab{
++ font-family: "sans-serif";
++ font-size: 15px;
++ height: 25px;
++ padding: 2px;
++ min-width: 15em;
++ border: 0px;
++ border-bottom: 1px solid palette(dark);
++ background-color: palette(dark);
++ color: palette(text);
++ }
++ QTabBar::tab:hover{
++ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 palette(dark), stop: 0.85 palette(dark), stop: 1 palette(highlight));
++ }
++ QTabBar::tab:selected{
++ color: palette(dark);
++ font-weight: bold;
++ background-color: #475057;
++ border: 0px;
++ border-bottom-right-radius: 2px;
++ border-bottom-left-radius: 2px;
++ }
++ </default>
+ </entry>
+ <entry name="TabBarUseUserStyleSheet" type="Bool">
+ <label>Use a user-defined .css file for the tab bar</label>
diff --git a/PKGBUILD b/PKGBUILD
index 26e932bc4e54..0fd66e8fc58f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=konsole-blurry
_pkgname=konsole
-pkgver=16.12.2
+pkgver=18.04.0
pkgrel=1
arch=('i686' 'x86_64')
url='http://kde.org/applications/system/konsole/'
@@ -17,14 +17,20 @@ optdepends=('kdebase-keditbookmarks: to manage bookmarks')
replaces=('kdebase-konsole')
conflicts=('kdebase-konsole<4.14.3-2')
source=("http://download.kde.org/stable/applications/${pkgver}/src/konsole-${pkgver}.tar.xz"
- "0001-add-blur-effect-when-set-transparency.patch")
-sha1sums=('d889147f592bcdd40576756a4ba3a861807cee24'
- 'b3f8b444181e8e6f60d15d160375c26804429e9b')
+ "0001-add-blur-effect-when-set-transparency.patch"
+ "0002-add-rainbows-support.patch"
+ "0003-fix-qttab-default-style.patch")
+sha1sums=('b7b3ef35d3575d6a544e8b9f8a3f37d201f6f77c'
+ 'c130165b09c0fe1b7ec81342ab6d33576a67e82b'
+ '7eaa9b5a47e7d824283481c8c6262b6b78295813'
+ '78348b2a4c2c2e9dc5d97b06d7f99c52aff1c9a8')
prepare() {
mkdir -p build
cd ${srcdir}/$_pkgname-$pkgver
patch -Np1 -i ${srcdir}/0001-add-blur-effect-when-set-transparency.patch
+ patch -Np1 -i ${srcdir}/0002-add-rainbows-support.patch
+ patch -Np1 -i ${srcdir}/0003-fix-qttab-default-style.patch
}
build() {