D11289: checkable FormLayout items

2018-04-09 Thread Julian Wolff
This revision was automatically updated to reflect the committed changes.
Closed by commit R169:6ac4e62002ae: checkable FormLayout items (authored by 
progwolff).

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11289?vs=29937=31751

REVISION DETAIL
  https://phabricator.kde.org/D11289

AFFECTED FILES
  examples/gallerydata/contents/ui/gallery/FormLayoutGallery.qml
  src/controls/templates/FormLayout.qml
  src/formlayoutattached.cpp
  src/formlayoutattached.h

To: progwolff, #vdg, #kirigami, mart
Cc: mart, ngraham, plasma-devel, apol, davidedmundson, hein


D11289: checkable FormLayout items

2018-03-19 Thread Julian Wolff
progwolff updated this revision to Diff 29937.
progwolff marked 3 inline comments as done.
progwolff added a comment.


  - split buddyComponent and checkableBuddyComponent
  - toggle checkbox on shortcut activated

REPOSITORY
  R169 Kirigami

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11289?vs=29413=29937

BRANCH
  arcpatch-D11289

REVISION DETAIL
  https://phabricator.kde.org/D11289

AFFECTED FILES
  examples/gallerydata/contents/ui/gallery/FormLayoutGallery.qml
  src/controls/templates/FormLayout.qml
  src/formlayoutattached.cpp
  src/formlayoutattached.h

To: progwolff, #vdg, #kirigami
Cc: mart, ngraham, plasma-devel, apol, davidedmundson, hein


D11289: checkable FormLayout items

2018-03-19 Thread Julian Wolff
progwolff planned changes to this revision.
progwolff added a comment.


  In D11289#229340 , @mart wrote:
  
  > can you provide screenshots as well t see how does it look?
  
  
  I added one under "test plan".

INLINE COMMENTS

> mart wrote in FormLayout.qml:213
> should the behavior of the shortcut change to toggle the checkbox instead 
> when the item is checkable?

Good idea!

> mart wrote in FormLayout.qml:226
> What's this rectangle about?

It highlights the label when the checkbox is in focus. You can see it in the 
new screenshot under "test plan".
This part is stolen from PlasmaComponents: 
https://api.kde.org/frameworks/plasma-framework/html/CheckBoxStyle_8qml_source.html
 line 30

> mart wrote in formlayoutattached.h:110
> api wise an "enabled" property doesn't have anything to do with checkboxes

It has nothing to do with checkboxes in particular. Here it is used as a 
combined `enabled` for the buddy component.
How would you call it?

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D11289

To: progwolff, #vdg, #kirigami
Cc: mart, ngraham, plasma-devel, apol, davidedmundson, hein


D11289: checkable FormLayout items

2018-03-19 Thread Marco Martin
mart added a comment.


  can you provide screenshots as well t see how does it look?

INLINE COMMENTS

> FormLayout.qml:185
>  id: buddyComponent
> -Kirigami.Heading {
> +CheckBox {
>  id: labelItem

what i'm concerned is that this makes every field a checkbox, no matter if it 
should or should not be one.

> FormLayout.qml:213
>  sequence: labelItem.Kirigami.MnemonicData.sequence
>  onActivated: 
> item.Kirigami.FormData.buddyFor.forceActiveFocus()
>  }

should the behavior of the shortcut change to toggle the checkbox instead when 
the item is checkable?

> FormLayout.qml:226
> +}
> +Rectangle {
> +enabled: labelItem.indicator.enabled

What's this rectangle about?

> formlayoutattached.h:110
> + */
> +Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY 
> enabledChanged)
> +

api wise an "enabled" property doesn't have anything to do with checkboxes

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D11289

To: progwolff, #vdg, #kirigami
Cc: mart, ngraham, plasma-devel, apol, davidedmundson, hein


D11289: checkable FormLayout items

2018-03-13 Thread Julian Wolff
progwolff created this revision.
progwolff added reviewers: VDG, Kirigami.
Restricted Application added a project: Kirigami.
Restricted Application added a subscriber: plasma-devel.
progwolff requested review of this revision.

REVISION SUMMARY
  In some cases, form items go together with a checkbox which can be used to 
disable the item.
  An example for such an item is the line edit in the first row of the 
screenlocker kcm.
  Here, a checkbox is prepended to the line edit's label.
  
  In Kirigami, there is (afaik) no way to add a widget to a FormLayout item's 
buddyComponent.
  This patch adds an optional combobox to the buddyComponent.
  
  A place where I would like to use this is the fonts kcm: 
https://phabricator.kde.org/T7927#132277

TEST PLAN
  I added a checkable item to the FormLayout gallery page.

REPOSITORY
  R169 Kirigami

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D11289

AFFECTED FILES
  examples/gallerydata/contents/ui/gallery/FormLayoutGallery.qml
  src/controls/templates/FormLayout.qml
  src/formlayoutattached.cpp
  src/formlayoutattached.h

To: progwolff, #vdg, #kirigami
Cc: plasma-devel, apol, davidedmundson, mart, hein