abdullah [Thu, 16 Dec 2021 15:43:39 +0000 (17:43 +0200)]
remove partial from class
abdullah [Tue, 7 Dec 2021 14:34:23 +0000 (16:34 +0200)]
Add support for text geometry API's
dongsug.song [Fri, 17 Dec 2021 06:45:03 +0000 (15:45 +0900)]
[NUI] Fix StopFinal(EndAction) not working on lite model
Bowon Ryu [Thu, 16 Dec 2021 05:04:00 +0000 (14:04 +0900)]
[NUI] fix tc fail for TextMapHelper
Property of InputFilter and Placeholder returns PropertyMap of index base.
So GetHiddenInputStruct() and GetPlaceholderStruct() can parse the index base map.
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
joogab.yun [Tue, 14 Dec 2021 06:00:32 +0000 (15:00 +0900)]
[NUI] Improves GetNextFocusableView
Currently, GetNextFocusableView of FocusableBase was Index-based of ContentContainer Child.
This is a problem.
Changes the search for the next focus view from index-based to position-based.
Shrouq Sabah [Thu, 21 Oct 2021 21:27:58 +0000 (00:27 +0300)]
[NUI] Make Copy, Cut and Paste APIs public
Bowon Ryu [Fri, 15 Oct 2021 06:29:02 +0000 (15:29 +0900)]
[NUI] Fix some description for text InputFilter
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Bowon Ryu [Fri, 10 Sep 2021 05:52:57 +0000 (14:52 +0900)]
[NUI] Open Text InputFilter APIs
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Daekwang Ryu [Thu, 21 Oct 2021 03:49:12 +0000 (12:49 +0900)]
[NUI] ACR of GLView
Make public of GLView class.
Lukasz Oleksak [Fri, 3 Dec 2021 18:00:20 +0000 (19:00 +0100)]
[ATSPI] Fix for DefaultLabel
Jaehyun Cho [Wed, 15 Dec 2021 07:08:19 +0000 (16:08 +0900)]
[NUI] Fix Size2D not greater than int.MaxValue or less than int.MinValue
Since Size2D converts Width/Height from float to int internally,
Width/Height values may be greater than int.MaxValue or less than
int.MinValue.
To resolve the above issue, Width/Height values are checked if they
are greater than int.MaxValue or less than int.MinValue.
Shinwoo Kim [Wed, 17 Nov 2021 11:38:34 +0000 (20:38 +0900)]
[NUI][ATSPI] clean code
we do not use variable name starts with "_".
Xianbing Teng [Tue, 14 Dec 2021 08:28:04 +0000 (16:28 +0800)]
[NUI] Add EditableBrowsable.Never for CurrentLoadedXaml
Seoyeon Kim [Tue, 14 Dec 2021 07:38:41 +0000 (16:38 +0900)]
[NUI] Version update (2.1.02)
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
Fang Xiaohui [Wed, 8 Dec 2021 06:40:11 +0000 (14:40 +0800)]
[NUI] Add API so that user can copy properties, bindings from other container
Xianbing Teng [Tue, 7 Dec 2021 10:07:26 +0000 (18:07 +0800)]
[NUI] Remove XamlLoadedEventArgs
Xianbing Teng [Tue, 7 Dec 2021 09:15:41 +0000 (17:15 +0800)]
[NUI] Add XNames for Element
Xianbing Teng [Tue, 7 Dec 2021 09:07:45 +0000 (17:07 +0800)]
[NUI] Add XamlLoaded event for NUIApplication
Seoyeon Kim [Fri, 10 Dec 2021 08:06:09 +0000 (17:06 +0900)]
[NUI] Update Text controls API reference
- Update API reference of TextEditor / TextField / TextLabel
to match native C++ DALi descriptions.
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
Shinwoo Kim [Fri, 26 Nov 2021 05:11:58 +0000 (14:11 +0900)]
[NUI][ATSPI] Make DefaultLinearItem use its TextLabel
(1) "LabelledBy" relation makes DefaultLinearItem use its TextLabel
as accessibility name.
(2) when user does 1 finger single tap on the TextLabel, then the
DefaultLinearItem will have highlighted by "ControlledBy" relation.
This changed could be set on application side.
Shinwoo Kim [Fri, 26 Nov 2021 03:23:58 +0000 (12:23 +0900)]
[NUI][ATSPI] set RecyclerViewItem role
From this patch, it is able to set highlight to the RecyclerViewItem
and its descendant.
Jaehyun Cho [Wed, 8 Dec 2021 11:11:38 +0000 (20:11 +0900)]
[NUI] Add ContentPageLayout to calculate Content size correctly
Previously, ContentPage's Layout was AbsoluteLayout so the height of
Content was calculated to the same with the height of ContentPage,
although AppBar existed at the top of ContentPage.
Now, ContentPageLayout has been introduced and ContentPageLayout
calculates the height of Content except the height of AppBar.
Consequently, OnRelayout() is no longer required because
ContentPageLayout calculates the size and position of Content.
Suyeon Hwang [Mon, 13 Dec 2021 11:12:37 +0000 (20:12 +0900)]
[Tts][TCSACR-477] Add new API and error enum value (#3754)
* [Tts] Add missing Error enum value
* [Tts] Add new API for repeating last played text
* Fix the property name and Remove description about UTF-8
* Fix pre/post condition description to make simply understand
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Haesu Gwon [Thu, 9 Dec 2021 03:09:33 +0000 (12:09 +0900)]
[Camera] Fix UnsetExtraPreviewCallback bug (#3778)
SangHyeon Jade Lee [Wed, 8 Dec 2021 07:22:53 +0000 (16:22 +0900)]
[NUI] Version update (2.1.01)
Eunki, Hong [Wed, 8 Dec 2021 05:58:07 +0000 (14:58 +0900)]
[NUI] Set null if callback removed
When signal disconnected and signal become empty, let callback as null.
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
guowei.wang [Fri, 3 Dec 2021 12:08:59 +0000 (20:08 +0800)]
[NUI] Update TCs of NUI.Devel.
Fang Xiaohui [Thu, 2 Dec 2021 03:04:19 +0000 (11:04 +0800)]
[NUI] Fix failed in TCT
Fang Xiaohui [Thu, 2 Dec 2021 02:47:09 +0000 (10:47 +0800)]
[NUI] Fix failed in TCT
WonYoung Choi [Tue, 7 Dec 2021 09:21:13 +0000 (18:21 +0900)]
Update README.md
huiyu [Mon, 29 Nov 2021 08:40:00 +0000 (17:40 +0900)]
[NUI] Version update (2.1.00) (#3776)
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
Bowon Ryu [Fri, 8 Oct 2021 04:57:36 +0000 (13:57 +0900)]
Add more description for selection APIs
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Bowon Ryu [Mon, 13 Sep 2021 05:11:27 +0000 (14:11 +0900)]
[NUI] Make Text selection APIs public
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Fang Xiaohui [Wed, 13 Oct 2021 06:53:46 +0000 (14:53 +0800)]
[NUI] Add bindable properties to Components.
EverLEEst(SangHyeon Lee) [Wed, 3 Nov 2021 04:17:25 +0000 (13:17 +0900)]
[NUI] refactoring GraphicsType classes and Dp. Add new Type Sp
Shinwoo Kim [Tue, 23 Nov 2021 06:17:51 +0000 (15:17 +0900)]
[NUI][ATSPI] Navigator - emit accessibility event
When new page appears, we need to inform it to the screen-reader to read
its name as a default label.
And we need to inform the currently highlighted component's state on the
disappeared page. If the currently highlighted component is not visible
then it will be cleared by screen-reader.
Bowon Ryu [Tue, 23 Nov 2021 10:52:57 +0000 (19:52 +0900)]
[NUI] Add test for TextConstants, TextMapHelper
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Bowon Ryu [Tue, 23 Nov 2021 05:16:08 +0000 (14:16 +0900)]
[NUI] Add TextMapHelper class
TextUtils contains too many features and is inconsistent.
Detach the TextMapHelper functionality from the TextUtils class.
This can improves readability and reduces LOCs.
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Bowon Ryu [Tue, 23 Nov 2021 04:05:59 +0000 (13:05 +0900)]
[NUI] Separate text constants for better readability
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Shinwoo Kim [Fri, 12 Nov 2021 04:16:40 +0000 (13:16 +0900)]
[ATSPI] CollectionView - Show highlighed descendant
The 1st generation child ContentContainer is always showing. So
it was not able to show highlighted descendant by AccessibilityScrollToChild.
The child is a descendant of CollectionView from following patch.
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-toolkit/+/266414/
With this patch set, It is possible to show highlighted descendant.
Wootak Jung [Thu, 25 Nov 2021 00:07:03 +0000 (09:07 +0900)]
[Bluetooth][Non-ACR] Fix Hid unregister callback not invoke issue (#3772)
Jaehyun Cho [Tue, 23 Nov 2021 07:37:56 +0000 (16:37 +0900)]
[NUI] Fix crash when View.BackgroundImage is set
Previously, View.BackgroundImage is set, PropertyValue constructor can
be called with null pointer and this causes crash.
Now, it has been fixed not to pass null pointer to PropertyValue
constructor.
zhouleonlei [Mon, 22 Nov 2021 05:53:51 +0000 (13:53 +0800)]
[NUI] Fix svace issue
guowei.wang [Wed, 17 Nov 2021 13:47:23 +0000 (21:47 +0800)]
[NUI] Fix failed & block TCs of NUI.Devel(API10).
joogab.yun [Fri, 19 Nov 2021 04:57:43 +0000 (13:57 +0900)]
[NUI] Binding TextFitChanged event
Wonsik Jung [Fri, 19 Nov 2021 07:28:59 +0000 (16:28 +0900)]
[NUI] Add window auixiliary message event
seungho [Thu, 18 Nov 2021 09:51:07 +0000 (18:51 +0900)]
[NUI] Adds some description for the TransitionGroup
Signed-off-by: seungho <sbsh.baek@samsung.com>
seungho [Thu, 18 Nov 2021 08:31:49 +0000 (17:31 +0900)]
[NUI] Make image visual actions protected
Signed-off-by: seungho <sbsh.baek@samsung.com>
WonYoung Choi [Fri, 19 Nov 2021 06:40:24 +0000 (15:40 +0900)]
[Build] Add Tizen.NET.API9 package to resolve dependency in gbs (#3757)
Shinwoo Kim [Wed, 17 Nov 2021 06:00:06 +0000 (15:00 +0900)]
[NUI] Version update (2.0.52)
dongsug.song [Wed, 17 Nov 2021 05:27:52 +0000 (14:27 +0900)]
[NUI] Add some debug log to check reference count of disposed object
EverLEEst(SangHyeon Lee) [Fri, 12 Nov 2021 08:31:13 +0000 (17:31 +0900)]
Revert "[NUI][EXaml] Support DP and PX in EXaml"
This reverts commit
e7a65c8e80864158f3fb17d6ce613ec3d35a4701.
guowei.wang [Tue, 16 Nov 2021 13:02:37 +0000 (21:02 +0800)]
[NUI] Fix build errors of NUI.Devel based on API10.
Seungho Baek [Mon, 15 Nov 2021 05:29:19 +0000 (14:29 +0900)]
[NUI] Fix method to gether Views for transition
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
Shinwoo Kim [Mon, 15 Nov 2021 11:00:49 +0000 (20:00 +0900)]
[NUI][ATSPI] Calculate states based on DALi
We do not have to same job calculating states.
This patch sets make the View use DALi states.
If there is NUI specific state, then it will be overwritten.
Shinwoo Kim [Mon, 15 Nov 2021 10:47:59 +0000 (19:47 +0900)]
[NUI][ATSPI] Set Navigator, ContentPage role
Navigator should be Role.PageTabList
ContentPage should be Role.PageTab
Seoyeon Kim [Mon, 15 Nov 2021 01:37:05 +0000 (10:37 +0900)]
[NUI] Remove build warning messages
1. CS0414 : The field 'tag' is assigned but its value is never used
- Accessibility.cs and AnimatedVectorImageView.cs
2. CS1574 : XML comment has cref attribute 'TransitionOptions' that could not be resolved
- TransitionOptions.cs
3. CS0419 : Ambiguous reference in cref attribute: 'SetImage'
- ImageView.cs
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dongsug.song [Sat, 13 Nov 2021 06:43:01 +0000 (15:43 +0900)]
[NUI] Check if event handler of the DisposedQueued object is valid
- The objects that are waiting in disposeQueue are not yet signal disconnected, and their states are implict disposed.
- When dali callback comes and the obeject is in the queue, it seems that the problem will occur.
- User event callback checks IsDisposeQueued before Invoked, and if Dispose == False, IsDisposeQueued == true, then event callback is not invoked.
- when Dispose == True, User callback != NULL, throw exception.
Jaehyun Cho [Fri, 12 Nov 2021 10:55:11 +0000 (19:55 +0900)]
Revert "[NUI] Ignore ResizePolicy when View size is calculated by Layout"
This reverts commit
eeaaecd33da254f5447910ecd9b0cab89407d4ba.
By applying the original PR, TextLabel size could not be calculated
correctly because TextLabel size should be calculated in DALi.
EverLEEst(SangHyeon Lee) [Fri, 12 Nov 2021 08:00:42 +0000 (17:00 +0900)]
[NUI] Fix wrong prev size assigning on scroll relayout.
Fang Xiaohui [Mon, 18 Oct 2021 07:34:14 +0000 (15:34 +0800)]
[NUI] Add ValueGetter to BindableObject
Jaehyun Cho [Wed, 10 Nov 2021 12:59:12 +0000 (21:59 +0900)]
[NUI] Fix WrapContent View's LinearLayout size calculation
When a View's Specification was WrapContent, the View's LinearLayout did
not consider its child size correctly.
This caused that the View's Size became 0 incorrectly.
To resolve the above, LinearLayout always considers its child size and
the LinearLayout uses its child size when it calculates its own size.
Jaehyun Cho [Wed, 10 Nov 2021 12:46:19 +0000 (21:46 +0900)]
[NUI] Fix Weight calculation in LinearLayout
View's Weight is considered in LinearLayout's calculation only if the
View's Specification is MatchParent.
Because Weight is used to divide the parent's space to each child.
Previously, WrapContent View's Weight was also added to the sum of
Weights.
This caused the weighted View's size was calculated incorrectly.
Now, only MatchParent View's Weight is added to the sum of Weights.
As a result, the weighted View's size is calculated correctly.
dongsug.song [Tue, 9 Nov 2021 11:43:52 +0000 (20:43 +0900)]
[NUI] Change Color, Position2D, and etc properties to own only one instance
zhouleonlei [Thu, 11 Nov 2021 01:30:07 +0000 (09:30 +0800)]
[NUI] Fix svace issue
EverLEEst(SangHyeon Lee) [Tue, 9 Nov 2021 06:39:15 +0000 (15:39 +0900)]
[NUI] add null check in collectionview
null value is abnormal in collectionview,
but adding null value check for code management.
Xianbing Teng [Sun, 26 Sep 2021 11:21:14 +0000 (19:21 +0800)]
Revert "[NUI] Roll back to fix build error of TCT code"
This reverts commit
57b9a87490bfd7fccdc92370ef0dee8834c5e4c4.
TizenAPI-Bot [Thu, 11 Nov 2021 03:51:19 +0000 (12:51 +0900)]
Update README.md
TizenAPI-Bot [Tue, 9 Nov 2021 06:29:02 +0000 (15:29 +0900)]
Update branch-metadata.yml
WonYoung Choi [Wed, 13 Oct 2021 23:55:38 +0000 (08:55 +0900)]
Bump to API Level 10 (#3645)
seungho [Tue, 26 Oct 2021 07:47:46 +0000 (16:47 +0900)]
[NUI] Add Transition Group
Signed-off-by: seungho <sbsh.baek@samsung.com>
zhouleonlei [Tue, 9 Nov 2021 01:21:51 +0000 (09:21 +0800)]
[NUI] Fix svace issue
Taehyub Kim [Mon, 8 Nov 2021 07:32:44 +0000 (16:32 +0900)]
[NUI] Version update (2.0.51)
Jaehyun Cho [Fri, 5 Nov 2021 09:03:39 +0000 (18:03 +0900)]
[NUI] Move ChangeLayoutSiblingOrder from LayoutGroup to LayoutItem
Previously, ChangeLayoutSiblingOrder was provided by LayoutGroup.
So, any layout class inherited from LayoutItem could not use it.
Now, ChangeLayoutSiblingOrder is moved from LayoutGroup to LayoutItem.
So, all layout classes inherited from LayoutItem can use it.
This PR has been made to resolve the following issue.
https://github.sec.samsung.net/dotnet/NUIBackend/issues/87
Jaehyun Cho [Fri, 5 Nov 2021 10:59:45 +0000 (19:59 +0900)]
[NUI] Add ChangeLayoutChildOrder to LayoutGroup
ChangeLayoutChildOrder is added to LayoutGroup to change the order of the child
layout in the layout group.
This PR has been made to resolve the following issue.
https://github.sec.samsung.net/dotnet/NUIBackend/issues/87
dongsug.song [Fri, 5 Nov 2021 01:47:55 +0000 (10:47 +0900)]
[NUI] Fix some crash when NUI.Samples' running on Ubuntu
dongsug.song [Thu, 4 Nov 2021 05:55:36 +0000 (14:55 +0900)]
[NUI] Fix NUITizenGallery to run on Ubuntu VS-Code debugging
dongsug.song [Mon, 18 Oct 2021 08:01:19 +0000 (17:01 +0900)]
[NUI] Change for Size2D property to own internalSize2D which is cashed to prevent making repeated Size2D instance
abdullah [Wed, 3 Nov 2021 13:57:37 +0000 (15:57 +0200)]
[NUI] Update SelectionChanged event description
abdullah [Wed, 3 Nov 2021 11:11:20 +0000 (13:11 +0200)]
[NUI] Use present tense for LineWrapMode enum description
Wonsik Jung [Sun, 17 Oct 2021 21:05:24 +0000 (06:05 +0900)]
[NUI] Add WindowBorder Sample
Add Window Border sample for testing.
guowei.wang [Wed, 3 Nov 2021 08:39:00 +0000 (16:39 +0800)]
[NUI] Add TCs for NUI.Components.Devel.
guowei.wang [Wed, 3 Nov 2021 08:13:46 +0000 (16:13 +0800)]
[NUI] Update TCs of NUI.Devel.
Seungho Baek [Tue, 2 Nov 2021 13:15:54 +0000 (22:15 +0900)]
[NUI] Move 'using's outside of namespace
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
Seungho Baek [Mon, 1 Nov 2021 10:23:55 +0000 (19:23 +0900)]
[NUI] Make use some ImageView interop method again
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
guowei.wang [Fri, 29 Oct 2021 14:02:57 +0000 (22:02 +0800)]
[NUI] Add TCs for NUI.Components.Devel.
Jaehyun Cho [Thu, 28 Oct 2021 10:19:47 +0000 (19:19 +0900)]
[NUI] Ignore ResizePolicy when View size is calculated by Layout
View size is calculated based on Width/HeightSpecification if View's
Layout is set.
However, if View's ResizePolicy is not UseNaturalSize (default value),
then View's ResizePolicy also affects View size calculation in DALi
although View's Layout is set.
To ignore ResizePolicy when View size is calculated by View's Layout,
ResizePolicy is set with FIXED when View's Layout is set.
ResizePolicy is stored when Layout is set and it is ignored when View
size is calculated.
ResizePolicy is restored when Layout is unset and it is considered when
View size is calculated.
dongsug.song [Wed, 20 Oct 2021 06:25:43 +0000 (15:25 +0900)]
[NUI] Add comments for AddIdle()
huiyu.eun [Tue, 26 Oct 2021 05:52:56 +0000 (14:52 +0900)]
[NUI] Add Application seamless animation sample
- Remove unused samples
- Add new samples
(BrokerSample - ProviderSample)
* Install
tpk-backend --preload -i /tmp/[file].tpk
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
huiyu [Tue, 26 Oct 2021 00:41:50 +0000 (09:41 +0900)]
[NUI] Add ApplicationTransitionOptions (#3670)
- Add ApplicationTransitionOptions
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
Jaehyun Cho [Thu, 16 Sep 2021 04:33:53 +0000 (13:33 +0900)]
[NUI] Make Page.Appear/Disappear events public
This is ACR patch to make Appearing, Disappearing, Appeared, Disappeared
events of Page public.
Also PageAppearingEventArgs, PageDisppearingEventArgs,
PageAppearedEventArgs, PageDisppearedEventArgs classes are added
publicly.
bshsqa [Mon, 25 Oct 2021 04:12:15 +0000 (13:12 +0900)]
[NUI] Make transition select target control (#3622)
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
joogab.yun [Fri, 15 Oct 2021 04:57:15 +0000 (13:57 +0900)]
[NUI] Check if pan gesture need to propagation
If it's a nested scroll, calculate whether the gesture should be sent to the parent.
Daekwang Ryu [Wed, 20 Oct 2021 04:26:09 +0000 (13:26 +0900)]
[NUI] Add GLView
GLView allows drawing with OpenGL.
It creates a context, a surface and a render thread.
The render thread invokes user's callbacks.
seungho [Mon, 18 Oct 2021 05:42:14 +0000 (14:42 +0900)]
[NUI] refactoring visual actions
Signed-off-by: seungho <sbsh.baek@samsung.com>
guowei.wang [Mon, 18 Oct 2021 09:37:48 +0000 (17:37 +0800)]
[NUI] Fix dependencies issue of Components.Devel project.
Jaehyun Cho [Thu, 14 Oct 2021 12:51:18 +0000 (21:51 +0900)]
[NUI] Fix GridLayout to fill expanded size correctly
Previously, child did not fill to the expanded size if the child had
positive Width/HeightSpecification.
e.g. Let child's WidthSpecification = 100
Let child's HeightSpecification = 100
Let child's expanded size (row and col's size) be (200, 200)
Let child's Stretch mode be ExpandAndFill.
(child should fill to the expanded size)
Then, child's size became (100, 100) instead of fill to (200, 200)
Changing child's Width/HeightSpecification to assign
MeasuredWidth/Height could cause child's size changed.
Moreover, the changed size was not recalculated to the expanded size.
Now, child's size change is reverted so the child's size is not changed.
But the way of fixing this bug should be modified in a better way later.
e.g. Assigning MeasuredWidth/Height without changing
Width/HeightSpecification.
Jaehyun Cho [Thu, 14 Oct 2021 11:14:48 +0000 (20:14 +0900)]
[NUI] Fix GridLayout to calculate child's size proportional to span
Previously, child's size was not proportional to its span.
e.g. width of span 1 was the same with width of span 2.
Now, child's size is proportional to its span.
seungho [Wed, 15 Sep 2021 12:06:39 +0000 (21:06 +0900)]
[NUI] Make public page transitions
Signed-off-by: seungho <sbsh.baek@samsung.com>
Jaehyun Cho [Mon, 18 Oct 2021 11:16:09 +0000 (20:16 +0900)]
[NUI] Fix ContentPage to calculate AppBar and Content size correctly
Previously, the size of AppBar and Content was set by setting Size2D
property.
This caused AppBar and Content to change their
Width/HeightSpecification.
Consequently, the size of AppBar and Content was not recalculated when
window size was changed.
Now, the size of AppBar and Content is set by SetSize() method.
Since SetSize() method does not change Width/HeightSpecification, the
size of AppBar and Content is recalculated correctly when window size is
changed.