Vertical scrollbar scrollup-scrolldown images look jagged on Qtopia machine - qt

I am trying to use a vertical scrollbar in my Qt project.
The issue is when use the Cleanlooks widget style for the vertical scrollbar,it looks ok on the Linux Ubuntu machine,where Qt-4.3.3 is running.
But,when i run the same project on a Qtopia-4.3.3 Linux(ARM) machine,the scrolldown and scrollup images look totally jagged. They,look very bad. I tried using stylesheets,but without luck. Any suggestions regarding using stylesheets are most welcome.
Is there any way,to overcome this problem?

In my relatively small experience with styles on embedded platforms, some of the styles are designed so they use an image for certain things, and scale it as necessary. This produces very jagged graphics if the source is small and the target it large. One possibility is to inherit your own QStyle from the Cleanlooks style, and override the drawing of the arrow images with your own drawing code. It shouldn't be too hard to draw a proper arrow in code, rather than using an image.

Related

How to correct GTK theme difference across platforms?

I have a GTK3 application with buttons which contain a transparent image over a coloured background, when I compile it on a Linux Mint machine I get a perfectly normal "flat" image, but when I compile it on a Raspberry Pi (in Raspbian OS) I get buttons that have a weird white highlight effect on the image.
All I can guess is that the default GTK theme on Raspbian includes some sort of shadow effect that is being applied to the button images but I don't know which one & hence how to override it.
I've dug through the GTK theme/CSS docs but can't find anything obvious that would be applying this effect to an image. I've also poked about in the system(s) for GTK themes/gtk CSS files but there's loads of them, so I'm hoping someone can help me narrow this down to a particular tag/style I can apply to my buttons/widgets/window to make it look right all the time.
Image 1: normal "flat" image:
Image 2: weird fringe highlight / shadow effect on image:
Well after some mucking about with GTK_DEBUG=interactive ./my_app I found it was caused by this setting in the default Raspbian theme:
*{-gtk-icon-shadow:none;}
That one-liner in my application's overall window CSS has fixed it.

Interactive SVG in WordPress

I've designed and coded an interactive SVG that I've had to implement as HTML in WordPress because it only acts as a useless static image if it's entered as an SVG in an image block.
So far, that means that it's not responsive and loads at full size on a phone. I want people to see it in full, straight away, not zoom out to see it.
Is there another way to make it work without being an HTML dump? And even as code, how would I reduce it to fit screen sizes? Bearing in mind that my brain may implode if you suggest coding breakpoints or something like that.
I'm using a Blocksy child theme with no page builder.
The code itself works fine so there seems no point in me pasting a shortened version of the code. The page is here, if that helps.
Www.orderaround.co.uk
Right, I've fixed it myself. All I needed to do was remove the width and height specifications from the beginning of the svg code. It now fits to whatever container it's being displayed in.

Custom shaped menu with shadow in Qt

I'd like to create a context menu looking similar to this one:
I read suggestions on the web that QWidget::setMask() should be used to create a shape. But how can it fit the variable number of items then? Moreover, the same menu item may take more or less screen space on different machines.
Another question is how to create a shadow around this custom shape? As far as I understand, the mask allows to crop the widget, but not to make it semi-transparent.
I don’t found an easy way to do that! But here goes a way!
Instead of using the Qt mask API, I've used a frame-less widget with transparency enabled!
To draw the shadow, I've used radial gradient!
You can change the size of the menu before opening it, however you can’t resize it after opened (for example resize with mouse).
It’s quite easy add or remove widgets, just respect the layout margin to not draw outside the bounds destined to widgets. To simplify your life I created an inherited class of QPushButton with colors you can easily customize with style sheet.
See the result:
You can browse the source
Hope that helps!

Resize (restyle) QWizard under OS X

The default look of a Mac wizard (and by extension of QWizard) is this:
All this space on the left, where the bowtie image is, is completely useless and wasted.
Instead I like what the Dropbox guys have done:
How do I achieve this effect in Qt?
(Using PySide wrapper here, but I'll take any code that I can get!)
I tried settings all kinds of paddings and margins and whatnot on QFrame, QWidget, etc. using a stylesheet and still cannot get rid of this space on the left. Do I need to hack MacStyle? How would I go about doing this?
Change the Wizard Style to Classic:
setWizardStyle(QWizard::ClassicStyle);

Is it possible to emulate Mac Osx Finder search highlight in HTML + CSS?

Mac OSX Finder has a search feature that darkens everything but the part that matches.
(source: justaddwater.dk)
Is there a way to emulate it via CSS? I was thinking about adding a semi-transparent black div with opacity 50. But how then do I cut a hole in it?? and possibly make the edge fuzzy?
Any suggestions?
Check out the Expose jquery plugin from the jQuery TOOLS collection. I think it will accomplish exactly what you are looking for. They even have a demo of styling the mask with a background image.
Due to the irregular shapes, you're probably looking for an image. And due to the need for varying levels of transparency, you probably want a .png that would just be stuck over the selected item.
Good question, one way would be to have a "selected" png that had the glowing circle cover the selected one, and a different just dark png cover everything else.
EDIT: But you would probably want to use a library like jquery rather than coding everything from scrath your self, as to not reinvent the wheel and save TONS of time :D
maybe a PNG image will work, a square with hole

Resources