Kaydet (Commit) 50acead1 authored tarafından Noel Grandin's avatar Noel Grandin

convert WB_SLIDERSET to a bool field

Change-Id: I8a3767e162a14069937d52f5eb57ae5cd7f3fa7b
Reviewed-on: https://gerrit.libreoffice.org/41302Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 41051749
...@@ -133,7 +133,8 @@ void MediaControlBase::InitializeWidgets() ...@@ -133,7 +133,8 @@ void MediaControlBase::InitializeWidgets()
mpTimeSlider->SetRange( Range( 0, AVMEDIA_TIME_RANGE ) ); mpTimeSlider->SetRange( Range( 0, AVMEDIA_TIME_RANGE ) );
mpTimeSlider->SetUpdateMode( true ); mpTimeSlider->SetUpdateMode( true );
mpTimeSlider->SetStyle(WB_HORZ | WB_DRAG | WB_3DLOOK | WB_SLIDERSET); mpTimeSlider->SetStyle(WB_HORZ | WB_DRAG | WB_3DLOOK);
mpTimeSlider->SetScrollTypeSet(true);
} }
void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem) void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem)
......
...@@ -46,9 +46,11 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl ...@@ -46,9 +46,11 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
meControlStyle( eControlStyle ) meControlStyle( eControlStyle )
{ {
mpPlayToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ; mpPlayToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ;
mpTimeSlider = VclPtr<Slider>::Create(this, WB_HORZ | WB_DRAG | WB_3DLOOK | WB_SLIDERSET) ; mpTimeSlider = VclPtr<Slider>::Create(this, WB_HORZ | WB_DRAG | WB_3DLOOK) ;
mpTimeSlider->SetScrollTypeSet(true);
mpMuteToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ; mpMuteToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ;
mpVolumeSlider = VclPtr<Slider>::Create(this, WB_HORZ | WB_DRAG | WB_SLIDERSET) ; mpVolumeSlider = VclPtr<Slider>::Create(this, WB_HORZ | WB_DRAG) ;
mpVolumeSlider->SetScrollTypeSet(true);
mpZoomToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ; mpZoomToolBox = VclPtr<ToolBox>::Create(this, WB_3DLOOK) ;
mpZoomListBox = VclPtr<ListBox>::Create( mpZoomToolBox.get(), WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_3DLOOK ) ; mpZoomListBox = VclPtr<ListBox>::Create( mpZoomToolBox.get(), WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_3DLOOK ) ;
mpTimeEdit = VclPtr<Edit>::Create(this, WB_CENTER | WB_READONLY | WB_BORDER | WB_3DLOOK ) ; mpTimeEdit = VclPtr<Edit>::Create(this, WB_CENTER | WB_READONLY | WB_BORDER | WB_3DLOOK ) ;
......
...@@ -267,11 +267,7 @@ WinBits const WB_PATH = 0x00100000; ...@@ -267,11 +267,7 @@ WinBits const WB_PATH = 0x00100000;
WinBits const WB_OPEN = 0x00200000; WinBits const WB_OPEN = 0x00200000;
WinBits const WB_SAVEAS = 0x00400000; WinBits const WB_SAVEAS = 0x00400000;
// For Slider
// Window-Bits for TabControl
WinBits const WB_SLIDERSET = 0x02000000;
// WindowAlign
enum class WindowAlign { Left, Top, Right, Bottom }; enum class WindowAlign { Left, Top, Right, Bottom };
......
...@@ -49,6 +49,7 @@ private: ...@@ -49,6 +49,7 @@ private:
ScrollType meScrollType; ScrollType meScrollType;
bool mbCalcSize; bool mbCalcSize;
bool mbFullDrag; bool mbFullDrag;
bool mbScrollTypeSet;
VclPtr<NumericField> mpLinkedField; VclPtr<NumericField> mpLinkedField;
...@@ -104,6 +105,7 @@ public: ...@@ -104,6 +105,7 @@ public:
long GetLineSize() const { return mnLineSize; } long GetLineSize() const { return mnLineSize; }
void SetPageSize( long nNewSize ) { mnPageSize = nNewSize; } void SetPageSize( long nNewSize ) { mnPageSize = nNewSize; }
long GetPageSize() const { return mnPageSize; } long GetPageSize() const { return mnPageSize; }
void SetScrollTypeSet(bool b) { mbScrollTypeSet = b; }
Size CalcWindowSizePixel(); Size CalcWindowSizePixel();
......
...@@ -57,6 +57,7 @@ void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle ) ...@@ -57,6 +57,7 @@ void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle )
meScrollType = ScrollType::DontKnow; meScrollType = ScrollType::DontKnow;
mbCalcSize = true; mbCalcSize = true;
mbFullDrag = true; mbFullDrag = true;
mbScrollTypeSet = false;
mpLinkedField = nullptr; mpLinkedField = nullptr;
...@@ -627,7 +628,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt ) ...@@ -627,7 +628,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
} }
else if ( ImplIsPageUp( rMousePos ) ) else if ( ImplIsPageUp( rMousePos ) )
{ {
if( GetStyle() & WB_SLIDERSET ) if( mbScrollTypeSet )
meScrollType = ScrollType::Set; meScrollType = ScrollType::Set;
else else
{ {
...@@ -637,7 +638,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt ) ...@@ -637,7 +638,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
} }
else if ( ImplIsPageDown( rMousePos ) ) else if ( ImplIsPageDown( rMousePos ) )
{ {
if( GetStyle() & WB_SLIDERSET ) if( mbScrollTypeSet )
meScrollType = ScrollType::Set; meScrollType = ScrollType::Set;
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment