diff --git a/src/plugins/shakecursor/CMakeLists.txt b/src/plugins/shakecursor/CMakeLists.txt index 95caa22d02..f2eecabfa8 100644 --- a/src/plugins/shakecursor/CMakeLists.txt +++ b/src/plugins/shakecursor/CMakeLists.txt @@ -3,6 +3,7 @@ kwin_add_builtin_effect(shakecursor) target_sources(shakecursor PRIVATE main.cpp shakecursor.cpp + shakecursor.qrc shakedetector.cpp ) diff --git a/src/plugins/shakecursor/cursors/Breeze_Light/cursors/default b/src/plugins/shakecursor/cursors/Breeze_Light/cursors/default new file mode 100644 index 0000000000..e94d99ae63 Binary files /dev/null and b/src/plugins/shakecursor/cursors/Breeze_Light/cursors/default differ diff --git a/src/plugins/shakecursor/cursors/Breeze_Light/index.theme b/src/plugins/shakecursor/cursors/Breeze_Light/index.theme new file mode 100644 index 0000000000..28da32ae69 --- /dev/null +++ b/src/plugins/shakecursor/cursors/Breeze_Light/index.theme @@ -0,0 +1,95 @@ +[Icon Theme] +Name=Breeze Light +Name[ar]=نسيم فاتح +Name[az]=Breeze - İşıqlı +Name[bg]=Breeze Светъл +Name[ca]=Brisa clara +Name[ca@valencia]=Brisa clara +Name[cs]=Breeze Světlé +Name[da]=Breeze Light +Name[de]=Breeze Hell +Name[el]=Breeze φωτεινό +Name[en_GB]=Breeze Light +Name[eo]=Breeze Light +Name[es]=Brisa claro +Name[et]=Breeze hele +Name[eu]=Breeze argia +Name[fi]=Vaalea Breeze +Name[fr]=Brise clair +Name[gl]=Brisa clara +Name[he]=בריזה בהירה +Name[hi]=ब्रीज़ हलका +Name[hu]=Breeze Light +Name[ia]=Brisa Ligier +Name[id]=Breeze Terang +Name[is]=Breeze ljóst +Name[it]=Brezza chiaro +Name[ja]=Breeze ライト +Name[ka]=Breeze ღია +Name[ko]=밝은 Breeze +Name[lt]=Breeze šviesus +Name[lv]=Breeze Light +Name[nl]=Breeze Light +Name[nn]=Breeze lys +Name[pa]=ਬਰੀਜ਼ ਹਲਕਾ +Name[pl]=Jasna Bryza +Name[pt]=Brisa Clara +Name[pt_BR]=Breeze Light +Name[ro]=Briză, luminos +Name[ru]=Breeze, светлый вариант +Name[sk]=Svetlý vánok +Name[sl]=Sapica, svetla +Name[sv]=Breeze ljus +Name[tg]=Насими сабук +Name[tr]=Esinti Açık +Name[uk]=Світла Breeze +Name[x-test]=xxBreeze Lightxx +Name[zh_CN]=Breeze 微风浅色 +Name[zh_TW]=Breeze Light +Comment=Breeze Light by the KDE VDG +Comment[ar]=نسيم فاتح من مجموعة تصميم كِيدِي +Comment[az]=Breeze -İşıqlı - KDE VDG tərəfindən +Comment[bg]=Breeze Светъл от KDE VDG +Comment[ca]=Brisa clara, creat pel VDG del KDE +Comment[ca@valencia]=Brisa clara, creat pel VDG de KDE +Comment[cs]=Breeze Light od KDE VDG +Comment[da]=Breeze Light af KDE's visuelle designgruppe +Comment[de]=Breeze Hell von der KDE VDG +Comment[el]=Breeze φωτεινό από το KDE VDG +Comment[en_GB]=Breeze Light by the KDE VDG +Comment[eo]=Breeze Light de la KDE VDG +Comment[es]=Brisa claro, por KDE VDG +Comment[et]=Breeze hele KDE VDG-lt +Comment[eu]=Breeze argia, KDE VDGk egina +Comment[fi]=Vaalea Breeze KDE VDG:ltä +Comment[fr]=Brise Light par KDE VDG +Comment[gl]=Brisa clara do KDE VDG. +Comment[he]=בריזה בהירה מאת צוות העיצוב החזותי של KDE +Comment[hi]=केडीई वीडीजी द्वारा ब्रीज़ हलका +Comment[hu]=Breeze Light a KDE VDG-től +Comment[ia]=Brisa Ligier per KDE VDG +Comment[id]=Breeze Terang oleh KDE VDG +Comment[is]=Breeze Light frá KDE VDG +Comment[it]=Brezza chiaro a cura del VDG di KDE +Comment[ja]=KDE VDG による Breeze ライト +Comment[ka]=Breeze ღია KDE VDG-სგან +Comment[ko]=KDE 시각 디자인 그룹에서 제작한 밝은 Breeze +Comment[lt]=Breeze šviesus pagal KDE VDG +Comment[lv]=KDE VDG veidotā „Breeze Light“ +Comment[nl]=Breeze Light door de KDE VDG +Comment[nn]=Breeze Light frå KDE VDG +Comment[pa]=ਕੇਡੀਈ ਵੀਡੀਜੀ ਵਲੋਂ ਬਰੀਜ਼ ਹਲਕਾ +Comment[pl]=Jasna Bryza autorstwa KDE VDG +Comment[pt]=Brisa Claro da VDG do KDE +Comment[pt_BR]=Breeze Light pelo KDE VDG +Comment[ro]=Briză, luminos, de KDE VDG +Comment[ru]=Светлый вариант Breeze от KDE VDG +Comment[sk]=Svetlý vánok od KDE VDG +Comment[sl]=Sapica, svetla; izdelali pri KDE VDG +Comment[sv]=Breeze ljus av KDE:s visuella designgrupp +Comment[tg]=Насими сабук аз KDE VDG +Comment[tr]=KDE Görsel Tasarım Grubundan Esinti +Comment[uk]=Світла Breeze, автори — KDE VDG +Comment[x-test]=xxBreeze Light by the KDE VDGxx +Comment[zh_CN]=Breeze 微风浅色主题,由 KDE VDG (视觉设计团队) 设计制作 +Comment[zh_TW]=由 KDE VDG 製作的 Breeze Light diff --git a/src/plugins/shakecursor/cursors/breeze_cursors/cursors/default b/src/plugins/shakecursor/cursors/breeze_cursors/cursors/default new file mode 100644 index 0000000000..65a9b7c853 Binary files /dev/null and b/src/plugins/shakecursor/cursors/breeze_cursors/cursors/default differ diff --git a/src/plugins/shakecursor/cursors/breeze_cursors/index.theme b/src/plugins/shakecursor/cursors/breeze_cursors/index.theme new file mode 100644 index 0000000000..18aa8c9de3 --- /dev/null +++ b/src/plugins/shakecursor/cursors/breeze_cursors/index.theme @@ -0,0 +1,104 @@ +[Icon Theme] +Name=Breeze +Name[ar]=نسيم +Name[ast]=Breeze +Name[az]=Breeze +Name[bg]=Breeze +Name[bs]=Breeze +Name[ca]=Brisa +Name[ca@valencia]=Brisa +Name[cs]=Breeze +Name[da]=Breeze +Name[de]=Breeze +Name[el]=Breeze +Name[en_GB]=Breeze +Name[eo]=Breeze +Name[es]=Brisa +Name[et]=Breeze +Name[eu]=Breeze +Name[fi]=Breeze +Name[fr]=Brise +Name[gl]=Brisa +Name[he]=בריזה +Name[hi]=ब्रीज़ +Name[hu]=Breeze +Name[ia]=Brisa +Name[id]=Breeze +Name[is]=Breeze +Name[it]=Brezza +Name[ja]=Breeze +Name[ka]=Breeze +Name[ko]=Breeze +Name[lt]=Breeze +Name[lv]=Breeze +Name[nb]=Breeze +Name[nds]=Breeze +Name[nl]=Breeze +Name[nn]=Breeze +Name[pa]=ਬਰੀਜ਼ +Name[pl]=Bryza +Name[pt]=Brisa +Name[pt_BR]=Breeze +Name[ro]=Briză +Name[ru]=Breeze +Name[sk]=Vánok +Name[sl]=Sapica +Name[sr]=Поветарац +Name[sr@ijekavian]=Поветарац +Name[sr@ijekavianlatin]=Povetarac +Name[sr@latin]=Povetarac +Name[sv]=Breeze +Name[ta]=பிரீஸ் +Name[tg]=Насим +Name[tr]=Esinti +Name[uk]=Breeze +Name[x-test]=xxBreezexx +Name[zh_CN]=Breeze 微风 +Name[zh_TW]=Breeze +Comment=Breeze by the KDE VDG +Comment[ar]=نسيم من مجموعة تصميم كِيدِي +Comment[az]=Breeze - KDE VDG tərəfindən +Comment[bg]=Breeze от KDE VDG +Comment[ca]=Brisa, creat pel VDG del KDE +Comment[ca@valencia]=Brisa, creat pel VDG de KDE +Comment[cs]=Breeze od KDE VDG +Comment[da]=Breeze af KDE's visuelle designgruppe +Comment[de]=Breeze von der KDE VDG +Comment[el]=Breeze από το KDE VDG +Comment[en_GB]=Breeze by the KDE VDG +Comment[eo]=Breeze de la KDE VDG +Comment[es]=Brisa, por KDE VDG +Comment[et]=Breeze KDE VDG-lt +Comment[eu]=Breeze, KDE VDGk egina +Comment[fi]=Breeze KDE VDG:ltä +Comment[fr]=Brise par KDE VDG +Comment[gl]=Brisa do KDE VDG. +Comment[he]=בריזה מאת צוות העיצוב החזותי של KDE +Comment[hi]=केडीई वीडीजी द्वारा ब्रीज़ +Comment[hu]=Breeze a KDE VDG-től +Comment[ia]=Breeze (Brisa) per le KDE VDG +Comment[id]=Breeze oleh KDE VDG +Comment[is]=Breeze frá KDE VDG +Comment[it]=Brezza a cura del VDG di KDE +Comment[ja]=KDE VDG による Breeze +Comment[ka]=Breeze-ი KDE VDG-სგან +Comment[ko]=KDE 시각 디자인 그룹에서 제작한 Breeze +Comment[lt]=Breeze pagal KDE VDG +Comment[lv]=KDE VDG veidotā „Breeze“ +Comment[nl]=Breeze door de KDE VDG +Comment[nn]=Breeze frå KDE VDG +Comment[pa]=ਕੇਡੀਈ ਵੀਡੀਜੀ ਵਲੋਂ ਬਰੀਜ਼ +Comment[pl]=Bryza autorstwa KDE VDG +Comment[pt]=Brisa da VDG do KDE +Comment[pt_BR]=Breeze pelo KDE VDG +Comment[ro]=Briză, de KDE VDG +Comment[ru]=Breeze от KDE VDG +Comment[sk]=Vánok od KDE VDG +Comment[sl]=Sapica; izdelali pri KDE VDG +Comment[sv]=Breeze av KDE:s visuella designgrupp +Comment[tg]=Насим аз KDE VDG +Comment[tr]=KDE Görsel Tasarım Grubundan Esinti +Comment[uk]=Breeze, автори — KDE VDG +Comment[x-test]=xxBreeze by the KDE VDGxx +Comment[zh_CN]=Breeze 微风主题,由 KDE VDG (视觉设计团队) 设计制作 +Comment[zh_TW]=由 KDE VDG 製作的 Breeze diff --git a/src/plugins/shakecursor/shakecursor.cpp b/src/plugins/shakecursor/shakecursor.cpp index 0979a08ef4..a23358741b 100644 --- a/src/plugins/shakecursor/shakecursor.cpp +++ b/src/plugins/shakecursor/shakecursor.cpp @@ -15,6 +15,11 @@ #include "scene/itemrenderer.h" #include "scene/workspacescene.h" +static void ensureResources() +{ + Q_INIT_RESOURCE(shakecursor); +} + namespace KWin { @@ -42,6 +47,7 @@ void ShakeCursorItem::refresh() ShakeCursorEffect::ShakeCursorEffect() : m_cursor(Cursors::self()->mouse()) { + ensureResources(); input()->installInputEventSpy(this); m_deflateTimer.setSingleShot(true); @@ -146,7 +152,16 @@ void ShakeCursorEffect::magnify(qreal magnification) const qreal maxScale = ShakeCursorConfig::magnification() + 4 * ShakeCursorConfig::overMagnification(); if (m_cursorTheme.name() != m_cursor->themeName() || m_cursorTheme.size() != m_cursor->themeSize() || m_cursorTheme.devicePixelRatio() != maxScale) { - m_cursorTheme = KXcursorTheme(m_cursor->themeName(), m_cursor->themeSize(), maxScale); + static const QStringList embeddedCursorThemes{ + QStringLiteral("breeze_cursors"), + QStringLiteral("Breeze_Light"), + }; + + QStringList searchPaths; + if (embeddedCursorThemes.contains(m_cursor->themeName())) { + searchPaths.append(QStringLiteral(":/effects/shakecursor/cursors")); + } + m_cursorTheme = KXcursorTheme(m_cursor->themeName(), m_cursor->themeSize(), maxScale, searchPaths); } m_cursorItem = std::make_unique(m_cursorTheme, effects->scene()->overlayItem()); diff --git a/src/plugins/shakecursor/shakecursor.qrc b/src/plugins/shakecursor/shakecursor.qrc new file mode 100644 index 0000000000..96444c9043 --- /dev/null +++ b/src/plugins/shakecursor/shakecursor.qrc @@ -0,0 +1,8 @@ + + + cursors/breeze_cursors/cursors/default + cursors/breeze_cursors/index.theme + cursors/Breeze_Light/cursors/default + cursors/Breeze_Light/index.theme + +