MediaPlayer: Toggling Fullscreen wrongly reset control status
All controls were enabled when toggling fullscreen on and off; now it recalls the argument last used in SetEnabled() and reuse it when called in AttachedInWindow() (which occurs in such toggling) Fixes #8804.
This commit is contained in:
parent
a70b623a51
commit
53312de5e5
@ -89,14 +89,6 @@ ControllerView::MessageReceived(BMessage* message)
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
uint32
|
||||
ControllerView::EnabledButtons()
|
||||
{
|
||||
// TODO: superflous
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ControllerView::TogglePlaying()
|
||||
{
|
||||
|
@ -38,7 +38,6 @@ public:
|
||||
~ControllerView();
|
||||
|
||||
// TransportControlGroup interface
|
||||
virtual uint32 EnabledButtons();
|
||||
virtual void TogglePlaying();
|
||||
virtual void Stop();
|
||||
virtual void Rewind();
|
||||
|
@ -66,7 +66,8 @@ TransportControlGroup::TransportControlGroup(BRect frame, bool useSkipButtons,
|
||||
fPlayPause(NULL),
|
||||
fStop(NULL),
|
||||
fMute(NULL),
|
||||
fSymbolScale(1.0f)
|
||||
fSymbolScale(1.0f),
|
||||
fLastEnabledButtons(0)
|
||||
{
|
||||
// Pick a symbol size based on the current system font size, but make
|
||||
// sure the size is uneven, so the pointy shapes have their middle on
|
||||
@ -284,7 +285,7 @@ TransportControlGroup::MessageReceived(BMessage* message)
|
||||
uint32
|
||||
TransportControlGroup::EnabledButtons()
|
||||
{
|
||||
return 0;
|
||||
return fLastEnabledButtons;
|
||||
}
|
||||
|
||||
|
||||
@ -363,6 +364,8 @@ TransportControlGroup::SetEnabled(uint32 buttons)
|
||||
if (!LockLooper())
|
||||
return;
|
||||
|
||||
fLastEnabledButtons = buttons;
|
||||
|
||||
fSeekSlider->SetEnabled(buttons & SEEK_ENABLED);
|
||||
fSeekSlider->SetToolTip((buttons & SEEK_ENABLED) != 0
|
||||
? fPositionToolTip : NULL);
|
||||
|
@ -122,6 +122,7 @@ private:
|
||||
BGroupLayout* fControlLayout;
|
||||
|
||||
float fSymbolScale;
|
||||
uint32 fLastEnabledButtons;
|
||||
};
|
||||
|
||||
#endif // TRANSPORT_CONTROL_GROUP_H
|
||||
|
Loading…
Reference in New Issue
Block a user