~ubuntu-branches/ubuntu/utopic/ubuntu-ui-toolkit/utopic-proposed

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/10/Button.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Michał Sawicz, Tim Peeters, Christian Dywan, Florian Boucault, Albert Astals, Martin Pitt, Omer Akram
  • Date: 2014-07-31 11:12:39 UTC
  • mfrom: (1.1.98)
  • Revision ID: package-import@ubuntu.com-20140731111239-cw0jqjr78g5lip9x
Tags: 0.1.51+14.10.20140731.1-0ubuntu1
[ Michał Sawicz ]
* Add "source" property to the Icon component.

[ Tim Peeters ]
* Reduce header height by 0.5 grid units.
* Visual updates: colors, icon sizes, semi-transparent buttons.
* Allow app developers to disable the back button by setting an 
  invisible back action for the page.
* Fix icon loading problems. 
  Fixes: https://bugs.launchpad.net/bugs/1349769
* New visuals for sections in the header divider.

[ Christian Dywan ] 
* Implement optional strokeColor in AbstractButton. 
  Fixes: https://bugs.launchpad.net/bugs/1332580

[ Florian Boucault]
* StateSaver: also save the type of each property along with its 
  value so that we can convert them back to the right type during
  state restoration. This makes some problematic cases such as 
  enumeration to work.

[ Albert Astals ]
* Placeholder is also shown on focus

[ Martin Pitt ]
* Fix installability of ubuntu-ui-toolkit-examples with 
  qtdeclarative5-ubuntu-ui-toolkit-plugin-gles. 
  Fixes: https://bugs.launchpad.net/bugs/1346650

[ Omer Akram ]
* Add helper methods for TextArea. There is a separate 'clear' 
  method because the one that exists in TextField class checks
  the property hasClearButton which TextArea does not have.
  Fixes: https://bugs.launchpad.net/bugs/1327354

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2012 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
import QtQuick 2.0
 
18
import Ubuntu.Components 1.0
 
19
 
 
20
/*!
 
21
   \internal
 
22
   Documentation in 11/Button.qml
 
23
*/
 
24
AbstractButton {
 
25
    id: button
 
26
 
 
27
    property color color: __styleInstance.defaultColor
 
28
 
 
29
    property Gradient gradient: __styleInstance.defaultGradient
 
30
 
 
31
    property font font: __styleInstance ? __styleInstance.defaultFont : Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium")})
 
32
 
 
33
    property string iconPosition: "left"
 
34
 
 
35
    style: Theme.createStyleComponent("ButtonStyle.qml", button)
 
36
}