Changeset View
Changeset View
Standalone View
Standalone View
applets/notes/package/contents/ui/main.qml
Show First 20 Lines • Show All 342 Lines • ▼ Show 20 Line(s) | 342 | RowLayout { | |||
---|---|---|---|---|---|
343 | id: fontButtons | 343 | id: fontButtons | ||
344 | spacing: units.smallSpacing | 344 | spacing: units.smallSpacing | ||
345 | anchors { | 345 | anchors { | ||
346 | bottom: parent.bottom | 346 | bottom: parent.bottom | ||
347 | left: parent.left | 347 | left: parent.left | ||
348 | right: parent.right | 348 | right: parent.right | ||
349 | } | 349 | } | ||
350 | 350 | | |||
351 | opacity: focusScope.activeFocus ? 1 : 0 | ||||
352 | Behavior on opacity { NumberAnimation { duration: units.longDuration } } | ||||
353 | | ||||
351 | readonly property int requiredWidth: formatButtonsRow.width + spacing + settingsButton.width | 354 | readonly property int requiredWidth: formatButtonsRow.width + spacing + settingsButton.width | ||
352 | readonly property bool showFormatButtons: width > requiredWidth | 355 | readonly property bool showFormatButtons: width > requiredWidth | ||
353 | 356 | | |||
354 | Row { | 357 | Row { | ||
355 | id: formatButtonsRow | 358 | id: formatButtonsRow | ||
356 | spacing: units.smallSpacing | 359 | spacing: units.smallSpacing | ||
357 | // show format buttons if TextField or any of the buttons have focus | 360 | // show format buttons if TextField or any of the buttons have focus | ||
358 | opacity: fontButtons.showFormatButtons && focusScope.activeFocus ? 1 : 0 | | |||
359 | | ||||
360 | Behavior on opacity { NumberAnimation { duration: units.longDuration } } | | |||
361 | enabled: opacity > 0 | 361 | enabled: opacity > 0 | ||
362 | visible: fontButtons.showFormatButtons | 362 | visible: fontButtons.showFormatButtons | ||
363 | 363 | | |||
364 | QQC2.ToolButton { | 364 | QQC2.ToolButton { | ||
365 | icon.name: "format-text-bold" | 365 | icon.name: "format-text-bold" | ||
366 | icon.color: textIconColor | 366 | icon.color: textIconColor | ||
367 | icon.width: units.iconSizes.smallMedium | 367 | icon.width: units.iconSizes.smallMedium | ||
368 | icon.height: icon.width | 368 | icon.height: icon.width | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |