So in an over-exuberant (and low-sleep) moment, I coded this one up. Say ya wanna have 5 elements on a page evenly spaced out, but you can’t depend on .. anything. Under normal circumstances a sane person would just use a table, with text-align:center & td.padding. Nope. Not me. I do things the hard way:
<script>
function justifier(par){
ulist=document.getElementById(par);
plain=0;
count=0;
/* determine widths for padding. Must set paddings to 0 for an accurate count */
for(i=0;i<ulist.childNodes.length;i++){
if(ulist.childNodes[i].nodeType==1 && ulist.childNodes[i].nodeName=="LI"){
pad(ulist.childNodes[i],0);
plain+=parseInt(ulist.childNodes[i].offsetWidth);
count++;
}
}
wide=ulist.offsetWidth;
x=parseInt((wide-plain-count)/(count*2)); //due to FF, count !=ulist.childNodes.length
//alert("w:"+wide+" cw:"+plain+" ="+(wide-plain)+"/"+count+" pad:"+x);
/* change paddings: */
for(i=0;i<ulist.childNodes.length;i++){
if(ulist.childNodes[i].nodeType==1 && ulist.childNodes[i].nodeName=="LI"){
mainMenuItem=ulist.childNodes[i];
pad(mainMenuItem,x);
}
}
}
function pad(ele,x){
ele.style.paddingLeft=x+"px";
ele.style.paddingRight=x+"px";
}
</script>
<style>
#list{
width:40%;
border:1px red solid;
}
ul{
padding:0px;
margin:0px;
float:left;
list-style-type:none;
}
li{
padding:0px;
margin:0px;
float:left;
list-style-type:none;
}
</style>
<body onload="justifier(’list’)" onresize="justifier(’list’)">
<ul id="list">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</body>
Back 10 yrs ago when the ‘net was getting a-rollin’ I had all the dreams of what it is now: http uploads (WebDAV), in-browser OS/applications (AJAX), Web-storage/backup.. you name it, I was dreamin’ it. And that’s a cool thing to know that I was “on to something,” so long as I don’t get bitter over it.
Well, now today Slashdot has an article about
what I was just talking to a Berlin friend about what his company does. There goes that idea.
So it’s not that I’m bitter, but honestly, how are ‘the little guys’ in small business capable of coping? There’s no chance at competing unless ya grab a VC & start hiring a storm of geniuses. (Oddly enough, isn’t this what Mr. Holland’s Opus is about??) The other option is to just hack on your own ideas quietly for your own pleasure, patiently knowing no one else will see them, and by the time you build it, it’ll be passe. It’s heavy unfulfillment in light of the external world, but in light of the internal self, it’s enabling: “I’m a stud.. if only they knew.”
GNOME has been locking up nearly daily for me lately. And I’m not a fan of an unusable nautilus, gterm or gedit. I tried KDE4, but alas, it just plain sucks. We’ll see what 4.5 turns out for them. I tried E17, which wasn’t bad, but it lacked some basics. So today I give XFce a whirl. Again. It has been at least 6months since I last tried it, and last time required too much setup to get started. This time however (with all the packages installed), I had to crash out of GNOME and dump in, and when I did, was I ever surprised! Thunar is workable! An application menu already filled! Compiz options that MAKE SENSE! it’s amazing, and now my default wm. It feels light an responsive, not clunky and crashy like poor old GNOME This isn’t about features anymore, it’s about perception. I love gnome’s features. Fact is, the important ones stopped working consistently about 2 months after I installed it. Gnome-vfs? No lovin’. Nautilus crashing? Not my kind of wm. Just for kicks I installed an old BeOS theme and kicked on the ‘Focus follows mouse’ option. So great. XFce: I’ll get back to work now.
Don’t these guys ever stop? Capitalistic strive to sell their soul for the likes of the masses. Sheesh. Before, it was “buy into our proprietary system” with the hidden joy of “be addicted to us, our updates, our tech support, etc.” Now it’s the ‘open’ system. Google’s Android. Facebook’s Applications. now AOL? The good news is that it’s at least ‘empowering’ the bad news is that it’s still addicting. Unless the base-code is open, it’s not open. API!=open. API=access, not daemons. AOL goes under, and so does the service. 50 years from now, it’s all toast when they’ve dropped the service, or upgraded it beyond repair. Ahh the price of modernism’s advance.
The quick list:
Loves:
- The overall look. It’s hot. Gnome is too home-y.
- The lack of an INSANELY long & overstuffed KDE Menu
- KDE Menu that listened to Fitt’s Law!
- Desktop Icons with mouse-over actions
- Widgets on the NorthEast Display Corner Mouseover
Not lovin’:
- No Keyboard Shortcuts: KDE4 had none that Gnome AUTOMAGICALLY got:
- Volume up/down/mute (F3-5)
- Display Brightness up/down (F1-2)
- CD Eject (F13)
- While I’m at it, where do I even mute the sound AT ALL?!?
- Reverting to the old KDE3 panel style for settings. Back to old-school ick!
- Desktop CLUTTERED with ridiculously large Icons. (And how do I change their size?)
I’m in need of help on fixing these should-be-minor issues, otherwise it’s back to Gnome for me. Any takers out there?
—–
Update: It seems Thom Holwerda agrees with me:
The panel. Ah, the panel. How you mock me by being totally unusable and inflexible. You cannot change its size (at least not in a logical place), entries in the taskbar are too large and look plain weird (esp. the text part), it has visual remnants (a one pixel fully opaque line from the background sits between the glassy rim and the taskbar itself), there is not one setting you can alter about it, and most of all: it has the world’s worst application menu ever (based on OpenSUSE’s Kickoff). I hate it so badly, it made me curl up in fetal position and cry in the corner of my living room (and I had guests, so you can imagine the confusion). I mean, I thought Vista’s start menu was unusable, but trust me, that one is usability bliss compared to this abomination.