Merge branch 'master' of github.com:arcan1s/awesome-widgets

This commit is contained in:
arcan1s 2015-05-11 01:29:57 +03:00
commit daa362fc16
8 changed files with 60 additions and 11 deletions

View File

@ -8,7 +8,7 @@ ProjectRootRelative=./
[CMake][CMake Build Directory 0]
Build Directory Path=file:///home/arcanis/Documents/github/awesome-widgets/build
Build Type=Release
Build Type=Debug
CMake Binary=file:///usr/bin/cmake
Environment Profile=
Extra Arguments=

View File

@ -14,6 +14,12 @@
<group name="Advanced">
<!-- advanced -->
<entry name="height" type="int">
<default>0</default>
</entry>
<entry name="width" type="int">
<default>0</default>
</entry>
<entry name="tooltipType" type="string">
<default>windows</default>
</entry>

View File

@ -34,7 +34,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
QtControls.TabView {
height: parent.height
width: parent.width

View File

@ -48,8 +48,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
Row {
height: implicitHeight
width: parent.width

View File

@ -32,6 +32,8 @@ Item {
property bool debug: DPAdds.isDebugEnabled()
property alias cfg_height: widgetHeight.value
property alias cfg_width: widgetWidth.value
property string cfg_tooltipType: tooltipType.currentText
property alias cfg_tooltipWidth: tooltipWidth.value
property alias cfg_tooltipColor: tooltipColor.text
@ -42,7 +44,47 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.height
width: parent.width * 2 / 5
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
text: i18n("Widget height, px")
}
QtControls.SpinBox {
id: widgetHeight
width: parent.width * 3 / 5
minimumValue: 0
maximumValue: 4096
stepSize: 50
value: plasmoid.configuration.height
}
}
Row {
height: implicitHeight
width: parent.width
QtControls.Label {
height: parent.height
width: parent.width * 2 / 5
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
text: i18n("Widget width, px")
}
QtControls.SpinBox {
id: widgetWidth
width: parent.width * 3 / 5
minimumValue: 0
maximumValue: 4096
stepSize: 50
value: plasmoid.configuration.width
}
}
Row {
height: implicitHeight
width: parent.width

View File

@ -48,7 +48,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
Row {
height: implicitHeight
width: parent.width

View File

@ -50,13 +50,14 @@ Item {
// ui
Grid {
anchors.fill: parent
horizontalItemAlignment: Grid.AlignHCenter
verticalItemAlignment: Grid.AlignVCenter
columns: plasmoid.configuration.verticalLayout ? 1 : DPAdds.numberOfDesktops()
rows: plasmoid.configuration.verticalLayout ? DPAdds.numberOfDesktops() : 1
Repeater {
id: repeater
height: implicitHeight
width: implicitWidth
model: DPAdds.numberOfDesktops()
Text {
id: text
@ -123,8 +124,8 @@ Item {
repeater.itemAt(i).font.weight = general.fontWeight[plasmoid.configuration.fontWeight]
}
repeater.itemAt(i).update()
newHeight += repeater.itemAt(i).contentHeight
newWidth += repeater.itemAt(i).contentWidth
newHeight += plasmoid.configuration.height == 0 ? repeater.itemAt(i).contentHeight : plasmoid.configuration.height / repeater.count
newWidth += plasmoid.configuration.width == 0 ? repeater.itemAt(i).contentWidth : plasmoid.configuration.width / repeater.count
}
Layout.minimumHeight = newHeight
Layout.minimumWidth = newWidth

View File

@ -35,7 +35,7 @@ Item {
Column {
id: pageColumn
width: units.gridUnit * 25
anchors.fill: parent
QtControls.Label {
width: parent.width
horizontalAlignment: Text.AlignHCenter
@ -220,6 +220,7 @@ Item {
QtControls.TextArea {
id: textPattern
width: parent.width
height: parent.height * 4 / 5
textFormat: TextEdit.PlainText
text: plasmoid.configuration.text
}