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 122 Lines • ▼ Show 20 Line(s) | 138 | void main() { | |||
154 | else | 152 | else | ||
155 | gl_FragColor = colorEmpty ; | 153 | gl_FragColor = colorEmpty ; | ||
156 | 154 | | |||
157 | gl_FragColor = gl_FragColor * qt_Opacity; | 155 | gl_FragColor = gl_FragColor * qt_Opacity; | ||
158 | } | 156 | } | ||
159 | " | 157 | " | ||
160 | } | 158 | } | ||
161 | 159 | | |||
162 | DropShadow { | | |||
163 | id: usernameShadow | | |||
164 | visible: !softwareRendering | | |||
165 | anchors.fill: usernameDelegate | | |||
166 | source: usernameDelegate | | |||
167 | horizontalOffset: 1 | | |||
168 | verticalOffset: 1 | | |||
169 | radius: 4 | | |||
170 | samples: 9 | | |||
171 | spread: 0.35 | | |||
172 | color: "black" // matches Breeze window decoration and desktopcontainment | | |||
173 | } | | |||
174 | | ||||
175 | PlasmaComponents.Label { | 160 | PlasmaComponents.Label { | ||
176 | id: usernameDelegate | 161 | id: usernameDelegate | ||
177 | font.pointSize: theme.defaultFont.pointSize + 2 | 162 | font.pointSize: theme.defaultFont.pointSize + 2 | ||
178 | anchors { | 163 | anchors { | ||
179 | bottom: parent.bottom | 164 | bottom: parent.bottom | ||
180 | horizontalCenter: parent.horizontalCenter | 165 | horizontalCenter: parent.horizontalCenter | ||
181 | } | 166 | } | ||
182 | height: implicitHeight // work around stupid bug in Plasma Components that sets the height | 167 | height: implicitHeight // work around stupid bug in Plasma Components that sets the height | ||
Show All 21 Lines |