From d1501aa5e8f40b6016753f9fb34181a4f914a1d5 Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Sun, 5 Aug 2012 19:12:39 +0400 Subject: [PATCH] SmCmdBoxWindow: reduce padding from 8 to 4 Change-Id: If87bc63b4bd3fd27eef665261667478d9284ff0b --- starmath/source/view.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index a7af46453a79..ad6c23213900 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -74,6 +74,9 @@ #define MINZOOM 25 #define MAXZOOM 800 +// space around the edit window, in pixels +#define CMD_BOX_PADDING 4 + #define SmViewShell #include "smslots.hxx" @@ -721,9 +724,12 @@ SmViewShell * SmCmdBoxWindow::GetView() void SmCmdBoxWindow::Resize() { Rectangle aRect = Rectangle(Point(0, 0), GetOutputSizePixel()); + aRect.Left() += CMD_BOX_PADDING; + aRect.Top() += CMD_BOX_PADDING; + aRect.Right() -= CMD_BOX_PADDING; + aRect.Bottom() -= CMD_BOX_PADDING; + DecorationView aView(this); - aRect.Left() += 8; aRect.Top() += 8; - aRect.Right()-= 8; aRect.Bottom()-= 8; aRect = aView.DrawFrame( aRect, FRAME_DRAW_DOUBLEIN | FRAME_DRAW_NODRAW ); aEdit.SetPosSizePixel(aRect.TopLeft(), aRect.GetSize()); @@ -735,10 +741,13 @@ void SmCmdBoxWindow::Resize() void SmCmdBoxWindow::Paint(const Rectangle& /*rRect*/) { Rectangle aRect = Rectangle(Point(0, 0), GetOutputSizePixel()); + aRect.Left() += CMD_BOX_PADDING; + aRect.Top() += CMD_BOX_PADDING; + aRect.Right() -= CMD_BOX_PADDING; + aRect.Bottom() -= CMD_BOX_PADDING; + DecorationView aView(this); - aRect.Left() += 8; aRect.Top() += 8; - aRect.Right()-= 8; aRect.Bottom()-= 8; - aRect = aView.DrawFrame( aRect, FRAME_DRAW_DOUBLEIN ); + aView.DrawFrame( aRect, FRAME_DRAW_DOUBLEIN ); }