[vlc-devel] [PATCH 28/33] QML: remove no longer used ComboBoxExt control

Adrien Maglo magsoft at videolan.org
Wed Jun 12 14:01:35 CEST 2019


---
 modules/gui/qt/Makefile.am               |   1 -
 modules/gui/qt/qml/utils/ComboBoxExt.qml | 119 -----------------------
 modules/gui/qt/vlc.qrc                   |   1 -
 3 files changed, 121 deletions(-)
 delete mode 100644 modules/gui/qt/qml/utils/ComboBoxExt.qml

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index dd7aa10997..f84c0e3954 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -547,7 +547,6 @@ libqt_plugin_la_QML = \
 	gui/qt/qml/utils/KeyNavigableListView.qml \
 	gui/qt/qml/utils/KeyNavigableTableView.qml \
 	gui/qt/qml/utils/SelectableDelegateModel.qml \
-	gui/qt/qml/utils/ComboBoxExt.qml \
 	gui/qt/qml/utils/StackViewExt.qml \
 	gui/qt/qml/utils/ScanProgressBar.qml \
         gui/qt/qml/utils/SearchBox.qml \
diff --git a/modules/gui/qt/qml/utils/ComboBoxExt.qml b/modules/gui/qt/qml/utils/ComboBoxExt.qml
deleted file mode 100644
index 6e2b037b13..0000000000
--- a/modules/gui/qt/qml/utils/ComboBoxExt.qml
+++ /dev/null
@@ -1,119 +0,0 @@
-/*****************************************************************************
- * Copyright (C) 2019 VLC authors and VideoLAN
- *
- * 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 ) any later version.
- *
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-import QtQuick 2.11
-import QtQuick.Controls 2.4
-
-import "qrc:///style/"
-
-ComboBox {
-    id: control
-
-    font.pixelSize: VLCStyle.fontSize_normal
-
-    delegate: ItemDelegate {
-        width: control.width
-        leftPadding: control.leftPadding
-        background: Item {}
-        contentItem: Text {
-            text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
-            color: VLCStyle.colors.buttonText
-            font: control.font
-            elide: Text.ElideRight
-            verticalAlignment: Text.AlignVCenter
-        }
-        highlighted: control.highlightedIndex === index
-    }
-
-    indicator: Canvas {
-        id: canvas
-        x: control.width - width - control.rightPadding
-        y: control.topPadding + (control.availableHeight - height) / 2
-        width: 12
-        height: 8
-        contextType: "2d"
-
-        Connections {
-            target: control
-            onPressedChanged: canvas.requestPaint()
-        }
-
-        onPaint: {
-            context.reset();
-            context.moveTo(0, 0);
-            context.lineTo(width, 0);
-            context.lineTo(width / 2, height);
-            context.closePath();
-            context.fillStyle = control.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.buttonText;
-            context.fill();
-        }
-    }
-
-    contentItem: Text {
-        leftPadding: 0
-        rightPadding: control.indicator.width + control.spacing
-
-        text: control.displayText
-        font: control.font
-        color: VLCStyle.colors.buttonText
-        verticalAlignment: Text.AlignVCenter
-        elide: Text.ElideRight
-    }
-
-    background: Rectangle {
-        implicitWidth: 120
-        implicitHeight: 40
-        color: VLCStyle.colors.button
-        border.color: control.activeFocus ? VLCStyle.colors.accent : VLCStyle.colors.buttonBorder
-        border.width: control.activeFocus ? 2 : 1
-        radius: 2
-    }
-
-    popup: Popup {
-        y: control.height - 1
-        width: control.width
-        implicitHeight: contentItem.implicitHeight
-        padding: 1
-
-        contentItem: ListView {
-            clip: true
-            implicitHeight: contentHeight
-            model: control.popup.visible ? control.delegateModel : null
-            currentIndex: control.highlightedIndex
-
-            highlight: Rectangle {
-                color: VLCStyle.colors.accent
-            }
-
-            Rectangle {
-                z: 10
-                width: parent.width
-                height: parent.height
-                color: "transparent"
-                border.color: VLCStyle.colors.accent
-            }
-
-            ScrollIndicator.vertical: ScrollIndicator { }
-        }
-
-        background: Rectangle {
-            color: VLCStyle.colors.button
-            border.color: VLCStyle.colors.buttonBorder
-            radius: 2
-        }
-    }
-}
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index f8a92890ad..232fc0941e 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -185,7 +185,6 @@
         <file alias="TextToolButton.qml">qml/utils/TextToolButton.qml</file>
         <file alias="IconToolButton.qml">qml/utils/IconToolButton.qml</file>
         <file alias="StackViewExt.qml">qml/utils/StackViewExt.qml</file>
-        <file alias="ComboBoxExt.qml">qml/utils/ComboBoxExt.qml</file>
         <file alias="MenuExt.qml">qml/utils/MenuExt.qml</file>
         <file alias="MenuItemExt.qml">qml/utils/MenuItemExt.qml</file>
         <file alias="ExpandGridView.qml">qml/utils/ExpandGridView.qml</file>
-- 
2.20.1



More information about the vlc-devel mailing list