Closed philogit closed 3 years ago
Hi, I understand your need, the difficulty here is that the text background and foreground is configurable so I have to implement a way to handle this automatically... I'll think about this On 9 Jun 2015 21:40, "philogit" notifications@github.com wrote:
Currently, plain-text and monospace-styled text are difficult to distinguish from one another within Cherrytree. Would you consider adding a style to monospace-styled text that either (1) uses a grey background or (2) places a border around the text--as is typically found when styling markup output?
Here is an example of what I'm suggesting: ctrl-c, ctrl-v, if...then
— Reply to this email directly or view it on GitHub https://github.com/giuspen/cherrytree/issues/47.
I see your point, and perhaps a first iteration should just avoid color issues by drawing a border around the text that is set to the same color as the current text color. Here is an example, taken from Wikipedia > Help:Wiki markup. (I set the border color to black vs #ddd that they use.)
As you pointed out, automating good color selection for the background or border would require more work. Here are some possibly useful topics that I found in case you explore that option.
Actually a border around the monospaced text is not trivial with the current library (gtk2), so a different color background would be probably more feasible. I will add this to the backlog and I'll think about what is the best solution. On 13 Jun 2015 21:20, "philogit" notifications@github.com wrote:
I see your point, and perhaps a first iteration should just avoid color issues by drawing a border around the text that is set to the same color as the current text color. Here is an example, taken from Wikipedia > Help:Wiki markup https://en.wikipedia.org/wiki/Help:Wiki_markup#Text_formatting. (I set the border color to black vs #ddd that they use.)
[image: screenshot from 2015-06-13 13 08 57] https://cloud.githubusercontent.com/assets/12819820/8145822/6d85f236-11cd-11e5-9d97-6fabc3343130.png
As you pointed out, automating good color selection for the background or border would require more work. Here are some possibly useful topics that I found in case you explore that option.
- Determine font color based on background color https://stackoverflow.com/questions/1855884/determine-font-color-based-on-background-color
- Color schemes generation - theory and algorithms https://programmers.stackexchange.com/questions/44929/color-schemes-generation-theory-and-algorithms
- How to automatically generate N “distinct” colors? https://stackoverflow.com/questions/470690/how-to-automatically-generate-n-distinct-colors
- How to Choose Colours Procedurally (Algorithms) http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/
— Reply to this email directly or view it on GitHub https://github.com/giuspen/cherrytree/issues/47#issuecomment-111747212.
As an incremental improvement, what if you were to add a preference that allowed the user to configure their preferred font for the monospace property? This would allow the user to selected a monospace font that satisfactorally contrasts with the font used for the plain-text property.
Suggested menu location: Preferences > Fonts > Monospace Font
+1 I also miss this. Screen shot of my current CherryTree fonts
@zgstyle : If you're looking for inline code styling, have a look at TiddlyWiki. It requires dealing with wiki-style plain text code editing vs WYSIWYG editing in CherryTree, but the trade off may be worth it to get the inline code feature.
If the application is taking the default GTK style for monospace font, then it can probably be changed in one of the gtkrc files (system-wide, per user, per application, ...)
It was actually resolved (monospace font, monospace background)
Currently, plain-text and monospace-styled text are difficult to distinguish from one another within Cherrytree. Would you consider adding a style to monospace-styled text so that either it either (1) has a grey background or (2) has a border around the text--as is typically found when styling monospace markup output?
Here is an example of what I'm suggesting:
ctrl-c
,ctrl-v
,if...then