Skip to content

Commit

Permalink
FIX: black pading in left side of the gui console
Browse files Browse the repository at this point in the history
  • Loading branch information
qtxie committed Feb 4, 2016
1 parent e2b1d7e commit 5ee88a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions environment/console/terminal.reds
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ terminal: context [
char-h [integer!]
caret-x [integer!]
caret-y [integer!]
bg-color [integer!]
font-color [integer!]
pad-left [integer!]
caret? [logic!]
select? [logic!]
Expand Down Expand Up @@ -618,6 +620,8 @@ terminal: context [
out/h-idx: 0
out/s-head: -1

vt/bg-color: 00FCFCFCh
vt/font-color: 00000000h
vt/pad-left: 3
vt/win-w: win-x
vt/win-h: win-y
Expand Down
11 changes: 7 additions & 4 deletions environment/console/windows.reds
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ update-scrollbar: func [
set-select-color: func [
vt [terminal!]
][
SetTextColor mdc 00FFFFFFh
SetBkColor mdc 0
SetTextColor mdc vt/bg-color
SetBkColor mdc vt/font-color
]

set-normal-color: func [
vt [terminal!]
][
SetTextColor mdc 0
SetBkColor mdc 00FFFFFFh
SetTextColor mdc vt/font-color
SetBkColor mdc vt/bg-color
]

copy-to-clipboard: func [
Expand Down Expand Up @@ -230,6 +230,9 @@ OS-draw-text: func [
rc/right: x + w
ExtTextOut mdc x 0 ETO_OPAQUE or ETO_CLIPPED rc str len null
if x + w = max-win-width [
rc/left: 0
rc/right: pad-left
ExtTextOut hdc 0 0 ETO_OPAQUE rc null 0 null
BitBlt hdc pad-left y max-win-width - pad-left h mdc 0 0 SRCCOPY
]
]
Expand Down

0 comments on commit 5ee88a3

Please sign in to comment.