Changeset View
Changeset View
Standalone View
Standalone View
applets/digital-clock/package/contents/ui/CalendarView.qml
| Show All 14 Lines | |||||
| 15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | 17 | */ | ||
| 18 | import QtQuick 2.4 | 18 | import QtQuick 2.4 | ||
| 19 | import QtQuick.Layouts 1.1 | 19 | import QtQuick.Layouts 1.1 | ||
| 20 | import org.kde.plasma.core 2.0 as PlasmaCore | 20 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
| 21 | import org.kde.plasma.calendar 2.0 as PlasmaCalendar | 21 | import org.kde.plasma.calendar 2.0 as PlasmaCalendar | ||
| 22 | import org.kde.plasma.components 2.0 as PlasmaComponents | 22 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
| 23 | import org.kde.plasma.components 3.0 as PlasmaComponents3 | ||||
| 23 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 24 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
| 24 | 25 | | |||
| 25 | Item { | 26 | Item { | ||
| 26 | id: calendar | 27 | id: calendar | ||
| 27 | 28 | | |||
| 28 | // The "sensible" values | 29 | // The "sensible" values | ||
| 29 | property int _minimumWidth: rootLayout.childrenRect.width + (rootLayout.anchors.margins * 2) | 30 | property int _minimumWidth: rootLayout.childrenRect.width + (rootLayout.anchors.margins * 2) | ||
| 30 | property int _minimumHeight: rootLayout.childrenRect.height + (rootLayout.anchors.margins * 2) | 31 | property int _minimumHeight: rootLayout.childrenRect.height + (rootLayout.anchors.margins * 2) | ||
| ▲ Show 20 Lines • Show All 433 Lines • ▼ Show 20 Line(s) | 419 | ListView { | |||
| 464 | } | 465 | } | ||
| 465 | } | 466 | } | ||
| 466 | } | 467 | } | ||
| 467 | } | 468 | } | ||
| 468 | } | 469 | } | ||
| 469 | 470 | | |||
| 470 | 471 | | |||
| 471 | // Allows the user to keep the calendar open for reference | 472 | // Allows the user to keep the calendar open for reference | ||
| 472 | PlasmaComponents.ToolButton { | 473 | PlasmaComponents3.ToolButton { | ||
| 473 | anchors.right: parent.right | 474 | anchors.right: parent.right | ||
| 474 | width: Math.round(units.gridUnit * 1.25) | | |||
| 475 | height: width | | |||
| 476 | checkable: true | 475 | checkable: true | ||
| 477 | iconSource: "window-pin" | | |||
| 478 | checked: plasmoid.configuration.pin | 476 | checked: plasmoid.configuration.pin | ||
| 479 | onCheckedChanged: plasmoid.configuration.pin = checked | 477 | onToggled: plasmoid.configuration.pin = checked | ||
| 480 | tooltip: i18n("Keep Open") | 478 | icon.name: "window-pin" | ||
| 479 | PlasmaComponents3.ToolTip { | ||||
| 480 | text: i18n("Keep Open") | ||||
| 481 | } | ||||
| 481 | } | 482 | } | ||
| 482 | } | 483 | } | ||