CUI - Spaltenbreite fix und variable (Panel Stack Splitter)

Begonnen von noxx, 19. Juli 2010, 17:19:51

Vorheriges Thema - Nächstes Thema

noxx

hallo,

versuche mich gerade an einer Config. Habe aber 2 Probleme wo
ich nicht weiter komme:

1- Habe Foobar in 3 Spalten mit dem Panel Stack Splitter aufgeteilt
Nun möchte ich das die erste und dritte Spalte 100 Pixel Breit ist,
die zweite quasi den Rest, also 100% - 2x100 Pixel. Wie kann man
die Spalten in abhängigkeit bringen?

2- In Spalte 1 seht ihr die 5 Buttons, habe die wie folgt positioniert:

var bw = 48;
var bh = 48;
var top_margin = 16;
var left_margin = 5;
var mitte = (window.Width-5*bw)/10


var panel_id = window.GetProperty("panel_id", window.id);
var custom_background_file = settings_path + panel_id + "buttons_background";
var custom_background = read(custom_background_file);

Buttons = {
but1: new Button((mitte*1) ,top_margin,bw,bh, {normal: images_path + "stop_green.png", hover: images_path + "stop_green_hover.png"}, function(){fb.Stop();}, "Stop"),
but2: new Button((mitte*3) +bw,top_margin,bw,bh, {normal: images_path + "pause_green.png", hover: images_path + "pause_green_hover.png"}, function(){fb.Pause();}, "Pause"),
but3: new Button((mitte*5) +bw*2,top_margin,bw,bh, {normal: images_path + "play_green.png", hover: images_path + "play_green_hover.png"}, function(){fb.Play();}, "Play"),
but4: new Button((mitte*7) +bw*3,top_margin,bw,bh, {normal: images_path + "prev_green.png", hover: images_path + "prev_green_hover.png"}, function(){fb.Prev();}, "Previous"),
but5: new Button((mitte*9) +bw*4,top_margin,bw,bh, {normal: images_path + "next_green.png", hover: images_path + "next_green_hover.png"}, function(){fb.Next();}, "Next")
   
}



Problem, wenn ich Foobar kleiner mache, bleiben die Buttons wo sie sind, teilweise werden sie
sogar verdeckt. Ich möchte das die Buttons mittif im Fenster sind und sich verkleinern wenn ich Foobar
minimiere.
Vielleicht hat da eine Idee....

Gruss

Edit:

Letzer Stand:
http://img215.imageshack.us/i/sshot1nu.png/

tedgo

Tja, welche Frage soll denn hier beantwortet werden?
(Ich weise damit auf die Forenregeln hin: "Eine Frage pro Thema")...

Deine zweite Frage hat mit dem Panel Stack Splitter nichts zu tun, sondern betrifft das WSH Panel mod.
Also eröffne bitte einen eigenen Thread.

Zu deiner ersten Frage:
Aus deinen Screenshots kann ich dazu nichts erkennen...

Ich gehe mal davon aus, dass du die "Spalten" in der Panel List erstellt hast.
Dann wäre "Spalte" 1:
left: 0
top: 0
width: 100
height: %ps_height%

Spalte 2:
left: 100
top: 0
width: $sub(%ps_width%,200)
height: %ps_height%

Spalte 3:
left: $sub(%ps_width%,100)
top: 0
width: 100
height: %ps_height%

noxx

werde ich ausprobieren. was macht den der befehl %ps_width% ?

gruss

tedgo

Das Feld %ps_width% gibt die aktuelle Breite des Panel Stack Splitters wieder.