summaryrefslogtreecommitdiffstats
path: root/src/controls/Styles/Desktop
Commit message (Collapse)AuthorAgeFilesLines
* Make restoreMode on all Binding elements explicitUlf Hermann2019-10-041-1/+3
| | | | | | | The default is going to change in 5.15. Change-Id: Ib17500791476bd45ed2c7c3736186897fb63d7a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* [Desktop GroupBoxStyle] Don't hardcode textureHeightKai Uwe Broulik2017-01-021-1/+0
| | | | | | | This fixes skewed GroupBoxes in Plasma's config dialogs when using larger fonts. Change-Id: Ie850658da3f47d57eed0904c26dbbb26457a83e8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Unify license header usageAntti Kokko2016-02-0425-300/+375
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* BasicTableView: Use ListView's overlay header for the table headerGabriel de Dietrich2015-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | Previoulsy we manually positioned the table header over the table contents, which required some manual tweakings. Since 5.4, ListView support overlay headers that we can use them to clean our code in BasicTableView. There is, however, a small issue on Mac where the vertical scrollbar (specially in non-transient mode) is displayed below the table header. Since the header can't span beyond the ListView boundaries, we need to account for the vertical scrollbar width in the ListView's content width. This patch also updates the Desktop style to set the transientScrollBars property and some small tweaks to the Base style. Change-Id: I4433d0703328f23eadb0ae4563fbef5bba0168db Task-number: QTBUG-34344 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Tree- & TableView: Fix non-left aligned text marginsGabriel de Dietrich2015-08-071-1/+4
| | | | | | | | | | | This happens for both the item and header delegates. Previously, we were only taking left alignment into account. This resulted in poorly aligned item delegates with relation to the column header. Change-Id: I879d05cfb53641f02d5133a59fbe5a377b813f39 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Desktop/TreeViewStyle: Fix first column marginGabriel de Dietrich2015-07-232-3/+3
| | | | | | | | | | The margin was different depending on the item's depth resulting in an extra indentation for those items of depth zero. We fix this, and also set the proper inden- tation from the style. Change-Id: I8c9babd4b7c8b413f5c46cb756682eae4bf86892 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Make MenuBar, Menu properly accessibleGabriel de Dietrich2015-07-152-10/+0
| | | | | | | | Previously, we had the accessibility settings in the desktop style (only!). Now it's been moved into the actual control implementation. Change-Id: Idb90d164dfd7a72c8188accd9e4fa3b02d567a94 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Take QApplication::wheelScrollLines into account from ScrollViewAleix Pol2015-05-221-0/+2
| | | | | | | | Take the property into account, like QtWidgets applications do. This way the scroll feels more similar to the rest of applications. Change-Id: Ifde385fbfb052e5d6a446b1e339ce86ae8eca609 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Desktop/GroupBoxStyle: set "grouping" accessible role on the style itemJ-P Nurmi2015-03-101-0/+1
| | | | | | | | | This allows QGtkStyle to check the role and do appropriate styling (bold font) for the label. Task-number: QTBUG-43736 Change-Id: Iba5491f25180371d160ee2b52936adaf72772c16 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Introducing TreeViewGabriel de Dietrich2015-02-132-3/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TreeView, as currently implemented, extends the TableView by adding support for hierarchical models. In the broad sense, it remains a list view with columns, like TableView. The main architecture is based on TreeModelAdaptor, that wraps the hierarchical model. It keeps track of which items are expanded or collapsed, and also relays model changes to the view. (TreeModelAdaptor is a private type and should be considered as an implementation detail.) The TreeView only supports QAbstractItemModels for the time being, and, just like TableView, relies on roles to pass the data to the view. This also means that model columns are not supported. Selection is supported by ItemSelectionModel which exposes part of the API of QItemSelectionModel. For this, support has been added for QModelIndex and related classes. This requires importing QtQml.Models 2.2 should an actual usage of the TreeView use selection. In the same way, TreeViewStyle currently extends TableViewStyle with the relevant features, like branch indicator. [ChangeLog][QtQuick.Controls] Introducing TreeView With-Help-From: Caroline Chao <caroline.chao@theqtcompany.com> Change-Id: Id3dba240a732744571e4a646b7b98678ab522da6 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Controls: update license headersJ-P Nurmi2015-02-1124-681/+612
| | | | | | | Change-Id: I77e7a218a958d76ac7ef7780f4be52a81f76fa6b Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Correct sizing of combobox itemsMarco Martin2014-11-041-2/+2
| | | | | | | | | | | | | | | | | | The qstyle can set as preferred size for itemview items a different size than the text height depending from the result of sizeFromContents( CT_ItemViewItem, .. Examples of styles that do this, are Oxygen and Breeze, in order to have a bit more spacing. This makes the combobox render incorrectly. This patch makes use of the size hint of the qstyle instead of the text height. Since the height can be more than the font height, the text (and optional icon) are now drawn vertically centered in the delegate. Change-Id: I898d85c994d5760979750c2f3a5dafd83f1e3cbd Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* TableViewStyle: Fix and document styleData.hasActiveFocus propertyGabriel de Dietrich2014-10-221-2/+2
| | | | | | | | | The property has been present since 5.1 for rowDelegate and missing for itemDelegate. Also, the property was incorrectly bound to the table having active focus instead of the row. Change-Id: I43a93975dffd849b37cfee6363343f8aef57d11b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* MenuStyle: fix a typo that prevented mnemonics showing upJ-P Nurmi2014-10-141-1/+1
| | | | | | Task-number: QTBUG-41935 Change-Id: Ia70f155108df97e7c3ce86f6300148fe763cb8d6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Adding designersupported to pluginsThomas Hartmann2014-09-181-1/+1
| | | | | | | | This patch adds designersupported to the plugins supported by QtQuick Designer. Change-Id: I021bdeab6ef1e29d5ffd7e1e95b296217aaf10eb Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Update license headers and add new license filesAntti Kokko2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I470909ba0980db33ab551790d619c59a35978590 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Introduce ApplicationWindowStyleJ-P Nurmi2014-08-051-0/+42
| | | | | Change-Id: If96bfc8185883ff523ca4242f8ab04b5fccb8999 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* ComboBox: respect style padding for the editorJ-P Nurmi2014-07-281-0/+1
| | | | | | | | | | | | | | Get rid of the hard coded 8px left margin and use whatever value the style supplies (and is already used for the label). This allows the Android style to provide a sensible value for High DPI screens. The new value for the left margin is 6px in Base and Desktop styles. It looks slightly better, but still not pixel perfect. Notice that the text label of editable and non-editable ComboBoxes are not perfectly aligned in native Windows and OS X ComboBoxes either. Change-Id: I9a66c3a26fcd9ef1653b355e831277a7b6cbe72f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* TextArea: let style specify the default text marginJ-P Nurmi2014-07-241-0/+1
| | | | | | | | | The hard coded 4px margin is unsuitable especially on High DPI devices. For example on Nexus 5 it should be 36px, so let the Android style specify a suitable value. Change-Id: I31287d2e78ae822b8bd63ea19674c85b08975426 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* SpinBox: revert back to querying font via style panelJ-P Nurmi2014-07-171-1/+2
| | | | | | | This is a partial revert of 8c3afd8 for the same reason than 790769d. Change-Id: Ia082f375caa441a5db562b04369699092cf0007e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* ComboBox: query font & colors via style panelJ-P Nurmi2014-07-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Advanced custom styles have difficulties binding values from native styling elements to the style root, because such styling elements are created inside delegate components. ComboBoxStyle { id: style panel: Item { NativeStyle { id: native elementType: "ComboBox" } // typical "backwards" bindings that we want to avoid: Binding { target: style; property: "font"; value: native.font } Binding { target: style; property: "foo"; value: native.foo } Binding { target: style; property: "bar"; value: native.bar } // ... } } Becomes: ComboBoxStyle { id: style panel: Item { NativeStyle { id: native elementType: "ComboBox" } font: native.font foo: native.foo bar: native.bar // ... } } Change-Id: I23a3a6528cf0162dc91f94a44bcade2985260a9d Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* ComboBoxStyle: allow specifying text & selection colorsJ-P Nurmi2014-07-121-0/+3
| | | | | | | The system palette colors are not suitable for all styles. Change-Id: I326e57a3bac9c11dab9a40d1e4c933fc534e7ada Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Add SpinBoxStyle::fontJ-P Nurmi2014-07-081-2/+1
| | | | | | | | Replace the hidden panel.font-property with a proper font-property that is used in other textual controls' styles too. Change-Id: I93d712ba48e249d28dde0bc27406a13fb6aff1b0 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-06-257-31/+15
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Desktop/SpinBoxStyle.qml Change-Id: Ia501c1388a2af9f273ec2742abbfc766717ad9e6
| * Singleton SystemPaletteJ-P Nurmi2014-06-237-15/+15
| | | | | | | | | | | | | | | | | | | | Each SystemPalette instance installs an event filter on the application object. Avoid this by sharing a single SystemPalette instance. Change-Id: Ica9f8979b33e511c1238add3d689f380d0daa93c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
| * Kill unnecessary SystemPalette instancesJ-P Nurmi2014-06-203-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | Each SystemPalette instance installs an event filter on the application object, so we should try to avoid these as much as possible. Style already creates an instance that switches between Active and Disabled states based on control's enabled state and is suitable for most use cases. Change-Id: Icdbc793f639a3217ece6b2ded281e2a8beacb742 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | CheckBox & RadioButton: fix rounding issue that caused elided textJ-P Nurmi2014-06-162-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-39271 Change-Id: I9ddf03e2274f1abf4e049b84c3f72050f22cc958 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | SpinBox: let style panel specify a fontJ-P Nurmi2014-06-131-0/+2
| | | | | | | | | | | | | | The same way than for TextField. Required for Android. Change-Id: Ie055670307793aad1bd3f86c0c9594dda5c47be6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-06-111-3/+3
|\| | | | | | | Change-Id: I7ab0f7c218d462515c5aaaac3fbe3cd88d5cb5a5
| * TableView: Allow resizing and scrolling single-column tablesGabriel de Dietrich2014-06-061-3/+3
| | | | | | | | | | | | | | | | Also makes sure the resize handle is visible in desktop style. Task-number: QTBUG-39393 Change-Id: I44410c65e76b0a3221ea5fce713c1f1b69079947 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-05-142-6/+9
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Private/TabBar.qml Change-Id: Id176e44fe8e402c1c2c021ecb63c8c5c75736d47
| * ComboBox style: Remove old API in desktop drop-down frameGabriel de Dietrich2014-04-281-5/+8
| | | | | | | | | | | | | | | | | | | | | | The contentWidth, contentHeight properties no longer exist. We should use padding instead. Task-number: QTBUG-38054 Change-Id: I0e2574a5b17e12b9e43a3ab42e86ce38a31fff84 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
| * Fix tab visibility regressionJ-P Nurmi2014-04-151-1/+1
| | | | | | | | | | | | | | | | | | Division by 0 caused strange behavior and made the tabs not get a valid size even when the available size changed later. Task-number: QTBUG-38294 Change-Id: I456e7a0cc244a76c81832fa580377674bcc5a828 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Don't include the indicatorWidth twice on Checkable ButtonsDavid Edmundson2014-05-052-2/+2
|/ | | | | | | | | | | | | | QQuickStyleItem calculates the full size from the content size using the QStyle's sizeFromContent The QStyle will add the indicator to the contentSize. We should not include the indicator in the contents otherwise the indicator gets added twice. 4px of margins is added to match QRadioButton::sizeHint Change-Id: I791b0a8585843e66a6d8af456d95652496fe94d4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-0720-20/+20
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Import QtQuick 2.2J-P Nurmi2014-04-0720-20/+20
| | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* ComboBox: fix a warning in MenuContentItemJ-P Nurmi2014-03-181-0/+1
| | | | | Change-Id: I8428d7e2f768cd7341ecb3efcc52fc2dba1d0ca0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* MenuStyle: Adding missing 'submenuPopupDelay' propertyGabriel de Dietrich2014-03-051-0/+2
| | | | | | | | This amends e88bdffe644e53912dfbce95117555cb6a87bfd2 API-wise. Change-Id: I9243aa05c3c4803e1c3ee08a761e782ee8e0841a Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* MenuStyle: Fix popup margins for DesktopGabriel de Dietrich2014-03-041-14/+9
| | | | | Change-Id: Iacf17af64cc9df0518a7b29a4a7817d7c69d7539 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* MenuBarStyle: Fix metrics, selected appearanceGabriel de Dietrich2014-03-031-7/+15
| | | | | | | | On Windows, this depends on qtbase's Ia35a73274cc10b3b5a3f55573c92919f99555db0. Change-Id: If513cefadc052cb1450554f2e6e8af2abac02734 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Support text alignment for TableViewHeaderv5.3.0-alpha1Jens Bache-Wiig2014-02-251-1/+1
| | | | | | | | | task-number: QTBUG-33072 [ChangeLog][QtQuickControls][TableView] TableView headers now respect TableViewColumn::textAlignment Change-Id: I482e74e10b8879b367bce8165fa9310b28a06ad2 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Respect Tab::enabledJ-P Nurmi2014-02-211-0/+1
| | | | | | | | | [ChangeLog][QtQuickControls][TabView] Added support for enabling and disabling tabs. Task-number: QTBUG-36356 Change-Id: I97abc8008d479ce6b7a661e5a986c721a4482773 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add Calendar to Qt Quick Controls.Mitch Curtis2014-02-141-0/+43
| | | | | | | | | | | Task-number: QTBUG-29948 [ChangeLog][QtQuickControls] Calendar was added. Calendar allows selection of dates from a grid of days, similar to QCalendarWidget. Change-Id: I279130e704bc0dfd8dfe114ec9b6b49e111faf96 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Introducing styling for Menu, MenuBarGabriel de Dietrich2014-02-143-54/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | MenuStyle We expose the frame and item properties together with some convenience properties (basically color related). The menu item data is exposed via a styleData object, similarly to what's done in TabViewStyle. In addition, we introduce MenuStyle.menuItem which brings some convenience when it comes to overriding subcontrols of the menu item. MenuBarStyle We expose background and menuBarItem. The menubar item's properties are accessible through the styleData property in scope. Style cascading Additionally, MenuBarStyle has a menuStyle property that will apply to all its menus and their submenus. Similarly, assigning a style to a Menu object, will apply it to its submenus. It's still possible to override the parent menu's style by declaring its own. [ChangeLog][QtQuickControls][Styles]Menu and MenuBar are now styleable Change-Id: Ib724b7a6426bdfce5da314620d51dfaa76f76500 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-271-5/+0
|\ | | | | | | Change-Id: I974d73fda7e0eb4ea99b354a054452f057327644
| * Remove unused white rectangle causing drawing issuesMartin Klapetek2014-01-211-5/+0
| | | | | | | | | | | | | | | | | | | | The spinbox has a white rectangle which overlaps the frames with some styles (eg. oxygen). However the Rectangle itself serves no real purpose and so it's removed. Change-Id: I37a6862dfd8ac21fb24b54261fa7d7ab54aa23c7 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-171-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Base/ComboBoxStyle.qml src/controls/Styles/Desktop/ComboBoxStyle.qml src/layouts/qgridlayoutengine.cpp Change-Id: I14298b9b3521fe220248e4b27e7057d538af5c49
| * Fix typo in property in ComboBoxStyleDavid Edmundson2014-01-161-1/+1
| | | | | | | | | | | | | | | | | | drowDownButtonWidth seems to be a typo in an exposed property name. In order to keep compatibility an (undocumented) alias is added. Change-Id: I2ab04b3518325e339c31cf6f403c488256a4aabe Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-052-3/+2
|\| | | | | | | Change-Id: I04b45f6e998fdeff87d237ec49a74f7c53b1d9f2
| * Make slider's style react to mouse hoverMartin Klapetek2013-12-041-0/+1
| | | | | | | | | | | | | | | | | | Paints the hover highlight around the slider handle when mouse hovers it. Change-Id: I883d5c5b97b0542a36e796ce6a07398ab67e94bd Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>