Searched hist:"1 dd1976fbaa9dae0f91b69ed608452de11c71083" (Results 1 – 4 of 4) sorted by relevance
/haiku/src/apps/deskbar/ |
H A D | StatusView.h | 1dd1976fbaa9dae0f91b69ed608452de11c71083 Thu Jan 04 05:50:22 UTC 2018 John Scipione <jscipione@gmail.com> Deskbar: update time width based on Deskbar orientation.
Fixes #8641
To fix this bug first I had to fix a long-standing todo: TODO: SetOrientation never gets called, fix that when in vertical mode, we want to limit the width so that it can't overlap the bevels in the parent view.
I made TBarView a friend class of TReplicantTray and called fReplicantTray->fTime->SetOrientation() when switching between horizontal and vertical mode. I could have added a setter method instead but I didn't feel like it was worth it.
SetOrientation calls ResizedToPreferred which calls GetPreferredSize, which resizes the text width, then it calls CalculateTextPlacement which places the time string correctly.
Removed GetCurrentTime invocation from GetPreferredSize since that happens in Update already. Was added in 573f748c5f8fb7ed75beb0ceb7eb097d3ab0c038 originally.
Also need to call SetOrientation in TReplicantTray::AttachedToWindow just after creating the TTime object in order for it to resize the time view correctly on startup in horizontal mode. It needs to know that it is horizontal so that it will expand to fit longer than default time string.
|
H A D | TimeView.cpp | 1dd1976fbaa9dae0f91b69ed608452de11c71083 Thu Jan 04 05:50:22 UTC 2018 John Scipione <jscipione@gmail.com> Deskbar: update time width based on Deskbar orientation.
Fixes #8641
To fix this bug first I had to fix a long-standing todo: TODO: SetOrientation never gets called, fix that when in vertical mode, we want to limit the width so that it can't overlap the bevels in the parent view.
I made TBarView a friend class of TReplicantTray and called fReplicantTray->fTime->SetOrientation() when switching between horizontal and vertical mode. I could have added a setter method instead but I didn't feel like it was worth it.
SetOrientation calls ResizedToPreferred which calls GetPreferredSize, which resizes the text width, then it calls CalculateTextPlacement which places the time string correctly.
Removed GetCurrentTime invocation from GetPreferredSize since that happens in Update already. Was added in 573f748c5f8fb7ed75beb0ceb7eb097d3ab0c038 originally.
Also need to call SetOrientation in TReplicantTray::AttachedToWindow just after creating the TTime object in order for it to resize the time view correctly on startup in horizontal mode. It needs to know that it is horizontal so that it will expand to fit longer than default time string.
|
H A D | StatusView.cpp | 1dd1976fbaa9dae0f91b69ed608452de11c71083 Thu Jan 04 05:50:22 UTC 2018 John Scipione <jscipione@gmail.com> Deskbar: update time width based on Deskbar orientation.
Fixes #8641
To fix this bug first I had to fix a long-standing todo: TODO: SetOrientation never gets called, fix that when in vertical mode, we want to limit the width so that it can't overlap the bevels in the parent view.
I made TBarView a friend class of TReplicantTray and called fReplicantTray->fTime->SetOrientation() when switching between horizontal and vertical mode. I could have added a setter method instead but I didn't feel like it was worth it.
SetOrientation calls ResizedToPreferred which calls GetPreferredSize, which resizes the text width, then it calls CalculateTextPlacement which places the time string correctly.
Removed GetCurrentTime invocation from GetPreferredSize since that happens in Update already. Was added in 573f748c5f8fb7ed75beb0ceb7eb097d3ab0c038 originally.
Also need to call SetOrientation in TReplicantTray::AttachedToWindow just after creating the TTime object in order for it to resize the time view correctly on startup in horizontal mode. It needs to know that it is horizontal so that it will expand to fit longer than default time string.
|
H A D | BarView.cpp | 1dd1976fbaa9dae0f91b69ed608452de11c71083 Thu Jan 04 05:50:22 UTC 2018 John Scipione <jscipione@gmail.com> Deskbar: update time width based on Deskbar orientation.
Fixes #8641
To fix this bug first I had to fix a long-standing todo: TODO: SetOrientation never gets called, fix that when in vertical mode, we want to limit the width so that it can't overlap the bevels in the parent view.
I made TBarView a friend class of TReplicantTray and called fReplicantTray->fTime->SetOrientation() when switching between horizontal and vertical mode. I could have added a setter method instead but I didn't feel like it was worth it.
SetOrientation calls ResizedToPreferred which calls GetPreferredSize, which resizes the text width, then it calls CalculateTextPlacement which places the time string correctly.
Removed GetCurrentTime invocation from GetPreferredSize since that happens in Update already. Was added in 573f748c5f8fb7ed75beb0ceb7eb097d3ab0c038 originally.
Also need to call SetOrientation in TReplicantTray::AttachedToWindow just after creating the TTime object in order for it to resize the time view correctly on startup in horizontal mode. It needs to know that it is horizontal so that it will expand to fit longer than default time string.
|