~tpeeters/ubuntu-ui-toolkit/numHeaderActions

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/1.3/PageHeader.qml

  • Committer: Tim Peeters
  • Date: 2015-11-30 12:38:35 UTC
  • Revision ID: tim.peeters@canonical.com-20151130123835-ug1kvqx5dbueskbh
adaptive number of header actions

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
            rightMargin: units.gu(1)
201
201
        }
202
202
        height: header.__styleInstance.contentHeight
203
 
        numberOfSlots: 3
 
203
        numberOfSlots: MathUtils.clamp(0.3*header.width/units.gu(4), 3, 6)
204
204
        delegate: header.__styleInstance.defaultActionDelegate
205
205
        visible: trailing.width > 0 // at least 1 visible action
206
206
    }