Warning, /maui/index-fm/src/widgets/previewer/FontPreviewer.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.14 0002 import QtQuick.Controls 2.14 0003 import QtQuick.Layouts 1.3 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 0007 import org.mauikit.filebrowsing 1.0 as FB 0008 0009 Maui.Page 0010 { 0011 id: control 0012 headBar.visible: false 0013 0014 FontLoader 0015 { 0016 id: _font 0017 source: currentUrl 0018 } 0019 0020 readonly property string abc : "a b c d e f g h i j k l m n o p q r s t u v w x y z" 0021 readonly property string nums : "1 2 3 4 5 6 7 8 9 0" 0022 readonly property string symbols : "~ ! @ # $ % ^ & * ( ) _ + { } < > , . ? / ; ' [ ] \ \ | `" 0023 0024 readonly property string paragraph : "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur faucibus, arcu quis interdum congue, ligula nisl facilisis felis, id faucibus urna lacus at ipsum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse nec enim augue. Nullam in convallis odio, quis commodo lectus. Nulla id facilisis nulla. Mauris cursus pulvinar mi in facilisis. Phasellus id venenatis nibh. Etiam eget dignissim nulla." 0025 0026 background: null 0027 footBar.visible: true 0028 footBar.background: null 0029 footBar.rightContent: Button 0030 { 0031 text: i18n("Install") 0032 onClicked: 0033 { 0034 FB.FM.copy([currentUrl], FB.FM.homePath()+"/.fonts") 0035 } 0036 } 0037 0038 Maui.ScrollView 0039 { 0040 anchors.fill: parent 0041 padding: Maui.Style.space.big 0042 rightPadding: padding 0043 leftPadding: padding 0044 topPadding: padding 0045 0046 contentHeight: _layout.implicitHeight 0047 contentWidth: availableWidth 0048 0049 Flickable 0050 { 0051 boundsBehavior: Flickable.StopAtBounds 0052 boundsMovement: Flickable.StopAtBounds 0053 0054 ColumnLayout 0055 { 0056 id: _layout 0057 width: parent.width 0058 spacing: Maui.Style.space.medium 0059 0060 Label 0061 { 0062 font.family: _font.name 0063 Layout.fillWidth: true 0064 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 0065 text: abc.toUpperCase() 0066 color: Maui.Theme.textColor 0067 font.pointSize: 30 0068 font.bold: true 0069 font.weight: Font.Bold 0070 } 0071 0072 Label 0073 { 0074 font.family: _font.name 0075 Layout.fillWidth: true 0076 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 0077 text: abc 0078 color: Maui.Theme.textColor 0079 font.pointSize: 20 0080 } 0081 0082 Label 0083 { 0084 font.family: _font.name 0085 Layout.fillWidth: true 0086 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 0087 text: nums 0088 color: Maui.Theme.textColor 0089 font.pointSize: 30 0090 font.weight: Font.Light 0091 } 0092 0093 Label 0094 { 0095 font.family: _font.name 0096 Layout.fillWidth: true 0097 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 0098 text: paragraph 0099 color: Maui.Theme.textColor 0100 font.pointSize: Maui.Style.fontSizes.huge 0101 } 0102 0103 Label 0104 { 0105 font.family: _font.name 0106 Layout.fillWidth: true 0107 wrapMode: Text.WrapAtWordBoundaryOrAnywhere 0108 text: symbols 0109 color: Maui.Theme.textColor 0110 font.pointSize: 15 0111 } 0112 } 0113 } 0114 } 0115 }