Thursday, February 21, 2008

Generating syntax highlighting colors based on system colors

For quite some time it came to my mind that the colors used for syntax highlighting should be automatically generated by the application, removing the need of forcing the user to manually edit each and every color everytime a new color scheme is chosen for the whole system. In the SpeedCrunch case, there's at least the need of choosing 3 colors for the expression editor syntax highlighting: variables, functions and numerals.

The problem is when the text box background or the text color is not the expected (generally white and black, respectively). So I started playing with some code in order to try to reach an easy and acceptable enough algorithm that could make SpeedCrunch adapt to any text and background color combinations (or at least the most common and wise ones). Certainly, predefined color sets (that also include and overwrite the system background and text colors) shall always be provided, in order to ensure that nobody needs to switch off syntax highlighting.

Let's look at the examples. The surrounding color represents the system base color, used for text input boxes, for instance. The first colored square represents the system text color. The remaining squares are the generated colors for highlighting. If you see no surrounding color, that's because it's white.

KDE / Windows * / MacOs X / BeOS


Solaris


CDE


Digital CDE


Black on light grey


Blue on almost black


Blue on black


Blue on dark blue


Green on black


White on black


White on dark blue


White on light grey


Yellow on blue


All the three squares to the right of each image where generated from the first one from the left and the background color. It seems to me that even in "dummy" color sets like in the last example, the algorithm performs really well. I guess I'll introduce this in SpeedCrunch for 0.10.

Edit: this feature is now in SpeedCrunch's trunk. 0.10 will come with it.

Tuesday, February 19, 2008

0.10 Preview

Next release won't take long to hit the streets and is reaching a stable point. Here's a preview screenshot tour:


Radio groups for angle unit and number base selection are gone now, in order to release some screen space. The very same options are available in a quickly reachable menu inside Settings and are also available through even faster keyboard shortcuts. Note that the previously available Clear and Evaluate buttons are also gone. Their actions are now available in the optional virtual keypad and through faster keyboard shortcuts as well.

For those who really like to preserve space, it's even possible to hide the menu bar. To show it again, a keyboard shortcut is available to perform the action (a tool tip is shown to warn the user about this).
Let's now look at a full demonstration of all the optionally available visual elements.

You can see all the dock windows that were already available (nested and tabbed on the left and right side), a reworked virtual keypad and a new toy to play with: a mathematics book (floating on the right). One can browse it like a website and insert the formulas directly into the expression editor. If the required variables are already defined, the result will be calculated and presented.

And of course you can hide the virtual keypad again in order to get more space available for the docks. In the example, we can see a page for the quadratic equation. Currently there are additional pages for various 2D and 3D objects. If you want to contribute with more pages to enrich our book, just contact us. Physics and other areas are also welcome, not only plain mathematics. The pages are trivial to design (you can easily do it with the lamest text editor). We'll help you out with your first one. I must say they are also translatable (I always try to make sure everything is translatable :) So the book will be available in other languages, just like the rest of the application.

In 0.10 it will also be possible to run SpeedCrunch in full screen mode (additionally to the stay-always-on-top mode). The mathematical core was also very much reworked and is better than ever. There are plans to introduce rational and complex numbers to the application. Not sure if for 0.11 or later, since 0.11's main focus will be a complete port for KDE4. Also still possible to be ready for 0.10 is the "portable" (as in take it with you) build. So then you just need to copy a directory to your flash drive and run your favorite calculator anywhere :)

Monday, January 14, 2008

SpeedCrunch with Oxygen style

Work is continuing to bring SpeedCrunch closer to become a real KDE 4 application. In the mean time, with the recent launch of KDE 4.0 that sports a new widget style, Oxygen, it's also worth to mention that SpeedCrunch already integrates nicely (with respect to appearance) and does not feel out of place, as evidenced from the following click-to-enlarge screenshot:




Saturday, December 22, 2007

SpeedCrunch runs on Maemo-based tablets

Jean-Luc Biord announced the availability of Qt4 for Maemo tablets. Maemo provides an open source development platform for Nokia Internet Tablets and other Linux-based devices. Since Qt4 now runs on it, applications based on our beloved popular framework can now be compiled to work on nice handheld devices:
A first application is already ported, it's SpeedCrunch a fast, high precision and powerful desktop calculator...

Friday, December 14, 2007

Math Book

Since I do not do math every day I usually have check equations from some math book/net. SpeedCrunch has several dock widgets and I thought that some kind of math book widget would be nice. After mockup got positive feedback I wrote something to start with. Since writing simple browser with QTextBrowser is an easy job, that did not take long. When talking to Helder Correia he noted that this could be a more general book widget that could also show help etc. I think the result look promising especially considering how little time it took to make it :-)


(This post can also be found from my blog)

Wednesday, December 12, 2007

Feature plan for 0.10

Finally I took some time to write down all the features I'm aiming for the next release. My personal favorite news are the KDE4 look and feel (parallel with a plain and old good Qt4), a new book dock widget to navigate through a user manual and e.g. math figures with (click-to-insert) formulas. Read all the planned (and already implemented) changes. If time and luck allows, the list can even increase, but I prefer to be pessimistic :)

Sunday, December 09, 2007

SpeedCrunch keeps being mentioned

Ariya pointed me again to two pages where SpeedCrunch is a player.

According to the article Top 10 Kubuntu Applications Part 1, SpeedCrunch also fills the gap where CALC.EXE fails to put processing power to work. SpeedCrunch’s view is more informative and input options are more diverse. It provides a running history of the calculations and provides user defined variables.
Edit: A new and dedicated review has been added by the same author.

On yet another article in Spanish, SpeedCrunch: Scientific calculator for PC, you even get a very cute screenshot. Sorry non-latin language folks, but I'm not going to post the translation of the article as I did last time (I translated the title, so no complaining :).