<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Marco,<div class=""><br class=""></div><div class="">Yes, you are correct, this is for Subsurface-mobile.</div><div class=""><br class=""></div><div class="">We do in fact use mostly our own controls and simply style them directly, but </div><div class="">it is the odds and ends that we get from Kirigami that cause us problems, or</div><div class="">more correctly, inconsistencies.</div><div class=""><br class=""></div><div class="">E.g., I couldn't figure out a way to change the color used in the breadcrumbs</div><div class="">or in the drawer backgrounds or for the action button without patching Kirigami.</div><div class=""><br class=""></div><div class="">And both of your responses indicate an issue that Kirigami (as part of Plasma)</div><div class="">appears to primarily be targeting Linux system - the promise of QLM and Kirigami </div><div class="">for us of course was that we could use one framework for Linux, Windows, macOS,</div><div class="">Android, and iOS. We already use QLM for the maps across all of these OSs,</div><div class="">and we are just right now adding statistics that are used everywhere and consist</div><div class="">of a mixture of C++ and QLM.</div><div class=""><br class=""></div><div class="">As of this writing, Kirigami itself isn't used in the desktop app, only the mobile app,</div><div class="">so predominantly on Android and iOS, but if I can get some of the issues I am</div><div class="">fighting right now sorted out, my hope would be to change that and make it the</div><div class="">consistent element of our UI design</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 13, 2021, at 6:54 AM, Marco Martin <<a href="mailto:notmart@gmail.com" class="">notmart@gmail.com</a>> wrote:</div><div class=""><div class=""><blockquote type="cite" class=""><br class="">After spending some quality time with the documentation I could find (not a lot) and with the sample plugin that I was able to find (Noah’s qqc2-breeze-plugin) I’m not sure if I understand more or am more confused. :-)<br class=""><br class="">I was able to build the plugin (that requires a lot of KF5 infrastructure, but for figuring out how this all is supposed to work I’m not too worried about that) and load the plugin, but then what do I do with it? Or asked differently, what do I get from having it?<br class=""></blockquote><br class="">that one is called a QtQuickControls style. Basically is a set of qml<br class="">files that will be instantiated when you create basic components like<br class="">Button{}, ComboBox{} and so on.<br class="">If your application must have an uniform own style for those controls,<br class="">implementing an own QtQuickControls style is the suggested way, rather<br class="">having inside the application MyButton{} MyTextBox{} and so on.<br class=""></div></div></blockquote><div><br class=""></div>So this really changes the way the basic building blocks of QML are put</div><div>together. That may be a bit more invasive (and a bit too hard to maintain</div><div>as Qt changes fairly rapidly) for us.</div><div><br class=""></div></div><div>Which brings us back to "how I do the simpler thing"</div><div><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jan 13, 2021, at 6:26 AM, Marco Martin <<a href="mailto:notmart@gmail.com" class="">notmart@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="float: none; display: inline !important;">there may be several ways to go about.</span><br class=""><span class="" style="float: none; display: inline !important;">As Nico says, the Theme cal actually load plugins which can make it</span><br class=""><span class="" style="float: none; display: inline !important;">arbitrarly customizable.</span><br class=""><span class="" style="float: none; display: inline !important;">I was thinking about ways to make apps use arbitrary own color schemes</span><br class=""><span class="" style="float: none; display: inline !important;">(mostly for mobile use case) didn't come to a good upstream solution</span><br class=""><span class="" style="float: none; display: inline !important;">yet (i guess will end up have something based upon plain text config</span><br class=""><span class="" style="float: none; display: inline !important;">files for different color themes).</span><br class=""></div></blockquote><div><br class=""></div><div>That certainly would work and be fairly easy for us to do, but I understand</div><div>that that's not available, yet.</div><br class=""><blockquote type="cite" class=""><div class=""><span class="" style="float: none; display: inline !important;">you can do either a c++ theme specialization plugin, or if you use</span><br class=""><span class="" style="float: none; display: inline !important;">your own style, and have it as a subdirectory in styles/</span><br class=""><span class="" style="float: none; display: inline !important;">you can then provide your own Theme.qml that exposes the various color</span><br class=""><span class="" style="float: none; display: inline !important;">properties (just start from one existing)</span><br class=""></div></blockquote><div><br class=""></div>Ahh, that's interesting. Can you say a little more how that would work?</div><div>Kirigami gets compiled into a plugin that contains all its resources. So</div><div>would this simply be an additional set of commits on top of Kirigami that</div><div>we would carry and modify things there?</div><div><br class=""><blockquote type="cite" class=""><div class=""><span class="" style="float: none; display: inline !important;">so then in there you can make those values conditional to your internal theme.</span><br class=""><span class="" style="float: none; display: inline !important;">there it should affect colors everywhere (handles included).</span><br class=""><span class="" style="float: none; display: inline !important;">I assume is for Subsurface, right? i see that it already has custom</span><br class=""><span class="" style="float: none; display: inline !important;">buttons and whatnot, if they are a QtQuickcontrols2 theme, just create</span><br class=""><span class="" style="float: none; display: inline !important;">a kirigami style with the same name and that should be used</span><br class=""></div></blockquote><div class=""><div class=""><span class="" style="float: none; display: inline !important;"><br class=""></span></div></div><div class=""><span class="" style="float: none; display: inline !important;">No, they aren't a QQC2 theme - as you saw in the other email (in this</span></div><div class=""><span class="" style="float: none; display: inline !important;">response I reverted the order of your emails) I never got that to really</span></div><div class=""><span class="" style="float: none; display: inline !important;">work.</span></div><div class=""><span class="" style="float: none; display: inline !important;"><br class=""></span></div><div class=""><span class="" style="float: none; display: inline !important;">If I read both of your responses correctly, then my easiest path is to</span></div><div class=""><span class="" style="float: none; display: inline !important;">create a Subsurface style directory in the Kirigami sources (src/styles)</span></div><div class=""><span class="" style="float: none; display: inline !important;">and then somehow get my app to use that style at startup. And use</span></div><div class=""><span class="" style="float: none; display: inline !important;">our attached property to populate all the Kirigami colors.</span></div><div class=""><span class="" style="float: none; display: inline !important;"><br class=""></span></div><div class=""><span class="" style="float: none; display: inline !important;">I'll play with that idea - but am of course happy for other suggestions</span></div><div class=""><span class="" style="float: none; display: inline !important;">and ideas.</span></div><div class=""><br class=""></div><div class="">Thanks for the responses so far! This definitely gives me more to</div><div class="">explore.</div><div class=""><br class=""></div><div class="">/D</div><div class=""><br class=""></div><div class="">PS: I am surprised that the main example used for Kirigami in action</div><div class="">on <a href="https://develop.kde.org/frameworks/kirigami//" class="">https://develop.kde.org/frameworks/kirigami//</a> is still Subsurface-mobile :-)</div><div class="">I hope that with our next version we can give some far more interesting</div><div class="">screen shots to update that site... what you have there is fairly old and</div><div class="">IMHO doesn't show how well a Kirigami app can look... but yeah, seeing</div><div class="">my own dives shown on that site was interesting :-)</div></div></body></html>