View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#458
Well, modRana V0.21-1 has been finally released!

Whats new ?
  • no background redrawing - modRana now stops redrawing once the screen is blanked or the window is minimized
    this should lower battery usage and might possibly help against the infamous freeze issue
  • initial support for themes
  • text on buttons is now centered
  • a simple heuristics that should fix the annoying "navigation wont start if routing while moving" bug
  • the navigation info box can be now hidden by pressing the "hide" button in its upper left corner
  • on screen buttons for switching to previous/next turns

How does the new theming system work ?
Themes go to /opt/modrana/themes, each theme has its own folder and the folder name is currently displayed as name of the theme. There are two pre-installed themes, default and night.

How does icon lookup work ?
ModRana first looks to the current theme folder, if it cant the find the icon it looks after, it looks to the default theme folder. If there is no suitable icon in both current theme folder and default theme folder, a generic rectangular icon is used.

How to set colors of the the cairo drawn interface elements ?
Each theme can have a theme.conf file in its folder, which configures per theme specific variables (currently only colors). This is how the themes.conf from the default theme looks like:
Code:
## this is a modRana theme configuration file
## (for the "default" theme)
## intended usage is for configuring per theme visual variables
##
## nesting is indicated by number of []
##
## everything that starts with at least one # is a comment


## ** Color config start ** ##

## dont forget to enclose the color information to parentheses
## color names as specified in the X11 rgb.txt can be also used
## the float value after the color string is the alpha/tranpsarency value of the color

[colors]
main_fill="#92aaf3",1.0
main_outline="#3c60fa",1.0
main_text="#00004d",1.0
widget_background="#0000ff",0.45
widget_text="#ffffff",0.95
navigation_box_background="blue",0.30
navigation_box_text="white",1.0
center_button_circle ="#0000ff",0.45

## ** Color config end ** ##
As with icons, colors that are not found in current theme.conf are loaded from the theme.conf in default theme folder.

Do I need to override all icons and colors present in the default theme ?
This is not needed as there are automatic default for all unspecified icons and colors sou you can just override a subset of the icons/colors. The night theme for example only has a theme.conf file overriding color setting but no custom settings at all.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 10 Users Say Thank You to MartinK For This Useful Post: