When you compile something written in PLT Scheme on Linux that have a GUI the final will be in a grey(default) theme of Linux, but I want to know
If it's possible to integrate PLT Scheme with GTK or Qt?
How to do this?
Example of grey(default) theme:
Grey Theme Frame http://i.imagehost.org/0219/gui.png
Thanks.
The Linux version of PLT is based on an old fork from wxWindows (from before it was renamed to wxWidgets). There is work going on to eventually replace all of the C and C++ code with Scheme code, and also move from a raw X backend to using gtk. Until this is done (which might take a while), the best thing to do is to stick with the usual mred-based code; this way it will continue to work fine when the switch is done -- and you still keep the advantage of portability (since it behaves the same on Windows and on OS X too).
Related
I'm writing a rather complex editor with a huge number of keyboard shortcuts (or "hotkeys"), using standard Qt's way like QShortcut/QKeySequence. I have no prob with all this until the recent time.
For the QTabWidget easy tab switching i used documentation-recommended Alt- shortcuts, adding &-symbol to the tab's title text.But under Windows 7/Linux + Gnome 3 this way works well, and under Linux + KDE/Unity - it doesn't.I'm assume the problem is somethere in the X11 desktop environment shortcut handling mechanics. Maybe it handle Alt+ sequences itself and don't pass to the clients, for example.
Can i debug such situations in the clear way? Debugging the KDE code, for example, is too time-consuming :( Understand ALL Linux DEs shortcut code... the mission is completely impossible.
Or maybe i'm just using invalid way to write a really crossplatform Qt application?Or, the third option - i'm just catched a bug :)
This problem occurs due to Qt bug: https://bugreports.qt-project.org/browse/QTBUG-32908
I want to create a desktop mockup on Elementary OS 0.2. By "mockup" I mean something that shows off the aesthetic of the mockup, mostly just showing what selecting/clicking/hovering over a button or widget does to that particular part of the UI. I'm thinking about creating the various parts on GIMP and coding animation and transition logic into the final result. I know that something like this can be done in HTML/JS, but I want to avoid using those. Is there anything optimized for a project like this? I'm open to most languages.
Try WireframeSketcher wireframing tool. Unlike Gimp or PowerPoint, WireframeSketcher is designed specifically to help you create mockups and wireframes. It comes pre-packaged for Debian systems and can also be found in Software Center and so it works on Elementary OS too. Note that it's a commercial tool, but you can try it freely for 14 days.
Most PMs at large companies mock these things up using a presentation package like PowerPoint. If you know the routine and where to click it can look fantastic with minimal effort.
MockupUI does both wireframe and Windows native looking mockups. It uses your desktop's visual style which makes screens and widgets look as a standard Windows application. MockupUI lets you export screens as individual images, docx, pdf or html.
Actions/interactions can be explained by highlighting widgets and adding text annotations.
I am using Qtdesigner3 to write a python gui that will read data files do some math and then plot the results using matplotlib. I've looked at examples of matplotlib qt, but none of them use the designer.
My question is how do I create a matplotlib widget in the QTdesigner?
There is a better response to almost this exact question over at the pythonxy mailling list
http://groups.google.com/group/pythonxy/browse_thread/thread/c52424bf11328181?pli=1
To quote the salient point from the thread. This is from one of the lead developers of the project.
You may directly use the Matplotlib Qt Designer plugin which is
shipped with Python(x,y).
It is located here: "C:\Python26\Lib\site-packages\PyQt4\plugins
\designer\python".
On your linux machine, create an environment variable called
PYQTDESIGNERPATH, and set it to the directory containing
'matplotlibplugin.py'. That's all!
Python(x,y) has a matplotlib widget that can be used in Qt Designer. If you don't want to install Python(x,y), you can follow the instructions at this tutorial to create your own.
Browsing the TkDocs website, it looks like Tk has come a long way in the "native look and feel" department. But looking at some of these screenshots, it seems to be let down in Linux. If you scroll down that page, you'll see a Mac screenshot that looks exactly like Mac, a Windows XP screenshot that looks exactly like Windows XP, and a Linux screenshot that looks like ... well Windows 98 (or Windows XP with classic style).
I know Linux doesn't really have a "native look and feel", since every toolkit does its own styling. But I'm wondering if there is any way to style Tk so it looks like either GTK or Qt (preferably Gtk), so it would blend in to most other apps on the Linux desktop.
What about Windows Vista/7? I haven't seen any Tk screenshots on those platforms.
Tk has basically two sets of widgets, the classic widgets and the themed widgets. The classic widgets are default because of the need to support old applications, but new code should use the themed widgets. (They can't be overloaded because they work in quite different ways, and there's a lot of code out there that depends on the old classic way. Alas.) With the right theme, the themed widgets (typically referred to as Ttk) look native and behave natively on Windows and OSX.
There are partial Ttk themes that delegate to Gtk and Qt available (this presentation from last year shows them in action) but they're partial, in large part because of the poor quality of the themes (Gtk/Qt themes, not Ttk themes; this is confusing!) in typical use with those toolkits. The major problem is apparently in the reporting of metrics, which often seems to be wrong (resulting in widgets getting the wrong size or visual elements being put in the wrong place); I understand from talking to the author of that paper that a significant fraction of themes only happen to work with Gtk/Qt, but cannot verify this from personal experience. (I'm on OSX so I use Ttk's direct native support.)
For the impatient users of a modern Linux distribution:
echo '*TkTheme: clam' >> ~/.Xresources
xrdb -merge ~/.Xresources
Then restart your Tk based app.
Here is what to expect (shown is git gui):
On the left is git gui started after the above command was issued. Notice how the bar changed, buttons did too.
PySolFC includes a nice, modern look and feel, which can also be used with other Tk apps.
Stephan Sokolow writes about this in his blog:
Making Tk applications a bit less ugly (how to change the Tk theme)
Installing a new Ttk/Tile theme (how to use PySolFC's theme)
Just from what I've heard in Python's main mailing list from time to time, Themed TK (TTK) widgets are themable and can either mimic native widgets or do their own thing and look good. See http://www.tkdocs.com/tutorial/styles.html.
From experience, Tk (at least through Python) looks like crap. I pulled up a test for you on windows 7: http://sadpanda.us/images/542945-LNUGO0F.jpg. Not really a looker by default!
In Ubuntu, for example, you can use Super-M to invert the screen colors (requires desktop effects, see [1]). Other OSes have similar abilities, although I'm not really concerned with anything other than Linux.
Which API should I look into if I want to write a simple program that, when run, inverts the screen colors?
The language that I use the API from doesn't particularly matter to me. I am familiar enough with C/C++/Bash/Perl/Python that I can hack this up in whatever language has the easiest access to this API. Working on Ubuntu is required, working on other similar *nixes is not terribly important.
[1] https://help.ubuntu.com/community/KeyboardShortcuts#Desktop%20Effects%20enabled%20shortcuts
You could use xcalib to do what you want.
For example, a simple bash script to invert the screen colors would look like this:
#!/bin/bash
xcalib -invert -alter
Here are scripts and instructions for shifting colors using compton: https://github.com/vn971/linux-color-inversion
xrandr-invert-colors worked out of the box for me.
xcalib does not work for me using xorg and a tiling window manager, with an external display and gives me the following error: "Unable to get a display calibration".
Credit to Imat.