Dialog and Popover have no attached theme property
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Critical
|
Zoltan Balogh | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Critical
|
Tim Peeters | ||
ubuntu-ui-toolkit (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned | ||
unity8 (Ubuntu) |
New
|
Critical
|
Unassigned |
Bug Description
In order to give the Dialog a different theme from the rest of an app, we need to set the theme property, as is done in the example of the theming tutorial in file://
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.
MainView {
width: units.gu(40)
height: units.gu(71)
application
// make sure the main theme is Ambiance
theme.name: "Ubuntu.
Component {
id: dialogComponent
Dialog {
id: dialog
title: "Input dialog"
// the dialog and its children will use SuruDark
theme: ThemeSettings {
}
}
Button {
}
}
}
Button {
text: "Open dialog"
onClicked: PopupUtils.
}
}
However, this gives the following error file://
because Dialog is not a StyledItem.
Related branches
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Zsombor Egri: Approve
-
Diff: 144 lines (+93/-0)4 files modifiedcomponents.api (+6/-0)
documentation/ubuntu-theming.qdoc (+1/-0)
src/Ubuntu/Components/Popups/1.3/Dialog.qml (+62/-0)
src/Ubuntu/Components/Popups/1.3/Popover.qml (+24/-0)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
importance: | Undecided → High |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Tim Peeters (tpeeters) |
importance: | High → Critical |
Changed in canonical-devices-system-image: | |
milestone: | none → 11 |
Changed in canonical-devices-system-image: | |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
assignee: | nobody → Zoltan Balogh (bzoltan) |
importance: | Undecided → Critical |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
information type: | Public → Private Security |
information type: | Private Security → Public |
Workaround:
import QtQuick 2.4 Components. Popups 1.3
import Ubuntu.Components 1.3
import Ubuntu.
MainView {
width: units.gu(40)
height: units.gu(71)
application Name: "subthemed"
// make sure the main theme is Ambiance Components. Themes. Ambiance"
theme.name: "Ubuntu.
Component {
ThemeSetti ngs {
name: "Ubuntu. Components. Themes. SuruDark"
TextField {
placeholderTe xt: "enter text"
text: "Close"
onClicked: PopupUtils. close(dialog) onCompleted: { theme = tset;
id: dialogComponent
Dialog {
id: dialog
title: "Input dialog"
// the dialog and its children will use SuruDark
id: tset
}
}
Button {
}
Component.
__foreground.
}
}
}
Button { open(dialogComp onent)
text: "Open dialog"
onClicked: PopupUtils.
}
}