Git commit df2c40a8d3ad58a76890958441f7383dd0df4962 by Emmanuel Lepage Vall= ee. Committed on 30/06/2014 at 21:02. Pushed by lepagevalleeemmanuel into branch 'master'. [ #50490 ] Add video aspect ratio configuration options M +13 -0 src/actioncollection.cpp M +2 -0 src/actioncollection.h M +10 -1 src/klib/sflphone-client-kde.kcfg M +1 -0 src/widgets/videodock.cpp M +23 -3 src/widgets/videoglframe.cpp M +3 -0 src/widgets/videoglframe.h M +11 -0 src/widgets/videoscene.cpp M +1 -0 src/widgets/videoscene.h M +1 -0 src/widgets/videotoolbar.cpp M +21 -2 src/widgets/videowidget3.cpp M +2 -0 src/widgets/videowidget3.h http://commits.kde.org/sflphone-kde/df2c40a8d3ad58a76890958441f7383dd0df4962 diff --git a/src/actioncollection.cpp b/src/actioncollection.cpp index 41d9fe1..3e86e1c 100644 --- a/src/actioncollection.cpp +++ b/src/actioncollection.cpp @@ -104,26 +104,34 @@ action_editToolBar(nullptr), action_addContact(nullpt= r), action_screen(nullptr) action_video_flip_vertical =3D new ExtendedAction(this); action_video_mute =3D new ExtendedAction(this); action_video_preview =3D new ExtendedAction(this); + action_video_scale =3D new ExtendedAction(this); action_video_rotate_left ->setText ( i18n( "Rotate left" ) ); action_video_rotate_right ->setText ( i18n( "Rotate right" ) ); action_video_flip_horizontal ->setText ( i18n( "Flip" ) ); action_video_flip_vertical ->setText ( i18n( "Flip" ) ); action_video_mute ->setText ( i18n( "Mute" ) ); action_video_preview ->setText ( i18n( "Preview" ) ); + action_video_scale ->setText ( i18n( "Keep aspect ratio" = )); action_video_rotate_left ->setAltIcon(KIcon("object-rotate-left" = )); action_video_rotate_right ->setAltIcon(KIcon("object-rotate-right" = )); action_video_flip_horizontal ->setAltIcon(KIcon("object-flip-horizontal= ")); action_video_flip_vertical ->setAltIcon(KIcon("object-flip-vertical" = )); action_video_mute ->setAltIcon(KIcon("camera-web" = )); action_video_preview ->setAltIcon(KIcon("view-preview" = )); + action_video_scale ->setAltIcon(KIcon("transform-scale" = )); action_video_rotate_left ->setIcon(KIcon("object-rotate-left" )); action_video_rotate_right ->setIcon(KIcon("object-rotate-right" )); action_video_flip_horizontal ->setIcon(KIcon("object-flip-horizontal")); action_video_flip_vertical ->setIcon(KIcon("object-flip-vertical" )); action_video_mute ->setIcon(KIcon("camera-web" )); action_video_preview ->setIcon(KIcon("view-preview" )); + action_video_scale ->setIcon(KIcon("transform-scale" = )); action_video_preview ->setCheckable(true); + action_video_scale ->setCheckable(true); action_video_mute ->setCheckable(true); + + action_video_scale ->setChecked(ConfigurationSkeleton::keepVi= deoAspectRatio()); + action_video_preview ->setChecked(ConfigurationSkeleton::displa= yVideoPreview()); #endif } = @@ -642,4 +650,9 @@ ExtendedAction* ActionCollection::videoPreviewAction = () { return action_video_preview; } + +ExtendedAction* ActionCollection::videoScaleAction () +{ + return action_video_scale; +} #endif diff --git a/src/actioncollection.h b/src/actioncollection.h index 42f72a2..21bf8c7 100644 --- a/src/actioncollection.h +++ b/src/actioncollection.h @@ -70,6 +70,7 @@ public: ExtendedAction* videoFlipVerticalAction (); ExtendedAction* videoMuteAction (); ExtendedAction* videoPreviewAction (); + ExtendedAction* videoScaleAction (); #endif = private: @@ -94,6 +95,7 @@ private: ExtendedAction* action_video_flip_vertical ; ExtendedAction* action_video_mute ; ExtendedAction* action_video_preview ; + ExtendedAction* action_video_scale ; #endif = //Other actions diff --git a/src/klib/sflphone-client-kde.kcfg b/src/klib/sflphone-client-k= de.kcfg index fec1a9a..3c755af 100644 --- a/src/klib/sflphone-client-kde.kcfg +++ b/src/klib/sflphone-client-kde.kcfg @@ -112,7 +112,16 @@