ui.tools.common: only save tool-dim when not fullscreen.

factor-shell
John Benediktsson 2017-10-25 16:16:53 -07:00
parent c2c879c999
commit b90f37b13e
1 changed files with 9 additions and 5 deletions
basis/ui/tools/common

View File

@ -1,8 +1,9 @@
! Copyright (C) 2009 Slava Pestov. ! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors classes combinators.short-circuit kernel ui.gadgets USING: accessors classes combinators.short-circuit kernel ui
ui.gadgets.borders ui.gadgets.scrollers ui.gadgets.tracks ui.gadgets ui.gadgets.borders ui.gadgets.scrollers
ui.pens.solid ui.theme words ; ui.gadgets.tracks ui.pens.solid ui.theme words ;
IN: ui.tools.common IN: ui.tools.common
: set-tool-dim ( class dim -- ) : set-tool-dim ( class dim -- )
@ -18,8 +19,11 @@ M: tool pref-dim*
M: tool layout* M: tool layout*
[ call-next-method ] [ call-next-method ]
[ [ class-of ] [ dim>> ] bi set-tool-dim ] [
bi ; dup fullscreen? [ drop ] [
[ class-of ] [ dim>> ] bi set-tool-dim
] if
] bi ;
SLOT: scroller SLOT: scroller