Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Docs fixes #56

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/UbuntuToolkit/qquickclipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ UT_NAMESPACE_BEGIN
*
* The clipboard data cannot be modified through the type returned by the data
* property, for this a new instance of MimeData type must be used. This instance
* can be either a standalone MimeDala component or an object created using newData()
* can be either a standalone MimeData component or an object created using newData()
* function. Remember that standalone MimeData types duplicate the clipboard data
* which may cause extensive memory use.
*
Expand Down
99 changes: 53 additions & 46 deletions src/UbuntuToolkit/sortfiltermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,58 +36,65 @@ UT_NAMESPACE_BEGIN
*
* Example usage:
* \qml
* import QtQuick 2.4
* import Ubuntu.Components 1.2
* import Ubuntu.Components.ListItems 1.1
* import QtQuick 2.9
* import Ubuntu.Components 1.3
*
* MainView {
* width: units.gu(80)
* height: units.gu(40)
*
* ListModel {
* id: movies
* ListElement {
* title: "Esign"
* producer: "Chris Larkee"
* }
* ListElement {
* title: "Elephants Dream"
* // lowercase b
* producer: "blender"
* }
* ListElement {
* title: "Big Buck Bunny"
* producer: "Blender"
* }
* }
*
* SortFilterModel {
* id: sortedMovies
* model: movies
* sort.property: "title"
* sort.order: Qt.DescendingOrder
* // case insensitive sorting
* sortCaseSensitivity: Qt.CaseInsensitive
*
* filter.property: "producer"
* // case insensitive matches
* filter.pattern: /blender/i
* }
*
* ListView {
* model: sortedMovies
* anchors.fill: parent
*
* delegate: Subtitled {
* text: title
* subText: producer
* }
*
* section.delegate: ListItem.Header { text: i18n.tr(section) }
* section.property: "title"
* section.criteria: ViewSection.FirstCharacter
* }
* }
* id: movies
mardy marked this conversation as resolved.
Show resolved Hide resolved
*
* ListElement {
* title: "Esign"
* producer: "Chris Larkee"
* }
*
* ListElement {
* title: "Elephants Dream"
* producer: "Blender"
* }
*
* ListElement {
* title: "Big Buck Bunny"
* producer: "blender"
* }
* }
*
* SortFilterModel {
* id: sortedMovies
* model: movies
*
* sort {
* property: "title"
* order: Qt.DescendingOrder
* }
*
* filter {
* property: "producer"
* //Add i for case insensitive
* pattern: /Blender/i
* }
* }
*
* ListView {
* model: sortedMovies
* anchors.fill: parent
* delegate: ListItemLayout {
* title.text: model.title
* subtitle.text: model.producer
* }
*
* section {
* property: "title"
* criteria: ViewSection.FirstCharacter
* delegate: Text {
* text: i18n.tr(section)
* }
* }
* }
*}
* \endqml
*
* Pay attention to the differences between the original model and the result:
Expand Down
7 changes: 4 additions & 3 deletions src/UbuntuToolkit/ucubuntushape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ UCUbuntuShape::UCUbuntuShape(QQuickItem* parent)
, m_sourceTransform(1.0f, 1.0f, 0.0f, 0.0f)
, m_relativeRadius(0)
, m_radius(Small)
, m_aspect(Inset)
, m_aspect(DropShadow)
, m_imageHorizontalAlignment(AlignHCenter)
, m_imageVerticalAlignment(AlignVCenter)
, m_backgroundMode(SolidColor)
Expand Down Expand Up @@ -423,7 +423,7 @@ void UCUbuntuShape::setRadius(const QString& radius)
/*! \qmlproperty enumeration UbuntuShape::aspect

This property defines the graphical style of the UbuntuShape. The default value is \c
UbuntuShape.Inset.
UbuntuShape.DropShadow.

\note Setting this disables support for the deprecated \l borderSource property. Use the
UbuntuShapeOverlay item in order to provide the inset "pressed" aspect previously supported by
Expand All @@ -432,6 +432,7 @@ void UCUbuntuShape::setRadius(const QString& radius)
\list
\li \b UbuntuShape.Flat - no effects applied
\li \b UbuntuShape.Inset - inner shadow slightly moved downwards and bevelled bottom
\li \b UbuntuShape.DropShadow - outer non-blurred shadow slightly moved downwards
\endlist
*/
void UCUbuntuShape::setAspect(Aspect aspect)
Expand Down Expand Up @@ -857,7 +858,7 @@ void UCUbuntuShape::setBorderSource(const QString& borderSource)
if (!(m_flags & AspectSet)) {
quint8 aspect;
if (borderSource.endsWith(QStringLiteral("radius_idle.sci"))) {
aspect = Inset;
aspect = DropShadow;
} else if (borderSource.endsWith(QStringLiteral("radius_pressed.sci"))) {
aspect = Pressed;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Item {

UbuntuShape {
id: background
aspect: UbuntuShape.Inset
anchors {
margins: checkBoxStyle.backgroundPadding
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Item {

UbuntuShape {
id: background
aspect: UbuntuShape.Inset

width: styledItem.width
height: styledItem.height
Expand Down
2 changes: 2 additions & 0 deletions src/imports/Components/Themes/Ambiance/1.3/SwitchStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ Item {

UbuntuShape {
id: background
aspect: UbuntuShape.Inset
anchors.fill: parent
backgroundColor: switchStyle.backgroundColor
clip: true

UbuntuShape {
id: thumb
aspect: UbuntuShape.Inset
states: [
State {
name: "checked"
Expand Down