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:
@@ -89,14 +89,6 @@ ControllerView::MessageReceived(BMessage* message)
|
|||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
uint32
|
|
||||||
ControllerView::EnabledButtons()
|
|
||||||
{
|
|
||||||
// TODO: superflous
|
|
||||||
return 0xffffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ControllerView::TogglePlaying()
|
ControllerView::TogglePlaying()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ public:
|
|||||||
~ControllerView();
|
~ControllerView();
|
||||||
|
|
||||||
// TransportControlGroup interface
|
// TransportControlGroup interface
|
||||||
virtual uint32 EnabledButtons();
|
|
||||||
virtual void TogglePlaying();
|
virtual void TogglePlaying();
|
||||||
virtual void Stop();
|
virtual void Stop();
|
||||||
virtual void Rewind();
|
virtual void Rewind();
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ TransportControlGroup::TransportControlGroup(BRect frame, bool useSkipButtons,
|
|||||||
fPlayPause(NULL),
|
fPlayPause(NULL),
|
||||||
fStop(NULL),
|
fStop(NULL),
|
||||||
fMute(NULL),
|
fMute(NULL),
|
||||||
fSymbolScale(1.0f)
|
fSymbolScale(1.0f),
|
||||||
|
fLastEnabledButtons(0)
|
||||||
{
|
{
|
||||||
// Pick a symbol size based on the current system font size, but make
|
// 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
|
// sure the size is uneven, so the pointy shapes have their middle on
|
||||||
@@ -284,7 +285,7 @@ TransportControlGroup::MessageReceived(BMessage* message)
|
|||||||
uint32
|
uint32
|
||||||
TransportControlGroup::EnabledButtons()
|
TransportControlGroup::EnabledButtons()
|
||||||
{
|
{
|
||||||
return 0;
|
return fLastEnabledButtons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -363,6 +364,8 @@ TransportControlGroup::SetEnabled(uint32 buttons)
|
|||||||
if (!LockLooper())
|
if (!LockLooper())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
fLastEnabledButtons = buttons;
|
||||||
|
|
||||||
fSeekSlider->SetEnabled(buttons & SEEK_ENABLED);
|
fSeekSlider->SetEnabled(buttons & SEEK_ENABLED);
|
||||||
fSeekSlider->SetToolTip((buttons & SEEK_ENABLED) != 0
|
fSeekSlider->SetToolTip((buttons & SEEK_ENABLED) != 0
|
||||||
? fPositionToolTip : NULL);
|
? fPositionToolTip : NULL);
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ private:
|
|||||||
BGroupLayout* fControlLayout;
|
BGroupLayout* fControlLayout;
|
||||||
|
|
||||||
float fSymbolScale;
|
float fSymbolScale;
|
||||||
|
uint32 fLastEnabledButtons;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TRANSPORT_CONTROL_GROUP_H
|
#endif // TRANSPORT_CONTROL_GROUP_H
|
||||||
|
|||||||
Reference in New Issue
Block a user