mirror of
				https://gitgud.io/wackyideas/aerothemeplasma.git
				synced 2024-08-15 00:43:43 +00:00 
			
		
		
		
	Very early KDE 6 release.
This commit is contained in:
		
							parent
							
								
									7cc4ccabbc
								
							
						
					
					
						commit
						686046d4f7
					
				
					 6272 changed files with 140920 additions and 529657 deletions
				
			
		
							
								
								
									
										97
									
								
								misc/defaulttooltip/DefaultToolTip.qml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								misc/defaulttooltip/DefaultToolTip.qml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,97 @@
 | 
			
		|||
/*
 | 
			
		||||
    SPDX-FileCopyrightText: 2013-2015 Sebastian Kügler <sebas@kde.org>
 | 
			
		||||
 | 
			
		||||
    SPDX-License-Identifier: LGPL-2.0-or-later
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
import QtQuick
 | 
			
		||||
import QtQuick.Layouts
 | 
			
		||||
import org.kde.plasma.components as PlasmaComponents
 | 
			
		||||
import org.kde.kirigami as Kirigami
 | 
			
		||||
import org.kde.kwindowsystem 1.0
 | 
			
		||||
import org.kde.ksvg as KSvg
 | 
			
		||||
 | 
			
		||||
Item {
 | 
			
		||||
    property Item toolTip
 | 
			
		||||
    property int preferredTextWidth: Kirigami.Units.gridUnit * 10
 | 
			
		||||
    property bool compositing: KWindowSystem.isPlatformX11 ? KX11Extras.compositingActive : true
 | 
			
		||||
    //KWindowSystem { id: kwindowsystem }
 | 
			
		||||
 | 
			
		||||
    // Used for margins
 | 
			
		||||
    KSvg.FrameSvgItem {
 | 
			
		||||
        id: tooltipSvg
 | 
			
		||||
        imagePath: compositing ? "widgets/tooltip" : "opaque/widgets/tooltip"
 | 
			
		||||
        visible: false
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    implicitWidth: mainLayout.implicitWidth - tooltipSvg.margins.left
 | 
			
		||||
    implicitHeight: mainLayout.implicitHeight - tooltipSvg.margins.left*2 + Kirigami.Units.smallSpacing
 | 
			
		||||
 | 
			
		||||
    LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
 | 
			
		||||
    LayoutMirroring.childrenInherit: true
 | 
			
		||||
 | 
			
		||||
    Kirigami.Theme.colorSet: Kirigami.Theme.View
 | 
			
		||||
    Kirigami.Theme.inherit: false
 | 
			
		||||
 | 
			
		||||
    KSvg.FrameSvgItem {
 | 
			
		||||
        id: tooltipBackground
 | 
			
		||||
        imagePath: "solid/widgets/tooltip"
 | 
			
		||||
        prefix: ""
 | 
			
		||||
        anchors {
 | 
			
		||||
            //fill: parent
 | 
			
		||||
            top: parent.top
 | 
			
		||||
            left: parent.left
 | 
			
		||||
            leftMargin: -tooltipSvg.margins.left
 | 
			
		||||
            topMargin: -tooltipSvg.margins.top
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        width: mainLayout.width + tooltipSvg.margins.left
 | 
			
		||||
        height: mainLayout.height + Kirigami.Units.smallSpacing
 | 
			
		||||
    }
 | 
			
		||||
    RowLayout {
 | 
			
		||||
        id: mainLayout
 | 
			
		||||
        anchors.centerIn: parent
 | 
			
		||||
 | 
			
		||||
        Image {
 | 
			
		||||
            source: toolTip ? toolTip.image : ""
 | 
			
		||||
            visible: toolTip !== null && toolTip.image !== ""
 | 
			
		||||
            Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Kirigami.Icon {
 | 
			
		||||
            animated: false
 | 
			
		||||
            source: toolTip ? toolTip.icon : ""
 | 
			
		||||
            Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
 | 
			
		||||
            visible: toolTip !== null && toolTip.icon !== "" && toolTip.image === "" && valid
 | 
			
		||||
            Layout.preferredWidth: Kirigami.Units.iconSizes.medium
 | 
			
		||||
            Layout.preferredHeight: Kirigami.Units.iconSizes.medium
 | 
			
		||||
            Layout.leftMargin: Kirigami.Units.smallSpacing*2
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ColumnLayout {
 | 
			
		||||
            Layout.maximumWidth: preferredTextWidth
 | 
			
		||||
            spacing: 0
 | 
			
		||||
 | 
			
		||||
            Kirigami.Heading {
 | 
			
		||||
                level: 5
 | 
			
		||||
                Layout.fillWidth: true
 | 
			
		||||
                elide: Text.ElideRight
 | 
			
		||||
                wrapMode: Text.Wrap
 | 
			
		||||
                text: toolTip ? toolTip.mainText : ""
 | 
			
		||||
                textFormat: Text.PlainText
 | 
			
		||||
                visible: text !== ""
 | 
			
		||||
                opacity: 0.75
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            PlasmaComponents.Label {
 | 
			
		||||
                Layout.fillWidth: true
 | 
			
		||||
                wrapMode: Text.WordWrap
 | 
			
		||||
                text: toolTip ? toolTip.subText : ""
 | 
			
		||||
                textFormat: toolTip ? toolTip.textFormat : Text.AutoText
 | 
			
		||||
                opacity: 0.75
 | 
			
		||||
                visible: text !== ""
 | 
			
		||||
                maximumLineCount: 8
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										28
									
								
								misc/defaulttooltip/install.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								misc/defaulttooltip/install.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
OUTPUT=$(plasmashell --version)
 | 
			
		||||
IFS=' ' read -a array <<< "$OUTPUT"
 | 
			
		||||
VERSION="${array[1]}"
 | 
			
		||||
URL="https://invent.kde.org/plasma/libplasma/-/archive/v${VERSION}/libplasma-v${VERSION}.tar.gz"
 | 
			
		||||
ARCHIVE="libplasma-v${VERSION}.tar.gz"
 | 
			
		||||
SRCDIR="libplasma-v${VERSION}"
 | 
			
		||||
INSTALLDST="/usr/lib64/qt6/qml/org/kde/plasma/core/libcorebindingsplugin.so"
 | 
			
		||||
 | 
			
		||||
if [ ! -d ./build/${SRCDIR} ]; then
 | 
			
		||||
	rm -rf build
 | 
			
		||||
	mkdir build
 | 
			
		||||
	echo "Downloading $ARCHIVE"
 | 
			
		||||
	curl $URL -o ./build/$ARCHIVE
 | 
			
		||||
	tar -xvf ./build/$ARCHIVE -C ./build/
 | 
			
		||||
	echo "Extracted $ARCHIVE"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
cp DefaultToolTip.qml ./build/$SRCDIR/src/declarativeimports/core/private/DefaultToolTip.qml
 | 
			
		||||
cd ./build/$SRCDIR/
 | 
			
		||||
mkdir build
 | 
			
		||||
cd build
 | 
			
		||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -G Ninja ..
 | 
			
		||||
cmake --build . --target corebindingsplugin
 | 
			
		||||
sudo cp ./bin/org/kde/plasma/core/libcorebindingsplugin.so $INSTALLDST
 | 
			
		||||
plasmashell --replace & disown
 | 
			
		||||
echo "Done."
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue