Freitag, 25. Juni 2010

Colors of the Solar System

I've been, well, less uncreative than normal and came up with this nice Wallpaper (at least I think it's nice ;-)). The illustration represents the 8 planets of our solar system as well as the sun (in the centre - obviously).


16:9 Resolutions





16:10 Resolutions





Have Fun!

Oh, and in case you're missing Pluto: As you may know, Pluto is no longer considered a Planet. As of 2006, Pluto is a dwarf planet called 134340 Pluto, occupying an orbit (partially) in the Kuiper-belt. Read up on the whole topic here and here.

Donnerstag, 24. Juni 2010

List bullets for your HTML

I got bored with the usual List Bullets on a recent Project of mine - so I created a few new ones. Here they are


Black bullets in action: Watch here.
White bullets in action: Watch here.
Transparent bullets in action: Watch here.

Download the full pack here.

Mittwoch, 23. Juni 2010

Ugly java UI of the month: June


Remember Azureus? This nice BitTorrent client has been there long before my current favourite uTorrent (you should get uTorrent, it's small, easy to use and quite well coded). Like all good things Azureus came to an end when they renamed it to Vuze, bloated it with stuff no one (at least I hope no one) uses and made Shitware out of it. Now it has an integrated high def (wow) player and shitty rss stuff. For $24.99 it even comes with DVD bruning and built-in antivirus protection. WHAT A PIECE OF SHIT.

But that's not the worst of it, because features can be turned off (at least I hope one can turn of Built-In antivirus protection, since wow.. I already have anti-virus software installed). No, the worst thing is the fugly User Interface. The UI of Vuze literally looks like Apple puked all over it. Or maybe Azureus got drunk and met iTunes in a dark backyard.

Just look at it, doesn't this remind you of ugly iTunes? Well I wont get into iTunes now, because it's the worst Shitware out there. But why do UI designers like this lame iTunes style that much? I don't know... maybe because they don't get screwed by Apple like developers do. iTunes and Vuze kinda look like Pampers meets a drunk bum-version of the guy who designs CD covers for MUSE.

Bullshit.

Sonntag, 20. Juni 2010

MicroModal

INFO: Take a look at my microUI website template. It contains the newest version of MicroModal and lots of other nice goodies!

MicroModal can be used to display a modal window on click. Useful scenarios include: "Are you sure you want to ...?", "Please enter ...!", and so on.

This isn't one of those huge modal scripts with CSS files and fancy graphics - if you want it fancy, use (or wait for) CSS3. This solution is fat-free.

Screeshot


Demonstration
Check out the demonstration here.

Example
The JavaScript
$('.micromodal').microModal({
    autoPositioning: true, // set true if you wish to center the modal window (default: true)
    overlay: {
        show: true,        // set true if you wish to how an overlay (default: true)
        color: '#fff',     // set the colour of the overlay (default: '#fff')
        opacity: 0.8       // set the opacity of the overlay (default: 0.8)
    }
});

The Html
<button class="micromodal target-changecolor">Let's change the background colour!</button>
  
<div id="changecolor" class="dialog">
 Do you really want to do this?
 <br /><br />
 <button onclick="$.fn.microModal.dialogs['#changecolor'].close();">No way!</button>
 <button onclick="$('body').css('background-color', '#fedcba');$.fn.microModal.dialogs['#changecolor'].close();">Sure</button>
</div>

The Css - if you don't know what to do yourself - find another JQuery Plugin ;-)

Download
Source Code
Compressed Code (for use in productive environment)

Mittwoch, 16. Juni 2010

MicroTab 0.1 Released

Hey, there's been another Micro release. This time it's MicroTabs. If you want a small (1 Kb) and easy to use tab plugin with no (in my view) lame animations. Check it out.


How To
The HTML
<div class="micro"> 
    <a href="#">Title</a> 
    <div>Content</div> 
</div> 

The JavaScript
$('.microtabs').microTabs({
    selected: 1 // yeah this is the only option - which tab do you want to show on startup?
});

And some CSS
.microtabs { margin:20px 20px; max-width:800px;}

.microtabs-button { 
 padding: 10px; 
 background-color:#333; 
 color:#fff; 
 text-decoration:none; 
 font-family:Segoe UI, Helvetica, Arial; 
}
.microtabs-button:hover { color:#abcdef; }
.microtabs-selected { 
 background-color: #fff; 
 color: #333; 
 border-right:1px solid black; 
 border-top:1px solid black; 
 border-left:1px solid black; 
}

.microtabs-element { 
 background-color:#fff; 
 color:#555; 
 padding:10px; 
}

.microtabs-header { margin-bottom: -1px; }
.microtabs-container { border: 1px solid black; 

Demonstration
Get a look at the demo here.

Download
Source code
Compressed version (for production)

MicroTab 0.1 Released

I have moved! You'll find MicroTab on my new Blog: http://salatsosse.ch/jquery/

Dienstag, 15. Juni 2010

Drag and Drop files from WPF ListViews to the Desktop / Windows Explorer

Hey guys, this morning (yeah, beginning 7.00) I tried to implement what seemed to be quite an easy task: Dragging files out of my app onto the desktop or into an open explorer Window.

It’s not quite easy. So let’s start this small tutorial. First (of course) you create an ListView – let’s call it “FileView”.

<ListView x:Name="FileView" 
PreviewMouseLeftButtonDown="FileView_PreviewMouseLeftButtonDown"
MouseMove="FileView_MouseMove">
<ListView.View>
<GridView>
<!-- Put in here whatever you need -->
<GridViewColumn Header="Name" CellTemplate="{StaticResource file}" />
</GridView>
</ListView.View>
</ListView>


Now to the code behind the xaml. You might have noticed that I added two events to the ListView. The PreviewMouseLeftButtonDown (the dragging starts) and the MouseMove (the dragging is happening).



private Point start;

private void FileView_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.start = e.GetPosition(null);
}

private void FileView_MouseMove(object sender, MouseEventArgs e)
{
Point mpos = e.GetPosition(null);
Vector diff = this.start - mpos;

if (e.LeftButton == MouseButtonState.Pressed &&
Math.Abs(diff.X) > SystemParameters.MinimumHorizontalDragDistance &&
Math.Abs(diff.Y) > SystemParameters.MinimumVerticalDragDistance)
{
if (this.FileView.SelectedItems.Count == 0)
{
return;
}

// right about here you get the file urls of the selected items.
// should be quite easy, if not, ask.
//string[] files = ...;
string dataFormat = DataFormats.FileDrop;
DataObject dataObject = new DataObject(dataFormat, files);
DragDrop.DoDragDrop(this.FileView, dataObject, DragDropEffects.Copy);
}
}


Now that’s that, thanks for reading.

Socialize!