diff --git a/src/assets/assetlist/view/qml/assetList.qml b/src/assets/assetlist/view/qml/assetList.qml index efdd93001..0771ee4f3 100644 --- a/src/assets/assetlist/view/qml/assetList.qml +++ b/src/assets/assetlist/view/qml/assetList.qml @@ -1,382 +1,382 @@ /*************************************************************************** * Copyright (C) 2017 by Nicolas Carion * * This file is part of Kdenlive. See www.kdenlive.org. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) version 3 or any later version accepted by the * * membership of KDE e.V. (or its successor approved by the membership * * of KDE e.V.), which shall act as a proxy defined in Section 14 of * * version 3 of the license. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * ***************************************************************************/ import QtQuick 2.7 import QtQuick.Layouts 1.3 import QtQuick.Controls 1.5 import QtQuick.Controls.Styles 1.4 import QtQuick.Window 2.2 import QtQml.Models 2.2 Rectangle { id: listRoot SystemPalette { id: activePalette } color: activePalette.window function assetType(){ return isEffectList ? i18n("effects") : i18n("compositions"); } function expandNodes(indexes) { for(var i = 0; i < indexes.length; i++) { if (indexes[i].valid) { treeView.expand(indexes[i]); } } } function rowPosition(model, index) { var pos = 0; for(var i = 0; i < index.parent.row; i++) { var catIndex = model.getCategory(i); if (treeView.isExpanded(catIndex)) { pos += model.rowCount(catIndex); } pos ++; } pos += index.row + 2; return pos; } ColumnLayout { anchors.fill: parent spacing: 0 RowLayout { Layout.fillWidth: true Layout.fillHeight: false spacing: 4 ExclusiveGroup { id: filterGroup} ToolButton { id: searchList iconName: "edit-find" checkable: true tooltip: isEffectList ? i18n("Find effect") : i18n("Find composition") onCheckedChanged: { searchInput.visible = searchList.checked searchInput.focus = searchList.checked if (!searchList.checked) { searchInput.text = '' treeView.focus = true } } } ToolButton { id: showAll iconName: "show-all-effects" checkable: true checked: true exclusiveGroup: filterGroup tooltip: i18n("Main %1", assetType()) onClicked: { assetlist.setFilterType("") } } ToolButton { id: showVideo visible: isEffectList iconName: "kdenlive-show-video" iconSource: 'qrc:///pics/kdenlive-show-video.svgz' checkable:true exclusiveGroup: filterGroup tooltip: i18n("Show all video effects") onClicked: { assetlist.setFilterType("video") } } ToolButton { id: showAudio visible: isEffectList iconName: "kdenlive-show-audio" iconSource: 'qrc:///pics/kdenlive-show-audio.svgz' checkable:true exclusiveGroup: filterGroup tooltip: i18n("Show all audio effects") onClicked: { assetlist.setFilterType("audio") } } ToolButton { id: showCustom visible: isEffectList iconName: "kdenlive-custom-effect" checkable:true exclusiveGroup: filterGroup tooltip: i18n("Show all custom effects") onClicked: { assetlist.setFilterType("custom") } } ToolButton { id: showFavorites iconName: "favorite" checkable:true exclusiveGroup: filterGroup tooltip: i18n("Show favorite items") onClicked: { assetlist.setFilterType("favorites") } } ToolButton { id: downloadTransitions visible: !isEffectList iconName: "edit-download" tooltip: i18n("Download New Wipes...") onClicked: { assetlist.downloadNewLumas() } } Rectangle { //This is a spacer Layout.fillHeight: false Layout.fillWidth: true color: "transparent" } ToolButton { id: showDescription iconName: "help-about" checkable:true tooltip: i18n("Show/hide description of the %1", assetType()) onCheckedChanged:{ assetlist.showDescription = checked } Component.onCompleted: checked = assetlist.showDescription } } TextField { id: searchInput Layout.fillWidth:true visible: false Image { id: clear source: 'image://icon/edit-clear' width: parent.height * 0.8 height: width anchors { right: parent.right; rightMargin: 8; verticalCenter: parent.verticalCenter } opacity: 0 MouseArea { anchors.fill: parent onClicked: { searchInput.text = ''; searchInput.focus = true; searchList.checked = false; } } } states: State { name: "hasText"; when: searchInput.text != '' PropertyChanges { target: clear; opacity: 1 } } transitions: [ Transition { from: ""; to: "hasText" NumberAnimation { properties: "opacity" } }, Transition { from: "hasText"; to: "" NumberAnimation { properties: "opacity" } } ] onTextChanged: { var current = sel.currentIndex var rowModelIndex = assetListModel.getModelIndex(sel.currentIndex); assetlist.setFilterName(text) if (text.length > 0) { sel.setCurrentIndex(assetListModel.firstVisibleItem(current), ItemSelectionModel.ClearAndSelect) } else { sel.clearCurrentIndex() sel.setCurrentIndex(assetListModel.getProxyIndex(rowModelIndex), ItemSelectionModel.ClearAndSelect) } treeView.__listView.positionViewAtIndex(rowPosition(assetListModel, sel.currentIndex), ListView.Visible) } /*onEditingFinished: { if (!assetContextMenu.isDisplayed) { searchList.checked = false } }*/ Keys.onDownPressed: { sel.setCurrentIndex(assetListModel.getNextChild(sel.currentIndex), ItemSelectionModel.ClearAndSelect) treeView.expand(sel.currentIndex.parent) treeView.__listView.positionViewAtIndex(rowPosition(assetListModel, sel.currentIndex), ListView.Visible) } Keys.onUpPressed: { sel.setCurrentIndex(assetListModel.getPreviousChild(sel.currentIndex), ItemSelectionModel.ClearAndSelect) treeView.expand(sel.currentIndex.parent) treeView.__listView.positionViewAtIndex(rowPosition(assetListModel, sel.currentIndex), ListView.Visible) } Keys.onReturnPressed: { if (sel.hasSelection) { assetlist.activate(sel.currentIndex) searchList.checked = false } } } ItemSelectionModel { id: sel model: assetListModel onSelectionChanged: { assetDescription.text = assetlist.getDescription(sel.currentIndex) } } SplitView { orientation: Qt.Vertical Layout.fillHeight: true Layout.fillWidth: true TreeView { id: treeView Layout.fillHeight: true Layout.fillWidth: true alternatingRowColors: false headerVisible: false selection: sel selectionMode: SelectionMode.SingleSelection itemDelegate: Rectangle { id: assetDelegate // These anchors are important to allow "copy" dragging anchors.verticalCenter: parent ? parent.verticalCenter : undefined anchors.right: parent ? parent.right : undefined property bool isItem : styleData.value !== "root" && styleData.value !== "" property string mimeType : isItem ? assetlist.getMimeType(styleData.value) : "" height: assetText.implicitHeight color: dragArea.containsMouse ? activePalette.highlight : "transparent" Drag.active: isItem ? dragArea.drag.active : false Drag.dragType: Drag.Automatic Drag.supportedActions: Qt.CopyAction Drag.mimeData: isItem ? assetlist.getMimeData(styleData.value) : {} Drag.keys:[ isItem ? assetlist.getMimeType(styleData.value) : "" ] Row { anchors.fill:parent anchors.leftMargin: 1 anchors.topMargin: 1 anchors.bottomMargin: 1 spacing: 4 Image{ id: assetThumb anchors.verticalCenter: parent.verticalCenter visible: assetDelegate.isItem property bool isFavorite: model == undefined || model.favorite === undefined ? false : model.favorite height: parent.height * 0.8 width: height source: 'image://asseticon/' + styleData.value } Label { id: assetText font.bold : assetThumb.isFavorite text: assetlist.getName(styleData.index) } } MouseArea { id: dragArea anchors.fill: assetDelegate hoverEnabled: true acceptedButtons: Qt.LeftButton | Qt.RightButton drag.target: undefined onReleased: { drag.target = undefined } onPressed: { if (assetDelegate.isItem) { //sel.select(styleData.index, ItemSelectionModel.Select) sel.setCurrentIndex(styleData.index, ItemSelectionModel.ClearAndSelect) if (mouse.button === Qt.LeftButton) { drag.target = parent parent.grabToImage(function(result) { parent.Drag.imageSource = result.url }) } else { drag.target = undefined assetContextMenu.isItemFavorite = assetThumb.isFavorite assetContextMenu.popup() mouse.accepted = false } console.log(parent.Drag.keys) } else { if (treeView.isExpanded(styleData.index)) { treeView.collapse(styleData.index) } else { treeView.expand(styleData.index) } } treeView.focus = true } onDoubleClicked: { if (isItem) { assetlist.activate(styleData.index) } } } } Menu { id: assetContextMenu property bool isItemFavorite property bool isDisplayed: false MenuItem { id: favMenu - text: assetContextMenu.isItemFavorite ? "Remove from favorites" : "Add to favorites" + text: assetContextMenu.isItemFavorite ? i18n("Remove from favorites") : i18n("Add to favorites") property url thumbSource onTriggered: { assetlist.setFavorite(sel.currentIndex, !assetContextMenu.isItemFavorite) } } onAboutToShow: { isDisplayed = true; } onAboutToHide: { isDisplayed = false; } } - TableViewColumn { role: "identifier"; title: "Name"; } + TableViewColumn { role: "identifier"; title: ш18т("Name"); } model: assetListModel Keys.onDownPressed: { sel.setCurrentIndex(assetListModel.getNextChild(sel.currentIndex), ItemSelectionModel.ClearAndSelect) treeView.expand(sel.currentIndex.parent) treeView.__listView.positionViewAtIndex(rowPosition(assetListModel, sel.currentIndex), ListView.Visible) } Keys.onUpPressed: { sel.setCurrentIndex(assetListModel.getPreviousChild(sel.currentIndex), ItemSelectionModel.ClearAndSelect) treeView.expand(sel.currentIndex.parent) treeView.__listView.positionViewAtIndex(rowPosition(assetListModel, sel.currentIndex), ListView.Visible) } Keys.onReturnPressed: { if (sel.hasSelection) { assetlist.activate(sel.currentIndex) } } } TextArea { id: assetDescription text: "" visible: showDescription.checked readOnly: true Layout.fillWidth: true states: State { name: "hasDescription"; when: assetDescription.text != '' && showDescription.checked PropertyChanges { target: assetDescription; visible: true} } } } } } diff --git a/src/effects/effectstack/view/qml/BuiltStack.qml b/src/effects/effectstack/view/qml/BuiltStack.qml index 773002810..c1845d460 100644 --- a/src/effects/effectstack/view/qml/BuiltStack.qml +++ b/src/effects/effectstack/view/qml/BuiltStack.qml @@ -1,50 +1,50 @@ import QtQuick 2.6 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 Rectangle { id: root objectName: "builtinstack" signal valueChanged(string text, int val) //signal parameterChanged(string effectId, string paramName, double val) SystemPalette { id: activePalette } color: activePalette.window signal clipClicked() FontMetrics { id: fontMetrics font.family: "Arial" } ColumnLayout { anchors.left: parent.left anchors.right: parent.right EffectSlider { id: slider1 sliderIcon: 'speedometer' - sliderLabel: 'Speed' + sliderLabel: i18n("Speed") paramName: 'speed' slider_max: 300 slider_def: 100 } LiftGammaGain { id: color_correct } } function resetStack() { color_correct.loadWheels() } function setSpeed(speed) { if (speed == 0) { speed = 100; } slider1.setValue(speed) } } diff --git a/src/monitor/view/EffectToolBar.qml b/src/monitor/view/EffectToolBar.qml index 3edbf3e73..12405d8e7 100644 --- a/src/monitor/view/EffectToolBar.qml +++ b/src/monitor/view/EffectToolBar.qml @@ -1,53 +1,53 @@ import QtQuick.Controls 1.3 import QtQuick.Controls.Styles 1.3 import QtQuick 2.0 Rectangle { id: effecttoolbar objectName: "effecttoolbar" width: fullscreenButton.width height: childrenRect.height color: Qt.rgba(activePalette.window.r, activePalette.window.g, activePalette.window.b, 0.7) radius: 4 border.color : Qt.rgba(0, 0, 0, 0.3) border.width: 1 Column { ToolButton { id: fullscreenButton objectName: "fullScreen" iconName: "view-fullscreen" - tooltip: "Switch Full Screen" + tooltip: i18n("Switch Full Screen") onClicked: controller.triggerAction('monitor_fullscreen') } ToolButton { objectName: "nextKeyframe" iconName: "go-next" tooltip: "Go to Next Keyframe" onClicked: controller.seekNextKeyframe() } ToolButton { objectName: "prevKeyframe" iconName: "go-previous" - tooltip: "Go to Previous Keyframe" + tooltip: i18n("Go to Previous Keyframe") onClicked: controller.seekPreviousKeyframe() } ToolButton { objectName: "addKeyframe" iconName: "list-add" - tooltip: "Add/Remove Keyframe" + tooltip: i18n("Add/Remove Keyframe") onClicked: controller.addRemoveKeyframe() } ToolButton { iconName: "zoom-in" - tooltip: "Zoom in" + tooltip: i18n("Zoom in") onClicked: controller.triggerAction('monitor_zoomin') } ToolButton { iconName: "zoom-out" - tooltip: "Zoom out" + tooltip: i18n("Zoom out") onClicked: controller.triggerAction('monitor_zoomout') } } } diff --git a/src/monitor/view/SceneToolBar.qml b/src/monitor/view/SceneToolBar.qml index 470b7589c..49d21336f 100644 --- a/src/monitor/view/SceneToolBar.qml +++ b/src/monitor/view/SceneToolBar.qml @@ -1,71 +1,71 @@ import QtQuick.Controls 1.3 import QtQuick.Controls.Styles 1.3 import QtQuick.Layouts 1.3 import QtQuick 2.0 Rectangle { id: scenetoolbar objectName: "scenetoolbar" width: fullscreenButton.width height: childrenRect.height SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } color: Qt.rgba(myPalette.window.r, myPalette.window.g, myPalette.window.b, 0.7) radius: 4 border.color : Qt.rgba(0, 0, 0, 0.3) border.width: 1 Column { ToolButton { id: fullscreenButton objectName: "fullScreen" iconName: "view-fullscreen" - tooltip: "Switch Full Screen" + tooltip: i18n("Switch Full Screen") onClicked: { controller.activateClipMonitor(root.isClipMonitor) controller.triggerAction('monitor_fullscreen') } } ToolButton { objectName: "switchOverlay" iconName: "view-grid" - tooltip: "Change Overlay" + tooltip: i18n("Change Overlay") onClicked: { root.switchOverlay() } } ToolButton { iconName: "zoom-in" - tooltip: "Zoom in" + tooltip: i18n("Zoom in") onClicked: { controller.activateClipMonitor(root.isClipMonitor) controller.triggerAction('monitor_zoomin') } } ToolButton { iconName: "zoom-out" - tooltip: "Zoom out" + tooltip: i18n("Zoom out") onClicked: { controller.activateClipMonitor(root.isClipMonitor) controller.triggerAction('monitor_zoomout') } } ToolButton { objectName: "addMarker" iconName: "list-add" - tooltip: root.isClipMonitor ? "Add Marker" : "Add Guide" + tooltip: root.isClipMonitor ? i18n("Add Marker") : i18n("Add Guide") onClicked: { controller.activateClipMonitor(root.isClipMonitor) controller.triggerAction('add_marker_guide_quickly') } } ToolButton { objectName: "removeMarker" iconName: "list-remove" - tooltip: root.isClipMonitor ? "Remove Marker" : "Remove Guide" + tooltip: root.isClipMonitor ? i18n("Remove Marker") : i18n("Remove Guide") onClicked: { controller.activateClipMonitor(root.isClipMonitor) root.isClipMonitor ? controller.triggerAction('delete_clip_marker') : controller.triggerAction('delete_guide') } } } } diff --git a/src/monitor/view/kdenliveclipmonitor.qml b/src/monitor/view/kdenliveclipmonitor.qml index 16a244965..a1f45e438 100644 --- a/src/monitor/view/kdenliveclipmonitor.qml +++ b/src/monitor/view/kdenliveclipmonitor.qml @@ -1,262 +1,262 @@ import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Window 2.2 import Kdenlive.Controls 1.0 import QtQuick 2.6 import AudioThumb 1.0 Item { id: root objectName: "root" SystemPalette { id: activePalette } // default size, but scalable by user height: 300; width: 400 property string markerText property point profile property double zoom property double scalex property double scaley property bool dropped property string fps property bool showMarkers property bool showTimecode property bool showFps property bool showSafezone property bool showAudiothumb property bool showToolbar: false property bool hasAV: controller.clipHasAV property real baseUnit: fontMetrics.font.pixelSize * 0.8 property int duration: 300 property int mouseRulerPos: 0 property double frameSize: 10 property double timeScale: 1 property int overlayType: controller.overlayType property color overlayColor: 'cyan' property bool isClipMonitor: true property int dragType: 0 FontMetrics { id: fontMetrics font.family: "Arial" } signal editCurrentMarker() signal toolBarChanged(bool doAccept) onDurationChanged: { clipMonitorRuler.updateRuler() } onWidthChanged: { clipMonitorRuler.updateRuler() } function updatePalette() { clipMonitorRuler.forceRepaint() } function switchOverlay() { if (controller.overlayType >= 5) { controller.overlayType = 0 } else { controller.overlayType = controller.overlayType + 1; } root.overlayType = controller.overlayType } MouseArea { id: barOverArea hoverEnabled: true acceptedButtons: Qt.NoButton anchors.fill: parent } SceneToolBar { id: sceneToolBar anchors { right: parent.right top: parent.top topMargin: 4 rightMargin: 4 } visible: barOverArea.mouseX >= x - 10 } Item { height: root.height - controller.rulerHeight width: root.width Item { id: frame objectName: "referenceframe" width: root.profile.x * root.scalex height: root.profile.y * root.scaley anchors.centerIn: parent Loader { anchors.fill: parent source: { switch(root.overlayType) { case 0: return ''; case 1: return "OverlayStandard.qml"; case 2: return "OverlayMinimal.qml"; case 3: return "OverlayCenter.qml"; case 4: return "OverlayCenterDiagonal.qml"; case 5: return "OverlayThirds.qml"; } } } } Item { id: monitorOverlay anchors.fill: parent QmlAudioThumb { id: audioThumb objectName: "audiothumb" property bool stateVisible: true anchors { left: parent.left bottom: parent.bottom } height: parent.height / 6 //font.pixelSize * 3 width: parent.width visible: root.showAudiothumb MouseArea { id: mouseOverArea hoverEnabled: true onExited: audioThumb.stateVisible = false onEntered: audioThumb.stateVisible = true acceptedButtons: Qt.NoButton anchors.fill: parent } states: [ State { when: audioThumb.stateVisible; PropertyChanges { target: audioThumb; opacity: 1.0 } }, State { when: !audioThumb.stateVisible; PropertyChanges { target: audioThumb; opacity: 0.0 } } ] transitions: [ Transition { NumberAnimation { property: "opacity"; duration: 500} } ] } Text { id: timecode font: fixedFont objectName: "timecode" color: "white" style: Text.Outline; styleColor: "black" text: controller.toTimecode(controller.position) visible: root.showTimecode anchors { right: parent.right bottom: parent.bottom rightMargin: 4 } } Text { id: fpsdropped font: fixedFont objectName: "fpsdropped" color: root.dropped ? "red" : "white" style: Text.Outline; styleColor: "black" - text: root.fps + "fps" + text: i18n("%1 fps", root.fps) visible: root.showFps anchors { right: timecode.visible ? timecode.left : parent.right bottom: parent.bottom rightMargin: 10 } } TextField { id: marker font: fixedFont objectName: "markertext" activeFocusOnPress: true onEditingFinished: { root.markerText = marker.displayText marker.focus = false root.editCurrentMarker() } anchors { left: parent.left bottom: parent.bottom } visible: root.showMarkers && text != "" text: controller.markerComment maximumLength: 20 style: TextFieldStyle { textColor: "white" background: Rectangle { color: controller.position == controller.zoneIn ? "#9900ff00" : controller.position == controller.zoneOut ? "#99ff0000" : "#990000ff" width: marker.width } } } } MouseArea { id: dragOverArea hoverEnabled: true acceptedButtons: Qt.LeftButton x: 0 width: parent.width height: 2 * audioDragButton.height y: parent.height - height propagateComposedEvents: true onPressed: { // First found child is the Column var clickedChild = childAt(mouseX,mouseY) ? childAt(mouseX,mouseY).childAt(mouseX,mouseY).childAt(mouseX,mouseY) : "" if (clickedChild == audioDragButton) { dragType = 1 } else if (clickedChild == videoDragButton) { dragType = 2 } else { dragType = 0 } mouse.accepted = false } Rectangle { x: 5 width: childrenRect.width height: childrenRect.height color: Qt.rgba(activePalette.window.r, activePalette.window.g, activePalette.window.b, 0.5) radius: 4 visible: root.hasAV && dragOverArea.containsMouse Row { ToolButton { id: videoDragButton iconName: "kdenlive-show-video" - tooltip: "Video only drag" + tooltip: i18n("Video only drag") enabled: false } ToolButton { id: audioDragButton iconName: "audio-volume-medium" - tooltip: "Audio only drag" + tooltip: i18n("Audio only drag") enabled: false } } } } } MonitorRuler { id: clipMonitorRuler anchors { left: root.left right: root.right bottom: root.bottom } height: controller.rulerHeight } } diff --git a/src/monitor/view/kdenlivemonitor.qml b/src/monitor/view/kdenlivemonitor.qml index 754e000a6..90dee3bb7 100644 --- a/src/monitor/view/kdenlivemonitor.qml +++ b/src/monitor/view/kdenlivemonitor.qml @@ -1,182 +1,182 @@ import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Window 2.2 import Kdenlive.Controls 1.0 import QtQuick 2.4 import AudioThumb 1.0 Item { id: root objectName: "root" SystemPalette { id: activePalette } // default size, but scalable by user height: 300; width: 400 property string markerText property point profile property double zoom property double scalex property double scaley property bool dropped property string fps property bool showMarkers property bool showTimecode property bool showFps property bool showSafezone property bool showAudiothumb property real baseUnit: fontMetrics.font.pixelSize * 0.8 property int duration: 300 property int mouseRulerPos: 0 property double frameSize: 10 property double timeScale: 1 property int overlayType: controller.overlayType property color overlayColor: 'cyan' property bool isClipMonitor: false FontMetrics { id: fontMetrics font.family: "Arial" } signal editCurrentMarker() signal toolBarChanged(bool doAccept) onDurationChanged: { clipMonitorRuler.updateRuler() } onWidthChanged: { clipMonitorRuler.updateRuler() } function updatePalette() { clipMonitorRuler.forceRepaint() } function switchOverlay() { if (controller.overlayType >= 5) { controller.overlayType = 0 } else { controller.overlayType = controller.overlayType + 1; } root.overlayType = controller.overlayType } MouseArea { id: barOverArea hoverEnabled: true acceptedButtons: Qt.NoButton anchors.fill: parent } SceneToolBar { id: sceneToolBar anchors { right: parent.right top: parent.top topMargin: 4 rightMargin: 4 } visible: barOverArea.mouseX >= x - 10 } Item { height: root.height - controller.rulerHeight width: root.width Item { id: frame objectName: "referenceframe" width: root.profile.x * root.scalex height: root.profile.y * root.scaley anchors.centerIn: parent Loader { anchors.fill: parent source: { switch(root.overlayType) { case 0: return ''; case 1: return "OverlayStandard.qml"; case 2: return "OverlayMinimal.qml"; case 3: return "OverlayCenter.qml"; case 4: return "OverlayCenterDiagonal.qml"; case 5: return "OverlayThirds.qml"; } } } } Item { id: monitorOverlay anchors.fill: parent Text { id: timecode font: fixedFont objectName: "timecode" color: "white" style: Text.Outline; styleColor: "black" text: controller.toTimecode(controller.position) visible: root.showTimecode anchors { right: parent.right bottom: parent.bottom rightMargin: 4 } } Text { id: fpsdropped font: fixedFont objectName: "fpsdropped" color: root.dropped ? "red" : "white" style: Text.Outline; styleColor: "black" - text: root.fps + "fps" + text: i18n("%1 fps", root.fps) visible: root.showFps anchors { right: timecode.visible ? timecode.left : parent.right bottom: parent.bottom rightMargin: 10 } } TextField { id: marker font: fixedFont objectName: "markertext" activeFocusOnPress: true onEditingFinished: { root.markerText = marker.displayText marker.focus = false root.editCurrentMarker() } anchors { left: parent.left bottom: parent.bottom } visible: root.showMarkers && text != "" text: controller.markerComment maximumLength: 20 style: TextFieldStyle { textColor: "white" background: Rectangle { color: controller.position == controller.zoneIn ? "#9900ff00" : controller.position == controller.zoneOut ? "#99ff0000" : "#990000ff" width: marker.width } } } } } MonitorRuler { id: clipMonitorRuler anchors { left: root.left right: root.right bottom: root.bottom } height: controller.rulerHeight } } diff --git a/src/monitor/view/kdenlivemonitorripple.qml b/src/monitor/view/kdenlivemonitorripple.qml index adab9e0f3..2cd8bdf9d 100644 --- a/src/monitor/view/kdenlivemonitorripple.qml +++ b/src/monitor/view/kdenlivemonitorripple.qml @@ -1,122 +1,122 @@ import QtQuick 2.0 Item { id: root objectName: "rootripple" // default size, but scalable by user height: 300; width: 400 signal doAcceptRipple(bool doAccept) signal switchTrimMode(int mode) property int displayFontSize property int trimmode Rectangle { id: info x: root.x y: root.height / 2 width: root.width / 4 height: root.displayFontSize * 2 border.width: 1 color: trimmode == 1 ? "darkRed" : "darkBlue" Text { - text: 'Ripple' + text: i18n("Ripple") color: "white" anchors.centerIn: parent } MouseArea { hoverEnabled: true anchors.fill: info cursorShape: Qt.PointingHandCursor onClicked: { root.switchTrimMode(1);} } } Rectangle { id: info2 x: info.width y: info.y width: info.width height: info.height border.width: 1 color: trimmode == 2 ? "darkRed" : "darkBlue" Text { - text: 'Rolling' + text: i18n("Rolling") color: "white" anchors.centerIn: parent } MouseArea { hoverEnabled: true anchors.fill: info2 cursorShape: Qt.PointingHandCursor onClicked: { root.switchTrimMode(2);} } } Rectangle { id: info3 x: info.width * 2 y: info.y width: info.width height: info.height border.width: 1 color: trimmode == 3 ? "darkRed" : "darkBlue" Text { - text: 'Slip' + text: i18n("Slip") color: "white" anchors.centerIn: parent } MouseArea { hoverEnabled: true anchors.fill: info3 cursorShape: Qt.PointingHandCursor onClicked: { root.switchTrimMode(3);} } } Rectangle { id: info4 x: info.width * 3 y: info.y width: info.width height: info.height border.width: 1 color: trimmode == 4 ? "darkRed" : "darkBlue" Text { - text: 'Slide' + text: i18n("Slide") color: "white" anchors.centerIn: parent } MouseArea { hoverEnabled: true anchors.fill: info4 cursorShape: Qt.PointingHandCursor onClicked: { root.switchTrimMode(4);} } } MouseArea { width: root.width; height: root.height / 2 - info.height anchors { left: root.left top: info.bottom } hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: { root.doAcceptRipple(true) } } Rectangle { id: accept anchors { left: root.left top: info.bottom } width: root.width height: root.height / 2 - info.height color: "darkGreen" Text { - text: 'close' + text: i18n("close") color: "white" anchors.centerIn: parent } } } diff --git a/src/monitor/view/kdenlivemonitorsplit.qml b/src/monitor/view/kdenlivemonitorsplit.qml index 891baef05..d7a8a4c23 100644 --- a/src/monitor/view/kdenlivemonitorsplit.qml +++ b/src/monitor/view/kdenlivemonitorsplit.qml @@ -1,103 +1,103 @@ import QtQuick 2.4 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 Item { id: root objectName: "rootsplit" SystemPalette { id: activePalette } // default size, but scalable by user height: 300; width: 400 property double timeScale: 1 property double frameSize: 10 property int duration: 300 property int mouseRulerPos: 0 property int splitterPos property point center property real baseUnit: fontMetrics.font.pixelSize * 0.8 // percentage holds splitter pos relative to the scene percentage property double percentage // realpercent holds splitter pos relative to the frame width percentage property double realpercent signal qmlMoveSplit() FontMetrics { id: fontMetrics font.family: "Arial" } percentage: 0.5 realpercent: 0.5 splitterPos: this.width / 2 onDurationChanged: { clipMonitorRuler.updateRuler() } onWidthChanged: { clipMonitorRuler.updateRuler() } MouseArea { width: root.width; height: root.height anchors.centerIn: parent hoverEnabled: true cursorShape: Qt.SizeHorCursor acceptedButtons: Qt.LeftButton onPressed: { root.percentage = mouseX / width root.splitterPos = mouseX root.qmlMoveSplit() } onPositionChanged: { if (pressed) { root.percentage = mouseX / width root.splitterPos = mouseX root.qmlMoveSplit() } timer.restart() splitter.visible = true } //onEntered: { splitter.visible = true } onExited: { splitter.visible = false } } Rectangle { id: splitter x: root.splitterPos y: 0 width: 1 height: root.height color: "red" visible: false Text { - text: 'Effect' + text: i18n("Effect") color: "red" anchors { right: parent.left top: parent.top topMargin: 10 rightMargin: 10 } } } MonitorRuler { id: clipMonitorRuler anchors { left: root.left right: root.right bottom: root.bottom } height: controller.rulerHeight } Timer { id: timer interval: 1000; running: false; repeat: false onTriggered: { splitter.visible = false } } }