Commit 1580189f authored by camilo higuita's avatar camilo higuita
Browse files

remove sources from migrated components

parent 82622ebf
import org.kde.kirigami 2.6 as Kirigami
Kirigami.ActionToolBar{}
/*
* Copyright 2018 Camilo Higuita <milo.h@aol.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library 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.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls.impl 2.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.6 as Kirigami
import QtGraphicalEffects 1.0
import "private"
Button
{
id: control
/* Controlc color scheming */
ColorScheme {id: colorScheme}
property alias colorScheme : colorScheme
/***************************/
Kirigami.Theme.backgroundColor: colorScheme.backgroundColor
Kirigami.Theme.textColor: colorScheme.textColor
// implicitWidth: Math.max(background ? background.implicitWidth : 0,
// contentItem.implicitWidth + leftPadding + rightPadding)
// implicitHeight: background.implicitHeight
// hoverEnabled: !isMobile
leftPadding: space.small
rightPadding: leftPadding
// property alias bg : _buttonBG
//
// contentItem: RowLayout
// {
// anchors.fill: control
// Kirigami.Icon
// {
// id: _icon
// visible: icon && icon.name.length > 0
// // Layout.leftMargin: space.small
// Layout.fillHeight: visible
// Layout.preferredWidth: visible ? iconSizes.medium + space.medium : 0
// Layout.alignment: Qt.AlignCenter
// source: icon.name
// width: iconSizes.medium * 0.9
// height: width
// isMask: true
// color: _text.text.length ? _text.color : icon.color
// }
//
// Text
// {
// id: _text
// visible: text
// Layout.fillHeight: visible
// Layout.fillWidth: visible
// Layout.alignment: Qt.AlignCenter
// text: control.text
// font: control.font
// color: !control.enabled ? Qt.lighter(colorScheme.textColor, 1,2) :
// control.highlighted || control.down ? Qt.lighter(colorScheme.textColor, 1.4) : colorScheme.textColor
// horizontalAlignment: Text.AlignHCenter
// verticalAlignment: Text.AlignVCenter
// elide: Text.ElideRight
// }
//
// }
//
// background: Rectangle
// {
// id: _buttonBG
// implicitWidth: _icon.visible ? ( (control.text ? (iconSizes.medium * 3) : 0 ) + _icon.width + space.small) : iconSizes.medium * 3
// implicitHeight: iconSizes.medium + space.small
//
// color: !control.enabled ? colorScheme.viewBackgroundColor : control.highlighted || control.down ? Qt.darker(colorScheme.backgroundColor, 1.4) : colorScheme.backgroundColor
//
// border.color: control.highlighted || control.down ? Qt.darker(colorScheme.borderColor, 1.4) : colorScheme.borderColor
//
// border.width: unit
// radius: radiusV
//
// }
}
/*
* Copyright 2017 Marco Martin <mart@kde.org>
* Copyright 2017 The Qt Company Ltd.
*
* GNU Lesser General Public License Usage
* Alternatively, this file may be used under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software
* Foundation and appearing in the file LICENSE.LGPLv3 included in the
* packaging of this file. Please review the following information to
* ensure the GNU Lesser General Public License version 3 requirements
* will be met: https://www.gnu.org/licenses/lgpl.html.
*
* GNU General Public License Usage
* Alternatively, this file may be used under the terms of the GNU
* General Public License version 2.0 or later as published by the Free
* Software Foundation and appearing in the file LICENSE.GPL included in
* the packaging of this file. Please review the following information to
* ensure the GNU General Public License version 2.0 requirements will be
* met: http://www.gnu.org/licenses/gpl-2.0.html.
*/
import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Controls 2.3
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui
import "private"
ComboBox
{
id: control
ColorScheme
{
id: colorScheme
}
property alias colorScheme : colorScheme
property alias iconButton : _iconButton
property alias indicatorButton : _indicatorButton
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
baselineOffset: contentItem.y + contentItem.baselineOffset
leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
ToolButton
{
id: _iconButton
visible: iconName.length
icon.width: iconSizes.medium
enabled: false
icon.color: control.pressed || control.down ? control.colorScheme.highlightedTextColor : control.colorScheme.textColor
anchors.left: control.left
anchors.verticalCenter: control.verticalCenter
anchors.margins: space.small
}
indicator: ToolButton
{
id: _indicatorButton
icon.width: iconSizes.small
enabled: false
icon.name: _popup.visible ? "go-up" : "go-down"
icon.color: control.pressed || control.down ? control.colorScheme.highlightedTextColor : control.colorScheme.textColor
anchors.right: control.right
anchors.verticalCenter: control.verticalCenter
anchors.margins: space.small
}
delegate: Maui.ListDelegate
{
label: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
// highlighted: control.highlightedIndex == index
}
contentItem: Text
{
leftPadding: iconButton.width + space.small
rightPadding: control.indicator.width + control.spacing
text: control.displayText
font: control.font
color: control.pressed || control.down ? control.colorScheme.highlightedTextColor : control.colorScheme.textColor
verticalAlignment: TextInput.AlignVCenter
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
}
background: Rectangle
{
implicitWidth: iconSizes.medium * 2
implicitHeight: iconSizes.medium + space.small
color: control.pressed || control.down ? control.colorScheme.highlightColor : control.colorScheme.viewBackgroundColor
border.color: control.pressed ? control.colorScheme.highlightColor : control.colorScheme.borderColor
border.width: control.visualFocus ? 2 : 1
radius: radiusV
}
popup: Popup
{
id: _popup
y: control.height + space.small
width: control.width
// implicitWidth: 100 * unit
implicitHeight: contentItem.implicitHeight + space.small
padding: unit * 2
z: control.parent.z + 1
contentItem: ListView
{
clip: true
implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle
{
radius: radiusV
color: control.colorScheme.backgroundColor
border.color: control.colorScheme.borderColor
}
}
}
/*
* Copyright 2018 Camilo Higuita <milo.h@aol.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library 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.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.0 as Kirigami
import org.kde.mauikit 1.0 as Maui
import QtGraphicalEffects 1.0
Drawer
{
id: control
property Item bg
width: isMobile ? parent.width * 0.9 : Kirigami.Units.gridUnit * 17
y: altToolBars ? 0 : root.headBar.height
height: parent.height - (((floatingBar || root.floatingBar) && !altToolBars) ? root.headBar.height :
headBar.height + footBar.height)
clip: true
FastBlur
{
id: blur
height: parent.height
width: parent.width
radius: 90
opacity: 0.25
source: ShaderEffectSource
{
sourceItem: bg
sourceRect: control.edge === Qt.LeftEdge ? Qt.rect(0,
0,
control.position * control.width,
control.height) : Qt.rect(bg.width-(control.position * control.width),
0,
control.position * control.width,
control.height)
}
}
background: Rectangle
{
color: backgroundColor
Kirigami.Separator
{
readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
anchors
{
left: control.edge !== Qt.LeftEdge ? parent.left : undefined
right: control.edge !== Qt.RightEdge ? parent.right : undefined
top: control.edge !== Qt.TopEdge ? parent.top : undefined
bottom: control.edge !== Qt.BottomEdge ? parent.bottom : undefined
}
}
}
}
import QtQuick 2.9
import "private"
Item
{
id: control
/* Controlc color scheming */
ColorScheme {id: colorScheme}
property alias colorScheme : colorScheme
/***************************/
Rectangle
{
anchors.fill: parent
color: control.colorScheme.backgroundColor
}
}
import QtQuick 2.0
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.2 as Kirigami
import "private"
import QtQuick.Controls.Material 2.1
import QtQuick.Window 2.10
Menu
{
id: control
/* Controlc color scheming */
ColorScheme
{
id: colorScheme
backgroundColor: viewBackgroundColor
}
property alias colorScheme : colorScheme
/***************************/
z: 999
default property alias content : control.contentData
}
/*
* Copyright 2018 Camilo Higuita <milo.h@aol.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library 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.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.0 as Kirigami
import "private"
MenuItem
{
id: control
/* Controlc color scheming */
ColorScheme {id: colorScheme}
property alias colorScheme : colorScheme
/***************************/
}
/*
* Copyright 2018 Camilo Higuita <milo.h@aol.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library 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.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui
Maui.ToolBar
{
id: control
height: 30
width: 30
signal search(string query)
leftContent: ToolButton
{
icon.name: "view-filter"
}
middleContent: Maui.TextField
{
id: searchInput
placeholderText: qsTr("Search...")
width: footBar.middleLayout.width * 0.9
onAccepted: search(searchInput.text)
}
rightContent : ToolButton
{
icon.name: "edit-clear"
Layout.alignment: Qt.AlignRight
onClicked: searchInput.clear()
}
}
/*
* Copyright 2018 Camilo Higuita <milo.h@aol.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library 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.6
import QtQuick.Controls 2.2
import QtQuick.Controls.impl 2.3
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.4 as Kirigami
import "private"
ToolButton
{
id: control
readonly property var indicatorStyles : ({
underline: 0,
box: 1
})
focusPolicy: Qt.NoFocus
/* Controlc color scheming */
ColorScheme
{
id: colorScheme
backgroundColor: "transparent"
borderColor: "transparent"
}
property alias colorScheme : colorScheme
/***************************/
// property alias backgroundRec: _background
property bool isMask: true
property string iconName: ""
property string iconFallback: ""
property int size: iconSize
property color iconColor: control.active && control.indicatorStyle === control.indicatorStyles.box ? control.colorScheme.highlightColor : colorScheme.textColor
property bool anim: false
property string tooltipText : ""
property bool showIndicator: false
property bool active: false
property int indicatorStyle: indicatorStyles.box
hoverEnabled: false
// implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
// implicitContentWidth + leftPadding + rightPadding)
// implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
// implicitContentHeight + topPadding + bottomPadding)
height: control.visible ? (control.display === ToolButton.IconOnly ? size + space.medium : implicitHeight) : 0
width: control.visible ? (control.display === ToolButton.IconOnly ? height : implicitWidth + space.small) : 0
icon.name: control.iconName
icon.source: control.iconFallback
icon.width: control.size
icon.height: control.size
icon.color: !control.isMask ? "transparent" : (down || pressed || checked) ? colorScheme.highlightColor : iconColor
onClicked: if(anim) animIcon.running = true
flat: true
highlighted: !isMask
font.pointSize: control.display === ToolButton.TextUnderIcon ? fontSizes.small : undefined
display: control.active ? (control.text.length > 0 ? (isWide ? ToolButton.TextBesideIcon : ToolButton.TextUnderIcon) : ToolButton.IconOnly) : ToolButton.IconOnly
spacing: space.tiny
Kirigami.Theme.textColor: control.icon.color
Rectangle
{
id: _indicator
color: control.colorScheme.highlightColor
height: control.indicatorStyle == indicatorStyles.box ? control.height : (indicatorStyle === indicatorStyles.underline ? unit * 5 : 0)
width: visible ? (control.width) : 0
radius: control.indicatorStyle == indicatorStyles.box ? radiusV : 0
opacity: control.indicatorStyle == indicatorStyles.box ? 0.3 : 1
anchors.bottom: parent.bottom
anchors.horizontalCenter: control.horizontalCenter
visible: control.showIndicator && control.visible && control.active
z: background.z -1
}
// background: Rectangle
// {
// id: _background
// implicitHeight: control.visible ? control.size : 0
// implicitWidth: control.visible ? control.size : 0
//
// anchors.centerIn: control.icon
// color: /*(down || pressed || checked) */ checked && enabled ?
// Qt.lighter(colorScheme.highlightColor, 1.2) : colorScheme.backgroundColor
// radius: unit * 3
// opacity: (down || pressed || checked) && enabled ? 0.5 : 1
// border.color: colorScheme.borderColor
// }
//
// contentItem: IconLabel
// {
// id: _iconLabel
// spacing: control.display === ToolButton.TextUnderIcon ? space.tiny : control.spacing
// mirrored: control.mirrored
// display: control.display
// icon: control.icon
// text: control.text
// font: control.font
// color: control.icon.color
// }
// background: Rectangle
// {
// implicitHeight: control.visible ? control.height : 0
// implicitWidth: control.visible ? control.width : 0
//
// anchors.centerIn: control
// color: /*(down || pressed || checked) */ checked && enabled ?
// Qt.lighter(colorScheme.highlightColor, 1.2) : colorScheme.backgroundColor
// radius: unit * 3
// opacity: (down || pressed || checked) && enabled ? 0.5 : 1
// border.color: colorScheme.borderColor
// }
//
// contentItem: GridLayout
// {
// id: _contentLayout
// anchors.fill: control
//
// columns: (control.display === ToolButton.TextUnderIcon) || (control.display === ToolButton.IconOnly)? 1 : 2
// rows: (control.display === ToolButton.TextUnderIcon) ? 2 : 1
//
// columnSpacing: 0
// rowSpacing: 0
//
// Item
// {
// Layout.fillWidth: true
// Layout.fillHeight: true
// Layout.row: 1
// Layout.column: 1
// Layout.alignment: Qt.AlignBottom
//
// Kirigami.Icon