Experimenting with setMask and widgets

New or modified Mixxx skins

Moderators: garth, User Customization Moderators

Experimenting with setMask and widgets

Postby Vittorio » Fri Dec 24, 2010 4:57 pm

Hi there,
I must admit it. I was so bored today that I started playing with Mixxx code.
One of the things I did was to play with setMask.
This last allows to draw a custom shape for a widget, so that I could drop that ugly vertical line which is used to display current position on the waveform.
What happens is that skin seems to be overlapped with waveform view.
Although I am not so good in designing, I think that the result is quite eyecandy:

MixxxSetMask.png
Mixxx with setMask on waveform widget
MixxxSetMask.png (168.79 KiB) Viewed 869 times

MixxxSetMaskZoom.png
Visual Waveform detail
MixxxSetMaskZoom.png (30.29 KiB) Viewed 869 times


Of course, such feature does allow every kind of shapes.
It is so ugly just because I am not so good in using gimp ;)
What do you think about?
Last edited by Vittorio on Fri Dec 24, 2010 9:36 pm, edited 1 time in total.
Vittorio
 
Posts: 27
Joined: Sat Sep 18, 2010 3:31 pm
Location: Cosenza, Italy

Re: Experimenting with setMask and widgets

Postby Irwin Cespedes » Fri Dec 24, 2010 5:56 pm

Hey, it looks great and innovative. It is better instead of using a simple line between the waveform. How did you do it?
I am also known as altiplΛne, this is my music

¡Pura Vida! Image
User avatar
Irwin Cespedes
 
Posts: 163
Joined: Mon Feb 01, 2010 8:59 pm
Location: Puntarenas, Costa Rica

Re: Experimenting with setMask and widgets

Postby Vittorio » Fri Dec 24, 2010 6:30 pm

Hey Irwin,
Thanks!
Well, to obtain this result I had to edit few lines of code.
The trick is to edit Deere skin background to have a custom shape for visual waveform.
Select all the interior of such shape and save it to a custom png.
Open Mixxx source code with an editor and add a WGLWaveformViewer::resizeEvent to wglwaveformviewer where such custom png is used to set a custom shape for the widget. Say:
Code: Select all
void WGLWaveformViewer::resizeEvent(QResizeEvent *event){
    QPixmap pixmap("CustomPng.png");
    if(pixmap.isNull())qDebug()<<"Pixmap not loaded";
    setMask(pixmap.mask());
}

Compile it and tweak a bit skin.xml to fit visual in such a way that "spikes" do correspond to vertical position line.
When done, one can delete position line by editing again Mixxx code.
Of course, mask file is hardcoded, since it just experimenting.
But I may write a patch if it results interesting.
Vittorio
 
Posts: 27
Joined: Sat Sep 18, 2010 3:31 pm
Location: Cosenza, Italy

Re: Experimenting with setMask and widgets

Postby AJ Slye » Fri Dec 24, 2010 6:38 pm

You should become a dev for this software, they can always use the help.
AJ Slye
 
Posts: 58
Joined: Mon Feb 23, 2009 8:19 pm


Return to Skins

Who is online

Users browsing this forum: No registered users and 2 guests