Fix Plasma controls and add QtPotato branding #1
No files matched your search
@@ -95,6 +95,14 @@ ecm_target_qml_sources(qtpotato SOURCES
|
||||
qml/VolumeSlider.qml
|
||||
)
|
||||
|
||||
# Bundled copy of the app icon, used when the installed one is not in the icon theme
|
||||
# (e.g. running from the build directory).
|
||||
qt_add_resources(qtpotato "icons"
|
||||
PREFIX "/"
|
||||
BASE icons
|
||||
FILES icons/dev.trivk.qtpotato.svg
|
||||
)
|
||||
|
||||
target_include_directories(qtpotato PRIVATE models mpris mpv playlist translate)
|
||||
target_compile_definitions(qtpotato PRIVATE QTPOTATO_VERSION_STRING="${PROJECT_VERSION}")
|
||||
|
||||
@@ -121,3 +129,5 @@ target_link_libraries(qtpotato PRIVATE
|
||||
)
|
||||
|
||||
install(TARGETS qtpotato ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
install(FILES dev.trivk.qtpotato.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
||||
install(FILES icons/dev.trivk.qtpotato.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
|
||||
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=QtPotato
|
||||
GenericName=Video Player
|
||||
Comment=Video player with subtitle translation
|
||||
Exec=qtpotato %U
|
||||
Icon=dev.trivk.qtpotato
|
||||
Terminal=false
|
||||
Categories=Qt;KDE;AudioVideo;Video;Player;
|
||||
MimeType=video/mp4;video/x-matroska;video/webm;video/x-msvideo;video/quicktime;video/mpeg;video/ogg;video/x-flv;video/x-ms-wmv;
|
||||
Keywords=video;movie;player;subtitle;translate;mpv;
|
||||
@@ -0,0 +1,47 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
|
||||
<defs>
|
||||
<radialGradient id="skin" cx="0.38" cy="0.32" r="0.8">
|
||||
<stop offset="0" stop-color="#f8d79e"/>
|
||||
<stop offset="0.6" stop-color="#e8b06a"/>
|
||||
<stop offset="1" stop-color="#c98a45"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="badge" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#5ee06c"/>
|
||||
<stop offset="1" stop-color="#2fa83f"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="leaf" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#6fe57b"/>
|
||||
<stop offset="1" stop-color="#2fa83f"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<!-- shadow -->
|
||||
<ellipse cx="124" cy="228" rx="84" ry="9" fill="#000" opacity="0.18"/>
|
||||
|
||||
<!-- sprout -->
|
||||
<path d="M136 66 C136 54 139 45 144 38" fill="none" stroke="#2f8f3a" stroke-width="5" stroke-linecap="round"/>
|
||||
<path d="M141 50 C128 30 108 28 101 35 C110 50 128 56 141 50 Z" fill="url(#leaf)"/>
|
||||
<path d="M143 42 C151 20 175 16 183 23 C175 41 158 48 143 42 Z" fill="url(#leaf)"/>
|
||||
|
||||
<!-- body -->
|
||||
<path d="M58 104 C70 70 108 56 150 60 C196 64 226 98 222 142 C218 188 180 216 128 216 C78 216 38 190 36 150 C35 128 48 116 58 104 Z"
|
||||
fill="url(#skin)" stroke="#a86a2e" stroke-width="3"/>
|
||||
|
||||
<!-- potato spots -->
|
||||
<ellipse cx="182" cy="98" rx="6" ry="4" fill="#b8793a" opacity="0.55" transform="rotate(-20 182 98)"/>
|
||||
<ellipse cx="70" cy="182" rx="5" ry="3.5" fill="#b8793a" opacity="0.5" transform="rotate(25 70 182)"/>
|
||||
<ellipse cx="80" cy="96" rx="4" ry="3" fill="#b8793a" opacity="0.45"/>
|
||||
|
||||
<!-- face -->
|
||||
<ellipse cx="82" cy="152" rx="13" ry="8" fill="#ff7f8a" opacity="0.5"/>
|
||||
<ellipse cx="170" cy="152" rx="13" ry="8" fill="#ff7f8a" opacity="0.5"/>
|
||||
<ellipse cx="100" cy="134" rx="9" ry="11.5" fill="#3b2414"/>
|
||||
<ellipse cx="152" cy="134" rx="9" ry="11.5" fill="#3b2414"/>
|
||||
<circle cx="103.5" cy="129" r="3.6" fill="#fff"/>
|
||||
<circle cx="155.5" cy="129" r="3.6" fill="#fff"/>
|
||||
<path d="M114 151 Q120 159 126 151 Q132 159 138 151" fill="none" stroke="#3b2414" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
|
||||
<!-- play badge -->
|
||||
<circle cx="200" cy="198" r="38" fill="url(#badge)" stroke="#fff8ee" stroke-width="6"/>
|
||||
<path d="M189 180 L218 198 L189 216 Z" fill="#fff" stroke="#fff" stroke-width="7" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
+8
-4
@@ -27,8 +27,11 @@ int main(int argc, char *argv[])
|
||||
// libmpv parses numbers with the C locale; Qt sets the locale from the environment.
|
||||
std::setlocale(LC_NUMERIC, "C");
|
||||
|
||||
// Use the Plasma style unless the user picked another one explicitly.
|
||||
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
|
||||
// On Plasma the platform theme has already picked the QtQuick style that matches the
|
||||
// widget style (org.kde.union, org.kde.breeze, ...). Forcing org.kde.desktop over it
|
||||
// renders controls as scaled QStyle pixmaps: blurry at fractional scales and without
|
||||
// proper padding or hover/focus states. Only fall back to it when nothing was chosen.
|
||||
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE") && QQuickStyle::name().isEmpty()) {
|
||||
QQuickStyle::setStyle(u"org.kde.desktop"_s);
|
||||
}
|
||||
|
||||
@@ -42,12 +45,13 @@ int main(int argc, char *argv[])
|
||||
i18n("© 2026 Tri Vo Khac"));
|
||||
aboutData.addAuthor(i18n("Tri Vo Khac"), i18nc("@info:credit", "Author"), QString(), u"https://github.com/vokhactri"_s);
|
||||
aboutData.setDesktopFileName(u"dev.trivk.qtpotato"_s);
|
||||
aboutData.setProgramLogo(u"multimedia-video-player"_s);
|
||||
const QIcon appIcon = QIcon::fromTheme(u"dev.trivk.qtpotato"_s, QIcon(u":/dev.trivk.qtpotato.svg"_s));
|
||||
aboutData.setProgramLogo(appIcon);
|
||||
aboutData.setHomepage(u"https://github.com/vokhactri/QtPotato"_s);
|
||||
aboutData.setBugAddress("https://github.com/vokhactri/QtPotato/issues");
|
||||
aboutData.setOrganizationDomain("trivk.dev");
|
||||
KAboutData::setApplicationData(aboutData);
|
||||
QApplication::setWindowIcon(QIcon::fromTheme(u"multimedia-video-player"_s));
|
||||
QApplication::setWindowIcon(appIcon);
|
||||
|
||||
KCrash::initialize();
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ MpvItem {
|
||||
icon.name: "video-symbolic"
|
||||
text: KI18n.i18nc("@info:placeholder", "No video open")
|
||||
explanation: KI18n.i18nc("@info:placeholder", "Open a file or drop one here")
|
||||
helpfulAction: root.actions.openFile
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
||||
Reference in new issue
Block a user