Skip to content

Commit

Permalink
FIX: issue #5507 (New fix for area does not work with WRAP)
Browse files Browse the repository at this point in the history
  • Loading branch information
dockimbel committed May 26, 2024
1 parent b26ec93 commit de9b371
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
3 changes: 3 additions & 0 deletions modules/view/backends/platform.red
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ system/view/platform: context [
FACET_FLAGS_SCROLLABLE: 00040000h
FACET_FLAGS_PASSWORD: 00080000h
FACET_FLAGS_NO_SYNC: 00100000h
FACET_FLAGS_NO_AUTO_SB: 00200000h

FACET_FLAGS_POPUP: 01000000h
FACET_FLAGS_MODAL: 02000000h
Expand Down Expand Up @@ -290,6 +291,7 @@ system/view/platform: context [
scrollable: symbol/make "scrollable"
password: symbol/make "password"
no-sync: symbol/make "no-sync"
no-auto-sb: symbol/make "no-auto-sb"

_accelerated: symbol/make "accelerated"

Expand Down Expand Up @@ -613,6 +615,7 @@ system/view/platform: context [
sym = scrollable [flags: flags or FACET_FLAGS_SCROLLABLE]
sym = password [flags: flags or FACET_FLAGS_PASSWORD]
sym = no-sync [flags: flags or FACET_FLAGS_NO_SYNC]
sym = no-auto-sb [flags: flags or FACET_FLAGS_NO_AUTO_SB]
true [fire [TO_ERROR(script invalid-arg) word]]
]
word: word + 1
Expand Down
27 changes: 15 additions & 12 deletions modules/view/backends/windows/gui.reds
Original file line number Diff line number Diff line change
Expand Up @@ -359,30 +359,33 @@ update-scrollbars: func [
hWnd [handle!]
text [c-string!] ;utf16 encoded string or null
/local
values [red-value!]
str [red-string!]
para [red-object!]
dc [handle!]
rect [RECT_STRUCT value]
horz? [logic!]
vert? [logic!]
size [integer!]
max-n [integer!]
start [c-string!]
values [red-value!]
str [red-string!]
para [red-object!]
dc [handle!]
rect [RECT_STRUCT value]
horz? [logic!]
vert? [logic!]
size [integer!]
max-n [integer!]
start [c-string!]
txt-start [c-string!]
txt-pos [c-string!]
bool [red-logic!]
wrap? [logic!]
chars [integer!]
c1 c2 [byte!]
w h height width right bottom [integer!]
c1 c2 [byte!]
w h height width right bottom bits [integer!]
][
values: get-face-values hWnd
str: as red-string! values + FACE_OBJ_TEXT
para: as red-object! values + FACE_OBJ_PARA
horz?: no
vert?: no
wrap?: no

bits: get-flags as red-block! values + FACE_OBJ_FLAGS
if bits and FACET_FLAGS_NO_AUTO_SB <> 0 [exit]

either TYPE_OF(str) = TYPE_STRING [
GetClientRect hWnd rect
Expand Down

0 comments on commit de9b371

Please sign in to comment.