Changeset View
Changeset View
Standalone View
Standalone View
app/skin.cpp
Context not available. | |||||
45 | QString titlePath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + name + QStringLiteral("/title.skin")); | 45 | QString titlePath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + name + QStringLiteral("/title.skin")); | ||
---|---|---|---|---|---|
46 | QString tabPath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + name + QStringLiteral("/tabs.skin")); | 46 | QString tabPath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + name + QStringLiteral("/tabs.skin")); | ||
47 | 47 | | |||
48 | if (!QFile::exists(titlePath) || !QFile::exists(tabPath)) | 48 | if(!QFile::exists(titlePath) || !QFile::exists(tabPath)) | ||
49 | return false; | 49 | return false; | ||
50 | 50 | | |||
51 | connect(KIconLoader::global(), SIGNAL(iconChanged(int)), this, SLOT(systemIconsChanged(int)), | 51 | connect(KIconLoader::global(), SIGNAL(iconChanged(int)), this, SLOT(systemIconsChanged(int)), | ||
Context not available. | |||||
177 | tabDir + tabBarCloseTabButton.readEntry("over_image", ""), | 177 | tabDir + tabBarCloseTabButton.readEntry("over_image", ""), | ||
178 | tabDir + tabBarCloseTabButton.readEntry("down_image", "")); | 178 | tabDir + tabBarCloseTabButton.readEntry("down_image", "")); | ||
179 | 179 | | |||
180 | if (m_tabBarCompact) | 180 | if(m_tabBarCompact) | ||
181 | { | 181 | { | ||
182 | if (m_tabBarNewTabButtonIsAtEndOfTabs) | 182 | if(m_tabBarNewTabButtonIsAtEndOfTabs) | ||
183 | { | 183 | { | ||
184 | m_tabBarLeft = m_tabBarPosition.x(); | 184 | m_tabBarLeft = m_tabBarPosition.x(); | ||
185 | m_tabBarPosition.setX(0); | 185 | m_tabBarPosition.setX(0); | ||
186 | } | 186 | } | ||
187 | else | 187 | else | ||
188 | { | 188 | { | ||
189 | if (m_tabBarNewTabButtonPosition.x() < m_tabBarPosition.x()) | 189 | if(m_tabBarNewTabButtonPosition.x() < m_tabBarPosition.x()) | ||
190 | m_tabBarLeft = m_tabBarNewTabButtonPosition.x(); | 190 | m_tabBarLeft = m_tabBarNewTabButtonPosition.x(); | ||
191 | else | 191 | else | ||
192 | m_tabBarLeft = m_tabBarPosition.x(); | 192 | m_tabBarLeft = m_tabBarPosition.x(); | ||
Context not available. | |||||
200 | m_tabBarCloseTabButtonPosition.setX(closeButtonWidth); | 200 | m_tabBarCloseTabButtonPosition.setX(closeButtonWidth); | ||
201 | } | 201 | } | ||
202 | 202 | | |||
203 | if (m_tabBarPreventClosingImage.isNull()) | 203 | if(m_tabBarPreventClosingImage.isNull()) | ||
204 | updateTabBarPreventClosingImageCache(); | 204 | updateTabBarPreventClosingImageCache(); | ||
205 | 205 | | |||
206 | return true; | 206 | return true; | ||
Context not available. | |||||
248 | 248 | | |||
249 | const QPixmap Skin::tabBarPreventClosingImage() | 249 | const QPixmap Skin::tabBarPreventClosingImage() | ||
250 | { | 250 | { | ||
251 | if (m_tabBarPreventClosingImage.isNull()) | 251 | if(m_tabBarPreventClosingImage.isNull()) | ||
252 | return m_tabBarPreventClosingImageCached; | 252 | return m_tabBarPreventClosingImageCached; | ||
253 | 253 | | |||
254 | return m_tabBarPreventClosingImage; | 254 | return m_tabBarPreventClosingImage; | ||
Context not available. | |||||
265 | m_tabBarPreventClosingImageCached = QIcon::fromTheme(QStringLiteral("object-locked.png")).pixmap(48, 48); | 265 | m_tabBarPreventClosingImageCached = QIcon::fromTheme(QStringLiteral("object-locked.png")).pixmap(48, 48); | ||
266 | 266 | | |||
267 | // Resize the image if it's too tall. | 267 | // Resize the image if it's too tall. | ||
268 | if (m_IconSize < m_tabBarPreventClosingImageCached.height()) | 268 | if(m_IconSize < m_tabBarPreventClosingImageCached.height()) | ||
269 | { | 269 | { | ||
270 | m_tabBarPreventClosingImageCached = | 270 | m_tabBarPreventClosingImageCached = | ||
271 | m_tabBarPreventClosingImageCached.scaled(m_IconSize, | 271 | m_tabBarPreventClosingImageCached.scaled(m_IconSize, | ||
Context not available. | |||||
278 | { | 278 | { | ||
279 | Q_UNUSED(group); | 279 | Q_UNUSED(group); | ||
280 | 280 | | |||
281 | if (m_tabBarPreventClosingImage.isNull()) | 281 | if(m_tabBarPreventClosingImage.isNull()) | ||
282 | { | 282 | { | ||
283 | updateTabBarPreventClosingImageCache(); | 283 | updateTabBarPreventClosingImageCache(); | ||
284 | 284 | | |||
Context not available. |