summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-10-04 13:19:53 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-10-04 13:19:53 +0200
commitb4c951ac9397eda3a380489dafbed7cb4b96bd25 (patch)
treed8cef8a385638818e55a4535cc075c8b0f2703b8 /components
parent41a1b36081e32ce9ff0dc28658851b3ee0de928c (diff)
downloadkube-b4c951ac9397eda3a380489dafbed7cb4b96bd25.tar.gz
kube-b4c951ac9397eda3a380489dafbed7cb4b96bd25.zip
ComposerView details: pure Layouts based layout
Diffstat (limited to 'components')
-rw-r--r--components/kube/contents/ui/ComposerView.qml188
1 files changed, 83 insertions, 105 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml
index 2c00aad8..c7b32564 100644
--- a/components/kube/contents/ui/ComposerView.qml
+++ b/components/kube/contents/ui/ComposerView.qml
@@ -364,8 +364,10 @@ Kube.View {
364 top: parent.top 364 top: parent.top
365 bottom: parent.bottom 365 bottom: parent.bottom
366 } 366 }
367 activeFocusOnTab: true
368 width: Kube.Units.gridUnit * 15 367 width: Kube.Units.gridUnit * 15
368 activeFocusOnTab: true
369
370 //background
369 Rectangle { 371 Rectangle {
370 anchors.fill: parent 372 anchors.fill: parent
371 color: Kube.Colors.backgroundColor 373 color: Kube.Colors.backgroundColor
@@ -375,120 +377,101 @@ Kube.View {
375 width: 1 377 width: 1
376 color: Kube.Colors.buttonColor 378 color: Kube.Colors.buttonColor
377 } 379 }
380 }
378 381
379 //Content 382 //Content
380 Item { 383 ColumnLayout {
381 anchors.right: parent.right 384 anchors {
382 width: parent.width 385 fill: parent
383 height: parent.height 386 margins: Kube.Units.largeSpacing
384 387 }
385 ColumnLayout {
386 anchors {
387 top: parent.top
388 bottom: bottomButtons.top
389 left: parent.left
390 right: parent.right
391 margins: Kube.Units.largeSpacing
392 }
393
394 Kube.Label {
395 text: qsTr("Sending Email to:")
396 }
397 388
398 AddresseeListEditor { 389 spacing: Kube.Units.largeSpacing
399 id: to
400 Layout.preferredHeight: to.implicitHeight
401 Layout.fillWidth: true
402 focus: true
403 activeFocusOnTab: true
404 completer: composerController.recipientCompleter
405 model: composerController.toModel
406 onAdded: composerController.addTo(text)
407 onRemoved: composerController.removeTo(text)
408 }
409 390
410 Kube.Label { 391 ColumnLayout {
411 text: qsTr("Sending Copy to (CC):") 392 Layout.fillWidth: true
412 } 393 Layout.fillHeight: true
413 AddresseeListEditor {
414 id: cc
415 Layout.preferredHeight: cc.implicitHeight
416 Layout.fillWidth: true
417 activeFocusOnTab: true
418 completer: composerController.recipientCompleter
419 model: composerController.ccModel
420 onAdded: composerController.addCc(text)
421 onRemoved: composerController.removeCc(text)
422 }
423 394
424 Kube.Label { 395 Kube.Label {
425 text: qsTr("Sending Secret Copy to (Bcc):") 396 text: qsTr("Sending Email to:")
426 } 397 }
427 AddresseeListEditor {
428 id: bcc
429 Layout.preferredHeight: bcc.implicitHeight
430 Layout.fillWidth: true
431 activeFocusOnTab: true
432 completer: composerController.recipientCompleter
433 model: composerController.bccModel
434 onAdded: composerController.addBcc(text)
435 onRemoved: composerController.removeBcc(text)
436 }
437 398
438 Item { 399 AddresseeListEditor {
439 width: parent.width 400 id: to
440 Layout.fillHeight: true 401 Layout.preferredHeight: to.implicitHeight
441 } 402 Layout.fillWidth: true
403 focus: true
404 activeFocusOnTab: true
405 completer: composerController.recipientCompleter
406 model: composerController.toModel
407 onAdded: composerController.addTo(text)
408 onRemoved: composerController.removeTo(text)
442 } 409 }
443 410
411 Kube.Label {
412 text: qsTr("Sending Copy to (CC):")
413 }
414 AddresseeListEditor {
415 id: cc
416 Layout.preferredHeight: cc.implicitHeight
417 Layout.fillWidth: true
418 activeFocusOnTab: true
419 completer: composerController.recipientCompleter
420 model: composerController.ccModel
421 onAdded: composerController.addCc(text)
422 onRemoved: composerController.removeCc(text)
423 }
444 424
425 Kube.Label {
426 text: qsTr("Sending Secret Copy to (Bcc):")
427 }
428 AddresseeListEditor {
429 id: bcc
430 Layout.preferredHeight: bcc.implicitHeight
431 Layout.fillWidth: true
432 activeFocusOnTab: true
433 completer: composerController.recipientCompleter
434 model: composerController.bccModel
435 onAdded: composerController.addBcc(text)
436 onRemoved: composerController.removeBcc(text)
437 }
445 Item { 438 Item {
446 id: bottomButtons 439 width: parent.width
447 anchors { 440 Layout.fillHeight: true
448 bottom: fromLabel.top 441 }
449 bottomMargin: Kube.Units.largeSpacing 442 }
450 horizontalCenter: parent.horizontalCenter
451 }
452 width: parent.width - Kube.Units.largeSpacing * 2
453 height: Kube.Units.gridUnit
454 443
455 Kube.Button { 444 RowLayout {
456 id: saveDraftButton 445 width: parent.width
446 height: Kube.Units.gridUnit
457 447
458 anchors.right: parent.right 448 Kube.Button {
449 width: saveDraftButton.width
450 text: qsTr("Discard")
451 onClicked: Kube.Fabric.postMessage(Kube.Messages.componentDone, {})
452 }
459 453
460 text: qsTr("Save as Draft") 454 Kube.Button {
461 //TODO enabled: saveAsDraftAction.enabled 455 id: saveDraftButton
462 onClicked: {
463 saveAsDraftAction.execute()
464 }
465 }
466 Kube.Button {
467 anchors.left: parent.left
468 456
469 text: qsTr("Discard") 457 text: qsTr("Save as Draft")
470 onClicked: Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) 458 //TODO enabled: saveAsDraftAction.enabled
459 onClicked: {
460 saveAsDraftAction.execute()
471 } 461 }
472 } 462 }
463 }
473 464
465 ColumnLayout {
466 Layout.fillWidth: true
474 Kube.Label { 467 Kube.Label {
475 id: fromLabel 468 id: fromLabel
476 anchors {
477 bottom: identityCombo.top
478 bottomMargin: Kube.Units.smallSpacing
479 left: identityCombo.left
480 }
481 text: qsTr("You are sending this from:") 469 text: qsTr("You are sending this from:")
482 } 470 }
483 471
484 Kube.ComboBox { 472 Kube.ComboBox {
485 id: identityCombo 473 id: identityCombo
486 474
487 anchors {
488 bottom: sendButton.top
489 bottomMargin: Kube.Units.largeSpacing
490 horizontalCenter: parent.horizontalCenter
491 }
492 width: parent.width - Kube.Units.largeSpacing * 2 475 width: parent.width - Kube.Units.largeSpacing * 2
493 476
494 model: composerController.identitySelector.model 477 model: composerController.identitySelector.model
@@ -498,24 +481,19 @@ Kube.View {
498 composerController.identitySelector.currentIndex = currentIndex 481 composerController.identitySelector.currentIndex = currentIndex
499 } 482 }
500 } 483 }
484 }
501 485
502 Kube.PositiveButton { 486 Kube.PositiveButton {
503 id: sendButton 487 id: sendButton
504 488
505 anchors { 489 width: parent.width
506 bottom: parent.bottom
507 bottomMargin: Kube.Units.largeSpacing
508 horizontalCenter: parent.horizontalCenter
509 }
510 width: parent.width - Kube.Units.largeSpacing * 2
511 490
512 text: qsTr("Send") 491 text: qsTr("Send")
513 enabled: sendAction.enabled 492 enabled: sendAction.enabled
514 onClicked: { 493 onClicked: {
515 sendAction.execute() 494 sendAction.execute()
516 }
517 } 495 }
518 } 496 }
519 } 497 }
520 } //FocusScope 498 }//FocusScope
521} 499}