Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/xcursor/previewwidget.cpp
Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Line(s) | 180 | { | |||
---|---|---|---|---|---|
192 | setTheme(theme, size); | 192 | setTheme(theme, size); | ||
193 | } | 193 | } | ||
194 | 194 | | |||
195 | int PreviewWidget::currentSize() const | 195 | int PreviewWidget::currentSize() const | ||
196 | { | 196 | { | ||
197 | return m_currentSize; | 197 | return m_currentSize; | ||
198 | } | 198 | } | ||
199 | 199 | | |||
200 | void PreviewWidget::refresh() | ||||
201 | { | ||||
202 | if (!m_themeModel) { | ||||
203 | return; | ||||
204 | } | ||||
205 | | ||||
206 | const CursorTheme *theme = m_themeModel->theme(m_themeModel->index(m_currentIndex, 0)); | ||||
207 | setTheme(theme, m_currentSize); | ||||
208 | } | ||||
209 | | ||||
200 | void PreviewWidget::updateImplicitSize() | 210 | void PreviewWidget::updateImplicitSize() | ||
201 | { | 211 | { | ||
202 | qreal totalWidth = 0; | 212 | qreal totalWidth = 0; | ||
203 | qreal maxHeight = 0; | 213 | qreal maxHeight = 0; | ||
204 | 214 | | |||
205 | foreach (const PreviewCursor *c, list) | 215 | foreach (const PreviewCursor *c, list) | ||
206 | { | 216 | { | ||
207 | totalWidth += c->width(); | 217 | totalWidth += c->width(); | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |