Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/components/UserDelegate.qml
Show All 13 Lines | |||||
14 | * | 14 | * | ||
15 | * You should have received a copy of the GNU Library General Public | 15 | * You should have received a copy of the GNU Library General Public | ||
16 | * License along with this program; if not, write to the | 16 | * License along with this program; if not, write to the | ||
17 | * Free Software Foundation, Inc., | 17 | * Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | import QtQuick 2.8 | 21 | import QtQuick 2.8 | ||
22 | import QtGraphicalEffects 1.0 | | |||
23 | | ||||
24 | import org.kde.plasma.core 2.0 as PlasmaCore | 22 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
25 | import org.kde.plasma.components 2.0 as PlasmaComponents | 23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
26 | 24 | | |||
27 | Item { | 25 | Item { | ||
28 | id: wrapper | 26 | id: wrapper | ||
29 | 27 | | |||
30 | // If we're using software rendering, draw outlines instead of shadows | 28 | // If we're using software rendering, draw outlines instead of shadows | ||
31 | // See https://bugs.kde.org/show_bug.cgi?id=398317 | 29 | // See https://bugs.kde.org/show_bug.cgi?id=398317 | ||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 133 | void main() { | |||
149 | else | 147 | else | ||
150 | gl_FragColor = colorEmpty ; | 148 | gl_FragColor = colorEmpty ; | ||
151 | 149 | | |||
152 | gl_FragColor = gl_FragColor * qt_Opacity; | 150 | gl_FragColor = gl_FragColor * qt_Opacity; | ||
153 | } | 151 | } | ||
154 | " | 152 | " | ||
155 | } | 153 | } | ||
156 | 154 | | |||
157 | DropShadow { | | |||
158 | id: usernameShadow | | |||
159 | visible: !softwareRendering | | |||
160 | anchors.fill: usernameDelegate | | |||
161 | source: usernameDelegate | | |||
162 | horizontalOffset: 1 | | |||
163 | verticalOffset: 1 | | |||
164 | radius: 4 | | |||
165 | samples: 9 | | |||
166 | spread: 0.35 | | |||
167 | color: "black" // matches Breeze window decoration and desktopcontainment | | |||
168 | } | | |||
169 | | ||||
170 | PlasmaComponents.Label { | 155 | PlasmaComponents.Label { | ||
171 | id: usernameDelegate | 156 | id: usernameDelegate | ||
172 | font.pointSize: 12 | 157 | font.pointSize: 12 | ||
173 | anchors { | 158 | anchors { | ||
174 | bottom: parent.bottom | 159 | bottom: parent.bottom | ||
175 | horizontalCenter: parent.horizontalCenter | 160 | horizontalCenter: parent.horizontalCenter | ||
176 | } | 161 | } | ||
177 | height: implicitHeight // work around stupid bug in Plasma Components that sets the height | 162 | height: implicitHeight // work around stupid bug in Plasma Components that sets the height | ||
Show All 21 Lines |