Bug 346450 - Remove 1px margin [patch included]
Summary: Remove 1px margin [patch included]
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-21 22:27 UTC by Josef Kufner
Modified: 2016-09-17 02:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Add profile option to set margin and centering instead of hardwired values (3.46 KB, patch)
2015-11-25 18:23 UTC, Josef Kufner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Kufner 2015-04-21 22:27:25 UTC
There is 1px black margin around terminal view. Because of this margin nice fonts like Terminus do not fill screen completely, leaving few pixels margin in bottom and right edge of the screen. I found it very annoying :(

The 1px margin is hardcoded, here is how to remove it:

--cut--
--- a/ViewManager.cpp
+++ b/ViewManager.cpp
@@ -854,7 +854,7 @@ void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr
         view->setMiddleClickPasteMode(Enum::PasteFromClipboard);
 
     // margin/center - these are hard-fixed ATM
-    view->setMargin(1);
+    view->setMargin(0);
     view->setCenterContents(false);
 
     // cursor shape
--cut--

(source code was obtained from Debian repo: apt-get source konsole; version is 4.14.2)
Comment 1 Christoph Feck 2015-04-22 11:35:21 UTC
The margin is intended to improve readability of black letters (on bright background) at screen edges.
Comment 2 Josef Kufner 2015-04-22 19:45:02 UTC
I also found (in source code, the next line -- setCenterContents()) an option to center the view within window, which makes it look much better.

Well, the best would be to include these options in profile settings dialog :)
Comment 3 Josef Kufner 2015-11-25 18:23:40 UTC
Created attachment 95741 [details]
Add profile option to set margin and centering instead of hardwired values

This patch add profile options to set margin in pixels and enable/disable centering.

Defaults are same as original hardwired valuse, but now it is possible
to change them via editing profile file:

    [General]
    TerminalMargin=1
    TerminalCenter=false

There is no user interface to change these values for now.
Comment 4 Nils Luxton 2016-09-12 10:20:17 UTC
Is there any proposal for when this might be merged?
Comment 5 Kurt Hindenburg 2016-09-13 13:53:39 UTC
let me look at it and see if I can get it in for next release
Comment 6 Nils Luxton 2016-09-13 15:57:07 UTC
That would be great, thanks. I'm not concerned with it having a UI (personally) but understand if that is a 'blocker' to getting this in. My use case is in fact the opposite of the OP, namely, to be able to center and increase the margin.
Comment 7 Kurt Hindenburg 2016-09-17 02:01:20 UTC
Git commit 8e5a5b1ec1fb68e359319c9ce23a43c0434b836a by Kurt Hindenburg.
Committed on 17/09/2016 at 01:57.
Pushed by hindenburg into branch 'master'.

Allow profile to set margin and center flag

These 2 were hard coded - this allow them to be set in the profile.
There is currently no UI for these; add these to profile:

[General]
TerminalMargin=1
TerminalCenter=false

Thanks to Josef Kufner jk frozen doe net for patch

It appears the center flag doesn't work and perhaps hasn't for a long
time.

M  +4    -0    src/Profile.cpp
M  +14   -0    src/Profile.h
M  +3    -0    src/TerminalDisplay.cpp
M  +3    -3    src/ViewManager.cpp

http://commits.kde.org/konsole/8e5a5b1ec1fb68e359319c9ce23a43c0434b836a