Commit Graph

84 Commits

Author SHA1 Message Date
Kurt Hindenburg
c63525fcdc Add option to ColorScheme to blur transparent background
Note that this does not affect KonsolePart; it is up to the app using
it to enable transparency (see src/tests/demo_konsolepart).

Patch by anemeth

FEATURE: 198175
Differential Revision: https://phabricator.kde.org/D10015
2018-02-01 08:52:05 -05:00
Kurt Hindenburg
6cc32028e1 Fix ambiguity of qFuzzyCompare on armv6
Patch from FreeBSD
https://github.com/freebsd/freebsd-ports-kde/blob/master/x11/konsole/
files/patch-src_ColorScheme.cpp
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217079
2018-01-08 20:52:26 -05:00
Kurt Hindenburg
cf56e5db4c sync declarations with definitions (have .h and .cpp variable names match) 2018-01-06 14:32:02 -05:00
Kurt Hindenburg
7f35a5af09 initialize members in the initialization list 2018-01-04 09:14:55 -05:00
Kurt Hindenburg
d8171f8e88 Pass small and trivially-copyable type by value QRect 2017-12-30 22:00:34 -05:00
Kurt Hindenburg
c907fcea7a remove unneeded casts 2017-09-16 16:12:09 -04:00
Kurt Hindenburg
2a2a56d73c modernize use nullptr 2017-07-15 23:28:32 -04:00
Kurt Hindenburg
1da83f1ef3 uncrustify using kf5 config 2017-05-28 11:33:46 -04:00
Kurt Hindenburg
2b56917643 change to i18nc 2017-04-27 09:42:15 -04:00
Kurt Hindenburg
eade05a4bd Do not specify Qt modules in includes 2017-04-26 21:33:34 -04:00
Kurt Hindenburg
a540e6fdd0 Fix readability-implicit-bool-cast issues using nullptr 2017-04-21 10:51:31 -04:00
Kurt Hindenburg
5648ec1a1a Use QLatin1* to handle casts from ascii 2017-04-16 14:16:21 -04:00
Kurt Hindenburg
accf076104 Use member initializer lists in constructors 2017-04-11 12:07:34 -04:00
Kurt Hindenburg
5bc0b561c4 Remove class ColorEntry which was actually just a QColor wrapper
For now typedef ColorEntry to a QColor
2017-03-30 11:03:36 -04:00
Kurt Hindenburg
66044df34b fix a lot of issues of readability-implicit-bool-cast 2017-03-29 08:32:59 -04:00
Kurt Hindenburg
49f6216e6a Add static_cast to show conversions 2017-02-18 15:18:07 -05:00
Martin T. H. Sandsmark
3ff022527e Fix randomization in color scheme
Use the new std::random APIs in c++11 for generating random numbers,
which is much safer and doesn't abuse qsrand().

This also means we don't need to copy in the QUuid::createUuid() code
anymore, which generated a warning in ubsan.

REVIEW: 129342
2016-11-09 13:24:04 +01:00
Kurt Hindenburg
84b43dfb21 Add rendition flags SGRs 2, 8, 9, 53
Adds faint intensity, strikeout, conceal and overline support.

echo -e 'D\e[2mD\e[9mD\e[53mD\e[8mD'

Thanks to Antonio Russo antonio e russo gmail com for patch

REVIEW: 128405
BUG: 362171
2016-07-16 12:34:24 -04:00
Kurt Hindenburg
d5d2d9ef0d Allow transparency to work when using images as backgrounds.
Previously when using an image as the background, the opacity was
ignored.  This patch corrects that.

Many thanks for patch to Wolfgang Brehm  wolfgang brehm gmail com

BUG: 312843
FIXED-IN: 2.13
(cherry picked from commit 09ca63dbb6)
2014-02-17 09:17:07 -05:00
Alex Richardson
a83db71590 Port to KF5/Qt5
TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes

REVIEW: 111937
2013-08-20 23:34:35 +02:00
Alex Richardson
ab5e15b1b7 Revert "Port to KF5/Qt5"
This reverts commit 4adfbe84bd.

This work will go into a new branch instead
2013-08-13 23:26:19 +02:00
Alex Richardson
4adfbe84bd Port to KF5/Qt5
To build for KF5 pass the option -DQT5_BUILD=ON to CMake

TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes

REVIEW: 111937
2013-08-13 21:26:59 +02:00
Kurt Hindenburg
61a8fd147d Remove old colorscheme Bold key
Since the early KDE 4.x, konsole has allowed each color entry to have
a "Bold=true|false" entry to specify whether the color should be drawn
in bold or not (there was never an UI).

The per-profile 'Draw intense colors in bold font' should be enough.
See bko 168300 for more info
2013-04-06 13:29:45 -04:00
Kurt Hindenburg
cdf2b2bc78 Switch from c-style casting to c++ casting via static_cast 2012-12-19 21:20:18 -05:00
Jekyll Wu
d8f22c821a Move class AccessibleColorScheme into its own files
Note: this special colorscheme has never been exposed and put into use,
so the new files are not involved in the building process.

Maybe that special colorscheme should just be removed, if no one now
really understands its design purpose.
2012-11-20 01:57:20 +08:00
Kurt Hindenburg
69dcbd3406 astyle fixes - spaces/{ 2012-09-02 17:28:43 -04:00
Jekyll Wu
65614265c8 Delete the useless 'Transparency=' entries when saving colorscheme 2012-06-13 17:54:59 +08:00
Jekyll Wu
001a353a46 Remove code for per-color transparency
That per-color transparency looks like a heritage of the pesudo
transparency in the KDE3 era. It is basically not used in current code.
2012-05-21 14:47:10 +08:00
Jekyll Wu
0aa98a4f97 Prefer operator= to the attach() method 2012-04-06 12:59:23 +08:00
Jekyll Wu
cc4564c311 Move related code closer 2012-04-06 12:59:23 +08:00
Kurt Hindenburg
5b083640ce whitespace and style fixes
Use 'git diff -w --ignore-all-space' to see non-whitespace changes
2012-04-05 11:08:53 -04:00
Kurt Hindenburg
397e92a9a7 -Wshadow fixes 2012-03-25 11:00:27 -04:00
Jekyll Wu
25b8b5353c Trivial style change: remove extra blank lines 2012-03-17 19:53:21 +08:00
Jekyll Wu
f4fb943132 Most of time we only need <KLocalizedString> instead of <KLocale> 2012-03-07 06:48:26 +08:00
Jekyll Wu
328aeac8a8 ColorScheme should read and write the same "Transparent" entry consistenly
It is a little surprising this inconsistency of reading "Transparent"
and writing "Transparency" has been there for a few years. That fact
implies that entry might by totally useless in current code.

Need furthur investigation.
2012-03-02 14:14:12 +08:00
Jekyll Wu
2f7a0965f5 Move class ColorSchemeMananger into its own file
class KDE3ColorSchemeReader is also moved since it is supposed to an
compatibility helpr of which class ColorScheme does not need to know,
and eventualy it should be removed
2012-02-29 22:31:56 +08:00
Jekyll Wu
328dcabe06 More consistency and more constness 2012-02-23 04:39:57 +08:00
Jekyll Wu
5a4fdd2f58 More constness 2012-02-23 04:14:51 +08:00
Jekyll Wu
846c321ebb Simplify the interface of ColorScheme::writeColorEntry()
This basically make it more like its counterpart ColorScheme::readColorEntry().
2012-02-23 02:41:47 +08:00
Jekyll Wu
9e2740db6e Trivial readability fix 2012-02-23 02:21:32 +08:00
Jekyll Wu
41d2f5f261 Move code around 2012-02-23 01:52:38 +08:00
Jekyll Wu
6f2496a980 Less magic number 2012-02-23 01:47:26 +08:00
Jekyll Wu
0331f97b60 Another try of cleaning up of #includes 2012-02-21 05:18:31 +08:00
Jekyll Wu
6b6a5944f6 Prefer foreach(...) over while(...) for simplicity and readability 2012-01-22 10:21:45 +08:00
Kurt Hindenburg
f94c82e6b0 Apply astyle-kdelibs
Over the years, the coding style is all over the place.

Use 'git diff -w --ignore-all-space' to see non-whitespace changes.
2011-12-24 01:25:10 -05:00
Kurt Hindenburg
4e5586f5c0 Revert "Add more i18nc KUIT context."
This reverts commit 05f8cc339f.

The issue is that some of the color schemes are in the KDE3 format
and some in KDE4.  This close to 4.8, I'll revert and fix later.

BUG: 286205
2011-11-12 10:37:16 -05:00
Jekyll Wu
80ec2d216b Delete some kDebug messages 2011-11-06 03:47:14 +08:00
Jekyll Wu
330de6c6f4 Fix some spelling problems 2011-11-06 03:41:20 +08:00
Jekyll Wu
cf92cece2b Remove leading white spaces in blank lines to make them really empty 2011-11-05 07:29:21 +08:00
Kurt Hindenburg
05f8cc339f Add more i18nc KUIT context. 2011-10-05 09:09:00 -09:00