Commit caaf2c26 authored by Jan Grulich's avatar Jan Grulich
Browse files

Make the applet smaller

parent 4c3fee6d
......@@ -53,8 +53,8 @@ Item {
QIconItem {
id: hoverIcon;
width: parent.width/1.5;
height: parent.height/1.5;
width: parent.width/2;
height: parent.height/2;
anchors {
bottom: parent.bottom;
right: parent.right;
......
......@@ -44,7 +44,7 @@ PlasmaComponents.ListItem {
signal itemExpanded(string itemUni, bool itemExpanded);
enabled: true
height: theme.defaultFont.mSize.height * 2.6 + ((connectionItemSettings.status != Loader.Ready || !expanded) ? 0 : connectionItemSettings.item.childrenRect.height + padding.margins.top);
height: sizes.itemSize + ((connectionItemSettings.status != Loader.Ready || !expanded) ? 0 : connectionItemSettings.item.childrenRect.height + padding.margins.top);
onClicked: {
itemExpanded(itemUni, !expanded);
......@@ -53,11 +53,11 @@ PlasmaComponents.ListItem {
Item {
id: connectionItemBasic;
height: theme.defaultFont.mSize.height * 1.8;
anchors {
left: parent.left;
right: parent.right;
top: parent.top;
bottom: parent.bottom;
}
PlasmaCore.Svg {
......@@ -70,12 +70,11 @@ PlasmaComponents.ListItem {
Item {
id: connectionTypeIcon;
height: connectionItemBasic.height;
height: sizes.iconSize;
width: height;
anchors {
left: parent.left;
verticalCenter: parent.verticalCenter;
leftMargin: padding.margins.left;
}
PlasmaCore.SvgItem {
......@@ -121,14 +120,14 @@ PlasmaComponents.ListItem {
}
text: itemName;
elide: Text.ElideRight;
font.weight: itemConnectionState == PlasmaNM.Enums.Activated ? Font.DemiBold : Font.Normal;
// font.weight: itemConnectionState == PlasmaNM.Enums.Activated ? Font.DemiBold : Font.Normal;
font.italic: itemConnectionState == PlasmaNM.Enums.Activating ? true : false;
}
MouseEventListener {
id: leftActionArea;
width: theme.smallMediumIconSize * 2;
width: sizes.iconSize * 2;
anchors {
right: parent.right;
top: parent.top;
......@@ -149,7 +148,7 @@ PlasmaComponents.ListItem {
PlasmaComponents.BusyIndicator {
id: connectingIndicator;
width: theme.smallMediumIconSize;
width: sizes.iconSize;
height: width;
anchors {
right: parent.right;
......@@ -163,7 +162,7 @@ PlasmaComponents.ListItem {
PlasmaCore.IconItem {
id: configureButton;
width: theme.smallMediumIconSize;
width: sizes.iconSize;
height: width;
anchors {
right: parent.right;
......@@ -183,8 +182,8 @@ PlasmaComponents.ListItem {
anchors {
left: parent.left;
right: parent.right;
top: parent.top;
topMargin: theme.defaultFont.mSize.height * 2.2;
top: connectionItemBasic.bottom;
topMargin: padding.margins.top;
}
}
......@@ -382,6 +381,7 @@ PlasmaComponents.ListItem {
name: "ConnectionExpanded";
when: expanded && !sectionHidden;
StateChangeScript { script: createContent(); }
AnchorChanges { target: connectionItemBasic; anchors.bottom: undefined; }
}
]
......
......@@ -38,14 +38,11 @@ Item {
Column {
id: checkboxes;
spacing: 5;
anchors {
left: parent.left;
right: parent.right;
top: parent.top;
topMargin: padding.margins.top;
leftMargin: padding.margins.left;
bottomMargin: padding.margins.bottom;
}
PlasmaComponents.CheckBox {
......
......@@ -29,7 +29,7 @@ Title {
property bool expanded: true;
height: theme.defaultFont.mSize.height * 2.3;
height: sizes.itemSize;
anchors {
left: parent.left;
right: parent.right;
......@@ -45,7 +45,6 @@ Title {
leftMargin: padding.margins.left
}
text: section;
font.weight: (section == i18n("Active connections")) ? Font.DemiBold : Font.Normal;
MouseArea {
id: sectionLabelMouseArea
......@@ -59,7 +58,7 @@ Title {
PlasmaComponents.ToolButton {
id: expandButton;
height: theme.smallMediumIconSize;
height: sizes.iconSize;
width: height;
anchors {
left: parent.left;
......
......@@ -28,7 +28,7 @@ Item {
property bool expanded: false;
height: theme.defaultFont.mSize.height * 1.8;
height: sizes.itemSize;
PlasmaNM.NetworkStatus {
id: networkStatus;
......@@ -37,7 +37,7 @@ Item {
Item {
id: toolbarLine;
height: theme.defaultFont.mSize.height * 2;
height: sizes.itemSize;
anchors {
left: parent.left;
right: parent.right;
......@@ -47,7 +47,7 @@ Item {
PlasmaCore.IconItem {
id: statusIcon
height: theme.smallMediumIconSize;
height: sizes.iconSize;
width: height;
anchors {
left: parent.left;
......@@ -60,10 +60,9 @@ Item {
PlasmaComponents.Label {
id: statusLabel;
height: theme.defaultFont.mSize.height * 2;
height: sizes.itemSize;
anchors {
left: statusIcon.right;
right: toolButton.left;
verticalCenter: parent.verticalCenter;
leftMargin: padding.margins.left;
}
......@@ -74,7 +73,7 @@ Item {
PlasmaCore.IconItem {
id: toolButton;
height: theme.smallMediumIconSize;
height: sizes.iconSize;
width: height;
anchors {
right: parent.right;
......@@ -102,7 +101,6 @@ Item {
left: parent.left;
right: parent.right;
top: parent.top;
bottomMargin: padding.margins.bottom;
}
visible: false;
......@@ -122,7 +120,7 @@ Item {
State {
name: "Expanded";
when: expanded;
PropertyChanges { target: toolBar; height: options.childrenRect.height + theme.defaultFont.mSize.height * 2 + padding.margins.top }
PropertyChanges { target: toolBar; height: options.childrenRect.height + sizes.itemSize + padding.margins.top }
PropertyChanges { target: options; visible: true }
}
]
......
......@@ -78,6 +78,13 @@ Item {
anchors.fill: parent
}
Item {
id: sizes;
property int itemSize: theme.defaultFont.mSize.height * 2;
property int iconSize: theme.smallMediumIconSize;
}
ListView {
id: connectionView;
......@@ -92,7 +99,7 @@ Item {
left: parent.left;
right: parent.right;
top: parent.top;
bottom: toolbarSeparator.top;
bottom: toolbar.top;
topMargin: padding.margins.top;
bottomMargin: padding.margins.bottom
}
......@@ -173,26 +180,26 @@ Item {
}
}
PlasmaCore.SvgItem {
id: toolbarSeparator
height: lineSvg.elementSize("horizontal-line").height;
width: parent.width;
anchors {
left: parent.left;
right: parent.right;
bottom: toolbar.top;
bottomMargin: padding.margins.bottom/2;
leftMargin: padding.margins.left;
rightMargin: padding.margins.right;
}
elementId: "horizontal-line";
svg: PlasmaCore.Svg {
id: lineSvg;
imagePath: "widgets/line";
}
}
// PlasmaCore.SvgItem {
// id: toolbarSeparator
//
// height: lineSvg.elementSize("horizontal-line").height;
// width: parent.width;
// anchors {
// left: parent.left;
// right: parent.right;
// bottom: toolbar.top;
// bottomMargin: padding.margins.bottom/2;
// leftMargin: padding.margins.left;
// rightMargin: padding.margins.right;
// }
// elementId: "horizontal-line";
//
// svg: PlasmaCore.Svg {
// id: lineSvg;
// imagePath: "widgets/line";
// }
// }
Toolbar {
id: toolbar;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment