New component: Paragraph

completes the Text Layout components for now.

Also add a page to Gallery.qml to test these new component.
This commit is contained in:
Sebastian Kügler 2012-03-19 23:38:57 +01:00
parent ee7796c0a7
commit c6110235c0
5 changed files with 56 additions and 2 deletions

View File

@ -39,6 +39,7 @@ install(TARGETS plasmaextracomponentsplugin DESTINATION ${PLUGIN_INSTALL_DIR}/pl
install(FILES qml/App.qml DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/extras)
install(FILES qml/Heading.qml DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/extras)
install(FILES qml/Paragraph.qml DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/extras)
install(FILES qml/Title.qml DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/extras)
#install platform overrides -- enable as we use this feature for plasmaextras

View File

@ -54,8 +54,8 @@ Label {
property int level: 1
property int step: 2
anchors.topMargin: 8
font.pointSize: headerPointSize(level)
wrapMode: Text.WordWrap
function headerPointSize(l) {
var n = theme.defaultFont.pointSize;

View File

@ -1,5 +1,6 @@
plugin plasmaextracomponentsplugin
App 0.1 App.qml
Title 0.1 Title.qml
Heading 0.1 Heading.qml
Paragraph 0.1 Paragraph.qml
Title 0.1 Title.qml

View File

@ -0,0 +1,48 @@
/*
* Copyright 2012 by Sebastian Kügler <sebas@kde.org>
*
* 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 Library 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 1.1
import org.kde.plasma.components 0.1
import org.kde.plasma.extras 0.1 as PlasmaExtras
Column {
anchors.fill: parent
spacing: 12
PlasmaExtras.Title {
text: "PlasmaExtras"
}
PlasmaExtras.Heading {
level: 2
text: "Additional Plasma Quick components for Apps"
}
PlasmaExtras.Paragraph {
text: "Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen. Lorem Ipsum is de standaard proeftekst in deze bedrijfstak sinds de 16e eeuw, toen een onbekende drukker een zethaak met letters nam en ze door elkaar husselde om een font-catalogus te maken. Het heeft niet alleen vijf eeuwen overleefd maar is ook, vrijwel onveranderd, overgenomen in elektronische letterzetting. Het is in de jaren '60 populair geworden met de introductie van Letraset vellen met Lorem Ipsum passages en meer recentelijk door desktop publishing software zoals Aldus PageMaker die versies van Lorem Ipsum bevatten."
}
PlasmaExtras.Heading {
level: 3
text: "Heading at level " + level
}
PlasmaExtras.Paragraph {
text: "Lorem Ipsum is slechts een proeftekst uit het drukkerij- en zetterijwezen. Lorem Ipsum is de standaard proeftekst in deze bedrijfstak sinds de 16e eeuw, toen een onbekende drukker een zethaak met letters nam en ze door elkaar husselde om een font-catalogus te maken. Het heeft niet alleen vijf eeuwen overleefd maar is ook, vrijwel onveranderd, overgenomen in elektronische letterzetting. Het is in de jaren '60 populair geworden met de introductie van Letraset vellen met Lorem Ipsum passages en meer recentelijk door desktop publishing software zoals Aldus PageMaker die versies van Lorem Ipsum bevatten."
}
PlasmaExtras.Heading {
level: 5
text: "Heading at level " + level
}
}

View File

@ -77,6 +77,10 @@ Rectangle {
page: "Misc.qml"
title: "Misc stuff"
}
ListElement {
page: "Extras.qml"
title: "Extras"
}
}
delegate: ListItem {
enabled: true