Use QRect instead of manually handling terminal margins

Instead of keeping track of constants and +1 -1, use a QRect to handle
the terminal margins.  There is no GUI for this currently and the
margins are hard-coded to what they are now.  Code to center the
terminal is also include (w/o GUI).

This patch comes from review 109891 w/ a few changes from me.
Thanks to Mariusz Glebocki mglb@arccos-1.net
This commit is contained in:
Kurt Hindenburg
2013-05-18 07:51:29 -04:00
parent 7937cb9793
commit c56db4cfd0
3 changed files with 107 additions and 85 deletions

View File

@@ -819,6 +819,10 @@ void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr
else if (middleClickPasteMode == Enum::PasteFromClipboard)
view->setMiddleClickPasteMode(Enum::PasteFromClipboard);
// margin/center - these are hard-fixed ATM
view->setMargin(1);
view->setCenterContents(false);
// cursor shape
int cursorShape = profile->property<int>(Profile::CursorShape);