Summary:
pretty vital (at least for me) if one doesn't have compositing.
we can't use the normal QPalette::Inactive because of color schemes,
but I made the new scrollbar color code follow the same dimming colors.
Test Plan:
tested with and without compositing, with and without scrollbar,
and dark and light color schemes.
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: anthonyfieroni, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16198
Summary:
Instead of using only the default colors (and white background),
use the correct colors and font from the profile, if available. If
not exporting with a profile, it falls back to the old behavior
(i. e. when copying to clipboard).
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: ngraham, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16227
Summary:
`setStyleHint()` resets `styleStrategy` (which has information about
font smoothing) when the second argument is missing.
Test Plan:
* {nav Settings > Edit current profile... > Appearance}
* Unselect/select "Smooth fonts" checkbox
**Actual result:** text rendering in the main terminal window does not
change.
**Expected result:** text rendering in the main terminal window should
use smoothing or not, depending on the checkbox state. The option change
should be visible instantly, without clicking OK or Apply.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16361
Summary:
This is a reimplemented 914067d14a (hinted by @cfeck), plus a refactoring of TerminalDisplay::findWordStart()
findWordStart() had bounds check issues and an off-by-one for the case when the acquired region was more than two screens down.
TerminalDisplay::findWordEnd() is very similarly implemented, but I haven't found a case where it fails, so I haven't touched it.
Since 914067d14a caused a revert, I've tested the changes thoroughly (the cases are in the Test Plan below).
BUG: 399109
Test Plan:
Corner cases tested (everything was run under valgrind, since I had no crashes without it pre - f98c752bce):
- At the end of the word, current Konsole doesn't select "@" at the end of the word when double-clicking, but selects it when the mouse is moved. With the introduced changes the behavior is to consistently ignore the last "@" character.
- When 10K lines buffer is underfilled, dragged doubleclick+scrolled up by dragging the mouse above the terminal (this generates valgrind warnings on 5a31b4af6d that might have caused Konsole to crash)
- Same with overfilled 10K lines buffer.
- With decreased window size and some chars hidden, dblclick and drag up and down to the end of the buffer. The ends of the string are trimmed (like in current console), the rest of the string is properly selected.
- With increased window size and padded chars, prod the buffer limits. Long lines are broken into separate lines -- no difference vs current Konsole.
Reviewers: #konsole, hindenburg, cfeck
Reviewed By: #konsole, hindenburg
Subscribers: ngraham, cfeck, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16159
Summary:
When the search bar is visible and user scrolls terminal contents,
(part of) one line is rendered twice. The effect is visible on
semi-transparent pixels (i.e. antialiasing) with some font sizes.
With this patch, the characters which should be painted are calculated
once. It was done for every rect in a paint region separately before.
When two rectangles included different parts of a line, it was drawn
twice. Only part of the line had visual effect visible, as each
rectangle was cleared before rendering.
{F6310966}
Test Plan:
* set font to DejaVu Sans Mono 7pt (tested with 96dpi). Other
fonts/sizes can work too, just make sure the bottom edge of the search
box is not exactly between lines
* run `printf '%3d▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\n' $(seq 500)`
* open search box
* scroll up/down using mouse wheel
Actual result: One line is brighter (painted twice)
Expected result: All boxes should look the same
* run in a bash/zsh:
```
reset
printf '.%.0s' $(seq $(( LINES * COLUMNS )))
printf '\033[?7l'
printf '\033[%d;%dH%c' 1 1 A 1 $COLUMNS B $LINES 1 C $LINES $COLUMNS D
read
reset
```
* from "File" menu select "Print Screen..."
* print to PDF file (or real printer if you want)
Expected result: printed document must contain whole terminal screen
(A, B, C, D in top left, top right, bottom left, bottom right corner,
respectively, and dots filling the screen)
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16033
Summary:
When running the konsole unit tests on a system where the
language setting is not English the test
`ProfileTest::testFallbackProfile` fails because
it compares the translated value of the `Name` property
with the string literal `"Default"`. To fix the test we can
use `UntranslatedName' instead.
Test Plan:
# Run the konsole unit tests on a system where the language is not English
Output of `ctest --verbose` before the fix:
```
8: FAIL! : Konsole::ProfileTest::testFallbackProfile() Compared values are not the same
8: Actual (fallback->property<QString>(Profile::Name)): "Standard"
8: Expected (QStringLiteral("Default")) : "Default"
8: Loc: [/var/run/media/peter/MEDIA/Projects/kde/konsole/src/autotests/ProfileTest.cpp(237)]
```
After the fix all tests should pass.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15923
Summary:
BUG: 397985
Use antialiasing when drawing unicode box characters to improve the
rendering of rounded corners.
Test Plan:
# Execute `echo -e '\u256d\u256e\n\u2570\u256f'`
# The box should have rounded corners
Before fix:
{F6301318}
After fix:
{F6301319}
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15915
Summary:
As part of the QTabBar refactoring, honouring of the new tab behaviour
setting was lost. Restore using a simpler implementation that simply
asks QTabWidget for the current index.
BUG: 396701
Reviewers: #konsole, hindenburg, tcanabrava
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15828
Summary:
BUG: 395666
Bug reported crashes on yakuake in a wayland session. Further
investigation revealed that other KDE product Kolourpaint experienced
nullptr on wayland while getting MimeData which was consistent with
the stacktrace provided by the author of the bug.
This diff validates the presence of MimeData before proceeding with
the drag action.
Test Plan:
1. Use wayland session
2. Open Yakuake in fullscreen
3. With a touch enabled laptop, scroll with many fingers (possibly 8)
4. Yakuake should not crash
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: anthonyfieroni, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15794
Summary:
The uni2characterwidth tool, converts Unicode Character Database files
into character width lookup tables. It uses a template file to place
the tables in a source code file together with a function for finding
the width for specified character. It also allows to generate few forms
of lists with width data for debug and test purposes, or for future use
as a replacement of Unicode files.
Set `KONSOLE_BUILD_UNI2CHARACTERWIDTH` cmake flag to build the tool.
Use `--help` argument for more detailed usage.
There is a possibility to generate separate "width" for Ambiguous
characters. It can be used to add ability to configure the characters
width in Konsole settings.
The `example.template` file contains all possible named tags, and some
additional tags to show how to use them.
CCBUG: 396435
Depends on D15756
Test Plan:
Download files listed below from `11.0.0` and `emoji/11.0` directories
on `https://unicode.org/Public/`. You can also directly use URLs to the
files.
* UnicodeData.txt
* EastAsianWidth.txt
* emoji-data.txt
Generate any available list except compact-ranges (e.g. `details`):
```
uni2characterwidth \
-U UnicodeData.txt -A EastAsianWidth.txt -E emoji-data.txt \
-g details result.txt
```
The list should contain ranges for all possible widths
(-2, -1, 0, 1, 2). You can choose some characters with a width you know
and check how they were classified. -2 is a special non-standard width
for ambiguous characters, which can be overriden by adding `-a 1` or
`-a 2` parameter. With this flag, all ranges from -2 group should
disappear and become assigned to selected width (1 or 2).
Generate output using a template:
```
uni2characterwidth \
-U UnicodeData.txt -A EastAsianWidth.txt -E emoji-data.txt \
-g code,./template.example result.txt
```
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15757
Summary:
Replaces direct konsole_wcwidth() calls with Character object property
and the class static function, which internally still use
konsole_wcwidth().
The change also prepares the codebase for a new code for determining
character width. This way the change will barely touch existing code.
CCBUG: 396435
Test Plan:
konsole_wcwidth() is still used, just in one central place. Passed
compilation and CharacterWidthTest should be enough.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15756
Summary:
Fixes a bug that currently affects Konsole KPart
Repro steps:
- Create KPart, and start xxd in it.
- Call konsolePart->sendInput("hello")
- In the konsole, press Return, then Ctrl+D
Here's xxd output:
`00000000: 6865 6c6c 6f00 0a hello..`
The valid xxd output would be:
`00000000: 6865 6c6c 6f0a hello.`
Null bytes are mostly ignored, but some programs (e.g. ipython interpreter) really don't like them.
The bug happens, since konsole part uses `activeSession()->sendTextToTerminal(text);`, and sendTextToTerminal() eol parameter defaults to null character.
This diff makes sendTextToTerminal() ignore null eol character.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15732
This commit breaks sessionProfileCommandReceived
causing crashes in programs such as nvim.
I'm reverting it for now while I can't dig deeper.
This reverts commit 99f233b9a1.
Summary:
There's no point in returning null if we have a default
and we would check for null and query for the default
in all cases that we used it.
Export the private header ColorScheme
It's going to be used from Parts and App
Add ColorScheme() to the Profile
The profile used to hold the ColorScheme name, but if you
want to query for the ColorScheme you had to call ViewManager
but there's a class ColorSchemeManager that ViewManager used to call
Just make things simple:
- Profile has a colorScheme that it queries from the ColorSchemeManager
- Use profile->colorScheme() when you wanna something from the
colorScheme at the profile.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D13854
Summary:
Adds option to reverse the order of URL hints such that the last URL
(the bottom-most one) has the number 1 and the numbers increase from
bottom to top.
This becomes particularly useful when watching a log or buffer, or in terminal
chat applications. Very often, the most useful URL is the most recent one and
if there are many (> 10) URLs on the screen, the desired one will not get a
hint. Reversing the numbering makes the most recent URL hint take the number 1,
while the oldest will have the highest number or no number at all.{F6244152}
{F6244154}
{F6244155}
Reviewers: #konsole, #vdg, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15362
Summary:
Defaults taken from kde coding style.
This file enables a minimum style guide to be enforced across editors,
like line endings, character encoding, tabs vs spaces, indent size
and some more.
https://editorconfig.org/
Reviewers: hindenburg, tcanabrava, gszymaszek
Reviewed By: hindenburg, tcanabrava, gszymaszek
Subscribers: Omar, gszymaszek, dhaumann, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15383
Summary:
This is uneeded and we can create and use the mimetype
directly inside of the DetachableTabBar as nothing else
needs to know about it.
Test Plan: Compile and runs. Unused code.
Reviewers: hindenburg, sandsmark, ngraham
Reviewed By: hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15378
Summary:
Whenever I change the font size doing so is usually temporary and I usually go back to the default font size in after a short time. Currently I do so by changing to a different profile and discarding the change, which resets the font size to the default. I feel like there should be a shortcut for resetting the size.
I could not find an appropriate icon, so I left it without icon.
The default shortcut ctrl+r seemed reasonable and easy to type, 'r' reset.
Test Plan: Manual.
Reviewers: hindenburg, tcanabrava, #vdg, ngraham
Reviewed By: #vdg, ngraham
Subscribers: muhlenpfordt, ach, kvermette, rizzitello, lbergdoll, hindenburg, fabianr, dhaumann, kde-doc-english, z3ntu, ngraham, konsole-devel
Tags: #konsole, #documentation
Differential Revision: https://phabricator.kde.org/D15380
Summary:
If you moved the tabs to splits in a way that you have a different
number of tabs in each split, and started closing it, the count()
of the tabs would be different and we would hit an assert.
The fix is simple: don't separate the logic between tabEmpty and
tabDestroyed, if the tab is empty it will be destroyed but we can
treat everything in the tabEmpty signal, this way we will never hit
a dangling pointer.
Because of that it was possible that a splitView had a invalid
activeWidget for a microsecond, when it's deleting itself, so
instead of asserting if we have no active view, I choose to return
a empty list of properties.
Reviewers: hindenburg, ngraham, sandsmark
Reviewed By: hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15379
Summary:
This continues the patch series of the rewrite
of the Tab handling code to a more modern approach
using QTabWidget.
This fixes the attach and reattach bug on multiple
konsole windows and reworks the drag & drop code
to a more simplified version of it.
Reviewers: hindenburg, ngraham, sandsmark
Reviewed By: hindenburg
Subscribers: lbergdoll, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15377
Summary:
There's no need to create a layout for the central widget
that will hold only one widget.
Test Plan: compiled, triggered a few actions that could cause a layout change.
Reviewers: #konsole, hindenburg, ngraham
Reviewed By: ngraham
Subscribers: ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14198
Summary:
Fixes a regression from ac59cc7e00.
LibreOffice Writer, for example, will hang during startup when
QT_NO_GLIB is set. It uses GLib and has KDE integration.
Test Plan:
In a shell, set QT_NO_GLIB to a string, or an empty string, or
unset it. Run konsole from that shell, check that QT_NO_GLIB in
the new shell inside konsole has the same value as in the
launching shell.
Reviewers: hindenburg, #konsole, sandsmark, dfaure
Reviewed By: dfaure
Subscribers: dfaure, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14558
Summary: Allowing the test to pass without a running X server.
Test Plan: Test still passes
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14539
(cherry picked from commit ee5e70e7d9882aa245f79594df169f8db84b63d8)