Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 26-08-2020, 07:36   #1
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 242
Images: 3
Chartsymbols.xml

In versions prior to version 5.2 of OpenCPN, the Chartsymbols.xml file included the lines "DASHB", "DASHL", "DASHF", etc., which allow you to modify the appearance of the dashboard (background color, color of labels , etc.).

In version 5.2, these lines are no longer present.

If I want to customize the dashboard, is it better to replace the Chartsymbols.xml file from version 5.2 with a old one, or simply add the missing lines to the Chartsymbols.xml file from version 5.2?
Indeed, in addition to these missing lines, there are other changes in the new Chartsymbols.xml file compared to the old one.

What will be the consequences of simply replacing the new Chartsymbols.xml file with the old one?
Schnapsy is offline   Reply With Quote
Old 28-08-2020, 07:09   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: Chartsymbols.xml

Schnapsy, you've discovered something very interesting that I did not know.

I find this page in the manual is perhaps relevant
Vector Palette


What are some of your favorite Dashboard Instrument looks with DashB, DashL, DashF?
rgleason is offline   Reply With Quote
Old 28-08-2020, 08:17   #3
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 242
Images: 3
Re: Chartsymbols.xml

Quote:
Originally Posted by rgleason View Post
What are some of your favorite Dashboard Instrument looks with DashB, DashL, DashF?
Attached, an example of an extract from the dashboard that I use.
But I also modified some dashboard dlls to get exactly what I want, which is one of the essential qualities of OpenCPN.

But that does not answer my question ...
"What will be the consequences of simply replacing the new Chartsymbols.xml file with the old one?"
Attached Thumbnails
Click image for larger version

Name:	DASH2.jpg
Views:	74
Size:	102.1 KB
ID:	222147  
Schnapsy is offline   Reply With Quote
Old 28-08-2020, 08:50   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: Chartsymbols.xml

I hope Dave or someone can answer your question. Why not just try it to see what happens? I like your dials.
rgleason is offline   Reply With Quote
Old 28-08-2020, 09:32   #5
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 242
Images: 3
Re: Chartsymbols.xml

Quote:
Originally Posted by rgleason View Post
I hope Dave or someone can answer your question. Why not just try it to see what happens?

I have tried with the previous file and, also, with the new file modified.
All seems working at this time, but...?

Indeed, in addition to these missing lines, there are other changes in the new Chartsymbols.xml file compared to the old one.
Schnapsy is offline   Reply With Quote
Old 28-08-2020, 10:16   #6
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: Chartsymbols.xml

Hi Schnapsy, maybe you will find this interesting:

(Set in DashT ini/conf, not in Chartsymbols.xml, respects Day/Dusk/Night).
Petri
Canne is offline   Reply With Quote
Old 28-08-2020, 11:56   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: Chartsymbols.xml

Petri and Canne these are very very useful developments. Is it possible to implement them in a more mainstream way through the plugins preferences settings? Maybe other users could provide additional "style" files for selection in preferences.
rgleason is offline   Reply With Quote
Old 28-08-2020, 12:30   #8
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: Chartsymbols.xml

Hi Rick, sure, requires a bit project management which is not generally well accepted by the lambda hacker... One needs a) a project-wide style guide for widget elements to obtain unified look and feel, then force the hacker a bit b) in ocpn_plugin.h, instead of
Code:
extern "C"  DECL_EXP bool GetGlobalColor(wxString colorName, wxColour *pcolour);
something like
Code:
extern DECL_EXP std::unique_ptr<Widget_Colours> GetColours_Plugin( );
providing a pointer to a unified widget color maps. Would be easy to write, instead (for the above)
Code:
void DrawNeedleHub( wxGCDC* dc, int cx, int cy, int radius, bool dataAvailable )
{
    wxColour cl;

    if ( dataAvailable )
        GetGlobalColor( g_sDialCentralCircleColor, &cl );
    else
        GetGlobalColor( g_sDialColorIs2, &cl );
like
Code:
void DrawNeedleHub( wxGCDC* dc, int cx, int cy, int radius, bool dataAvailable )
{
    wxColour cl;

    if ( dataAvailable )
        cl = *wdg_col_ptr->DialHubEnabled;
    else
        cl = *wdg_col_ptr->DialHubDisabled;
.. or such ..

User would select from themes in OpenCPN preferences; Plug-In Manager would push the selected themes color's to plug-ins which would have unified color world.

Anyway, even my plug-in specific solution respects the OpenCPN color world since it accepts only names defined in chart1.cpp. Not very project-wide approach, but an attempt towards it.

(added: see https://manual.audacityteam.org/man/themes.html another popular wxWidgets app on my computers).
Canne is offline   Reply With Quote
Old 28-08-2020, 14:38   #9
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: Chartsymbols.xml

As is usual, Petri, you are stretching my mind here. You are suggesting it would be possible to have a "Themes" setting in Opencpn preferences that would set the "theme" to be used for all plugins? ..and it would not be build dependent?

That is pretty nice actually, I would love that, and I think many others would too. It might solve the nighttime problem with all plugins and would give more flexibility.
rgleason is offline   Reply With Quote
Old 28-08-2020, 14:57   #10
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: Chartsymbols.xml

Why not? Project management decides what they want us, plug-in developers to do by providing an API we shall use. A style guide would not hurt. Of course, the biggest job would be in OpenCPN, not on plug-ins. Theme files would have their own syntax, JSON or XML file so that talented users like Schnapsy above could make the community to profit from their artwork without having to compile anything...
Canne is offline   Reply With Quote
Old 29-08-2020, 08:27   #11
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 242
Images: 3
Re: Chartsymbols.xml

Quote:
Originally Posted by Canne View Post
Hi Schnapsy, maybe you will find this interesting:

(Set in DashT ini/conf, not in Chartsymbols.xml, respects Day/Dusk/Night).
Petri

Hello Petri,

Thank you for this indication which opens up many possibilities.

I will also quietly work on what you explained in post #8 because it is interesting and opens up many perspectives.
Schnapsy is offline   Reply With Quote
Old 29-08-2020, 08:57   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: Chartsymbols.xml

Feature Request: Added to Tracker and github Issues
https://opencpn.org/flyspray/index.p...s&task_id=2700
https://github.com/OpenCPN/OpenCPN/issues/2030
rgleason is offline   Reply With Quote
Reply

Tags
charts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
navobj.xml.changes still broken seandepagnier OpenCPN 2 06-08-2017 11:41
How to merge two navobj.xml? myocean OpenCPN 5 24-05-2015 09:00
Editing boat xml jimthom OpenCPN 7 24-05-2015 02:01
Are you an XML expert? Tropical Storm Layer bbalan OpenCPN 7 28-08-2014 04:33
Chartsymbols - The Next Generation JesperWe OpenCPN 2 14-05-2012 12:56

Advertise Here


All times are GMT -7. The time now is 23:17.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.