answered
2018-08-07 15:05:21 +0200
Update 12/11 - files and folders are a little different with SF3, but most of this can still be used as a general guide. I've done most of these mods on my X Compact running 3.0.0.8.
So, after messing around here and there, I thought maybe a good idea to post some easily-attained examples of helpful discoveries, (probably academic/old news to many here, but maybe some other newbs will appreciate...). Feel free to add other examples.
- Since launcher patches don't work on
my community port, (v. 2.1.3.7), I
wanted to tweak my launcher
background, etc. Starting with
/usr/share/lipstick-jolla-home-qt5/launcher/Launcherview.qml, and using Tinyedit Root app from
Openrepos, I found a line that said
'color: (I think the entry was
'black', but can't remember for
sure)'. I changed it to
'#d9121518', which is hex code for a
semi-transparent dark blue-grey.
This is the launcher background, but
there's another layer which
manifests over that, when you open
the app drawer, so to deal with
that,
go to
/usr/share/lipstick-jolla-home-qt5/layers/LauncherLayer.qml,
and add the line 'opaque: false',
(credit to this thread for the tip -
https://together.jolla.com/question/124262/how-to-make-the-launcher-transparent/). Now, your launcher bg is customized,
but now the issue is that, for
whatever reason, when opacity is
removed from launcher layer, it
activates an overlay, which covers
the top row of apps in the launcher
with some kind of Android
back-button rectangle. The overlay
actually doesn't cause any function,
and if you press the space where
your app icon is, (hidden by the
overlay), the app will still launch,
you just have to know where the icon
is.
I discovered the code for this
at the bottom of
/usr/share/lipstick-jolla-home-qt5/launcher/launcher.qml.
There is code for a rectangle which
says a bunch of stuff about 'back'
function, etc. Delete the whole
code for that rectangle, and it
disappears from the launcher.
Update - I Figured out how to get scroll-without-pages:
- Go to /usr/share/lipstick-jolla-home-qt5/launcher/launcher.qml, and find 'snapMode: ListView.SnapOneItem' and 'highlightRangeMode: ListView.StrictlyEnforceHighlight', (there were 3 instances of each in mine).
- Change them to 'snapMode: ListView.NoSnap', and 'highlightRangeMode: ListView.NoHighlightRange'.
I Think that's all needed. I did also add a line, but I'm pretty sure it didn't do anything. Let me know if not working for you.
Also...
I tend to prefer things dark/dull/flat, so, even though I like the Sailfish UI overall, there are certain things that are just too bright and shiny for me. I found 2 files called GlassBackground.qml - one of them is in /usr/share/lipstick-jolla-home-qt5/compositor/, and one is in /usr/lib/qt5/qml/Sailfish/Silica. I found that if you change any value that says 'highlightBackgroundColor' to 'highlightDimmerColor', you will get dimmer, darker colors. Also changing the opacity levels, (like from 0.7 to 0.1, or something - experiment), helps. This seems to mainly affect the keyboard and the minimized cards, (covers), (so, if you have a blue highlight color set for your ambience, the minimized cards are usually bright blue, but this can make them more like a dark, shadowy color, accented by your wallpaper.
Also, the GlassBackground file uses 2 png files, noise.png, (found in /usr/lib/qt5/qml/Sailfish/Silica), and graphic-shader-effect.png, (found in /usr/share/Themes/Meegotouch/Sailfish-default/icons/). Both of these cause the glassy/blurry type of look in different areas. I replaced both of them with a flat, solid color image. This makes the keyboard solid-looking, and seems to make the general glassy-ui more like a blur-ui, (you can't see the little bumpy marks). Of course this is all varying depending on opacity levels in different files, etc, so...)
Also,
- Solid Background for apps, (no glass)
go to /usr/share/lipstick-jolla-home-qt5/compositor/ApplicationWallpaper.qml, and find the line that says '... 0,0,0,0.5)', and change it to '... 0,0,0,1.0), (note - since SF3, there are 2 of thos lines, one for dark and one for light ambience). 0.5 indicates opacity halfway to solid, so changing it to 1.0 makes it totally solid. I thought the 0,0,0 would be rgb color, but when I attempted to change it to something else, the whole screen whited-out. Maybe there's only certain allowed range values or something... Update - figured it out... You need the rgb values to have decimals. So my color, hex #121518, is rgb 18,21,24, so I need to enter .18,.21,.24,1.0.
Follow instructions above to get solid app background, then go to /usr/lib/qt5/qml/Sailfish/Silica/keypad.qml. Find 'property color textColor: Theme.primaryColor', and change it to 'property color textColor: Theme.highlightColor'. Tjen set a bright loud color in your ambience...
Go to /usr/lib/qt5/qml/Sailfish/Silica/CoverBackground.qml, and change 'transparent: true' to 'transparent: false', and the covers become transparent, (strange but true).
- Solid Lock Screen (no vignette)
files are in /usr/share/lipstick-jolla-home-qt5/lockscreen/. Mainly 'lockscreen' and 'vignette' files. Look for value called 'open radius', and change it to 0.0. Also interesting is a value called 'frag color' at the end of 'vignette' file. It says 'vec4', followed by parentheses with 3 rgb decimals inside. Change the values similarly to described above to change the color of the screen lock overlay. Changing vec4 to vec(any other number) results in a solid, hot-pink screen overlay. I'm not sure what that value means.
Open /usr/share/maliit/plugins/com/jolla/keySeparator.qml, and add 'opacity: 0.0'. Then go to 'functionKey.qml' in the same directory, and change opacity values. See lines 47 and 54 in my screenshot for example.
I was able to get this effect by messing around with /usr/lib/qt5/qml/Sailfish/Silica/opacityRampEffectBase.qml:
- Remove highlight color from events pulley
Go to /usr/share/lipstick-jolla-home-qt5/eventsview/EventsView.qml, and change any 'Theme.highlightBackgroundColor' to 'Theme.highlightDimmerColor', then change opacities how you like. For example, in my screenshot you see the '0.4' number- that was originally '0.8', etc...
- Show how many pages deep in page stack
I think this is an older feature that got phased out, but I find it helpful sometimes-
Go to /usr/lib/qt5/qml/Sailfish/Silica/private/pageStackIndicator.qml, and replace the whole code with this: https://github.com/dm8tbr/sailfishsilica-qt5/blob/master/usr/lib/qt5/qml/Sailfish/Silica/private/PageStackIndicator.qml
- Change Ambience color to anything you want
Like I said, I like dark and dim, but Ambience highlight color is always bright. Change primary and secondary highlight colors with second commands found in @ssahla 's updated answer here- https://together.jolla.com/question/11949/black-and-white-ambiences/ You can use ShellEx app to make a one-click method, so you don't have to type the commands every time, and Google's built-in hex color picker comes in handy for finding color codes. Just type 'hex color' into url bar in a Google search, and it shows up in search result screen.
- dark buttons with light text
Go to /usr/lib/qt5/qml/Sailfish/Silica/button.qml. The first entries are a bunch of bool / properties. 3 of them say color. Anything that says 'Theme.(whatever)... change it to 'Theme.highlightDimmerColor'. Then, near the end of the file, is a section called 'label', with an entry of 'color'. Change the color value to 'Theme.primaryColor'.
Go to /usr/share/lipstick-jolla-home-qt5/switcher/SwitcherItem.qml, and down about line 310 or so, you'll see a few code entries called 'image' and 'rectangle' that have values of iconSizeSmall and iconSizeMedium. Change those to iconSizeLarge.
- # of columns in events view shortcuts
Go to Go to /usr/share/lipstick-jolla-home-qt5/eventsview/Eventsview.qml, and look for 'columns'. There are 2 of them. One is for shortcuts and one is for actions. I changed mine to 5 and 3.
- Smooth blur-like effect throughout, instead of the bumpy 'glass', (affects most elements).
Replace 2 png files - /usr/share/themes/sailfish-default/meegotouch/icons/graphic-shader-texture.png, and /usr/lib/qt5/qml/Sailfish/Silica/private/noise.png - with the same semi-transparent png image, (easily found in Googke). Adjust appearance by editing 'GlassBackground' and 'OpacityRampEffectBase' files, as described above.
- Nice-looking rounded buttons
... button qml file; find 'radius', and change whatever it says to, 'radius: 45', then change opacity levels similar to above tweaks, or however you like ...
Note: Always have files backed up, and/or know how to get back to where you started if things get messed up.
Handy tips for emergencies:
- If the phone boots ok, but your app drawer is gone, go to events page, and click on a Storeman notification. Storeman opens, and go to Fingerterm, and select 'launch' from pulley menu, then use vim with root to edit files. Or, add lock screen shortcuts...
- To edit files of the phone doesn't boot, get into recovery mode, and use vi in shell.. On my Xperia, rootfs is automatically mounted, so cd to rootfs works fine to access file system. On Jolla phone, need to mount mmcblk0p28. Use instructions from @Till here - https://together.jolla.com/question/138839/how-to-run-command-from-recovery-mode/
I can add more specific code lines, etc., if anyone wants, but it's just a general example. I think code will probably vary from version-to-version, device-to-device, etc. The idea is that you can poke around, and figure different things out. If you're too unsure to test without specifics, you might want to stay away...
Welcome to SailfishOS! Most of the apps ship their qml files as in-exe resources. Which makes customization hard.
tortoisedoc ( 2018-04-22 07:33:04 +0200 )editYou can find the qml files in de directory
rgrnetalk ( 2018-04-22 10:27:28 +0200 )editusr/share/
. The names of harbour apps will start with harbour, the official apps will start with jolla or sailfish. Be aware that changes can disappear after each update... You can find a simple example in this how-to@rgrnetalk - So, in Settings qml file, for example, (/usr/share/jolla-settings/settings.qml), there is a reference to a 'path' at /com/jolla/settings/ui. Where is that?
Levone1 ( 2018-04-23 05:10:41 +0200 )edit@tortoisedoc Well, if the app is open source (and many/most native Sailfish OS apps are) you can rebuild the app yourself with any changes, even if it ships with QML in resources by default. :)
MartinK ( 2018-04-25 14:22:42 +0200 )edit@Levone1 this is about [dbus adapter and some internal handling of jolla.
rgrnetalk ( 2018-05-07 21:41:23 +0200 )edit