Summary: | Cantor does not use a monospace font in the Help column | ||
---|---|---|---|
Product: | [Applications] cantor | Reporter: | Yichao Zhou <broken.zhou> |
Component: | general | Assignee: | Alexander Rieder <alexanderrieder> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/cantor/a2f20c1659a46b4ea7493b04500068947a62fd48 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
make help panel monospace
updated patch r2 updated patch r3 |
Description
Yichao Zhou
2013-12-22 04:20:07 UTC
Any comments on this? Hi, sorry for the long silence. You are right, this should be changed. If you want to do it, it shouldn't be too hard, just look at src/panelplugins/helppanel/helppanel.cpp. Otherwise I will fix it myself, probably this weekend. Created attachment 84870 [details]
make help panel monospace
Yes. It is just a one line patch but it costs me some time to figure it out.
After using monospace, another problem I find is that the leading space of help is gone (at least for sage backend). Created attachment 84875 [details]
updated patch r2
I have updated my patch: the original patch will make other stuff such as right-click menu in the help panel to use monospace too. I think it is fixed now.
I also fixed the monospace problem: I just escape the whitespace in some popular backends: sage, octave and R.
Unfortunately, I found that the help system in maxima is buggy: when I type "example(integrate);", the result is not shown in the help panel. So I cannot fix that.
Created attachment 84876 [details]
updated patch r3
I also found such code in last git: if(s&&s->sageVersion()>SageSession::VersionInfo(5, 7)) extractCompletionsLegacy(); else extractCompletionsNew(); Are you sure we are using extractCompletionsLegacy when I'm using sage 6.0? At least that doesn't enable completion on my linux. I think you should reverse the inequality. Hi, sorry it took me a while to look at your patch. It seems to work but is there a reason you didn't just use "m_edit->setFontFamily("monospace");" instead of manaully setting the font each time? The escaping of the whitespaces is a good idea. example not working is strange. from a quick glance at the code i have no idea what could be wrong. it might take me a little bit to figure it out. The version statement is obviously wrong. good catch, thanks! i'll fix it immediately. (in fact i just got a bug report about this today (Bug 330632) If you try m_edit->setFontFamily("monospace");, you will find it simply will not work. This is because m_edit has a HTML backend engine. "m_edit->setFontFamily" will only change the font selected. So we need to select all the text first, then change the font. Finally we deselect all the text (and move the cursor to the begining). hi, you're right, it woudln't work, sorry. I somehow didn't expect that behaviour. Your patch looks fine and can go into master, but personally I'd remove the #include<KDebug> and "kdebug()<<help;" call, as I think it creates a lot of noise and is not very useful on a day to day basis. what do you think? Do you have commit rights or should I commit this for you? YES. That's right. Please remove that. I do not have the commit rights and please commit for me. Git commit a2f20c1659a46b4ea7493b04500068947a62fd48 by Alexander Rieder. Committed on 04/02/2014 at 20:12. Pushed by arieder into branch 'master'. - change the font of the help panel to monospace - escape spaces in the help messages, as they might be important for formatting Patch by Yichao Zhou, thanks! M +2 -0 src/backends/R/rexpression.cpp M +3 -0 src/backends/octave/octaveexpression.cpp M +3 -0 src/backends/sage/sageexpression.cpp M +13 -2 src/panelplugins/helppanel/helppanelplugin.cpp M +1 -0 src/panelplugins/helppanel/helppanelplugin.h http://commits.kde.org/cantor/a2f20c1659a46b4ea7493b04500068947a62fd48 |