I always recommend against starting out how to learn the basics of Reaper theming by editing existing themes, because it requires you to understand how WALTER works (which is fairly simple) but also to completely understand how the theme maker used it to make his theme, which could be staggeringly complicated.
Imperial is, however, an exception because its mostly a dumb static theme ...the very thing that is bothering you (a lack of dynamic rearrangement) is also what makes it easy to mess with.
Here's some entirely static code for moving the buttons as you asked:
Code:
Layout 'a2b ------ dbirczynski'
set tcp.size +:maxfolderdepth:1 [0 0 18] [544 72 157]
set less_than_max +:-1:1 tcp.size{0} eff_w{0}
set tcp.label + cm eff_w{0}>460 [0 1 270 21 0 0 1 0] + * maxfolderdepth [0 0 18] +:0.3:1 [0 0 less_than_max{0}] [0 1 210 21 0 0 0 0]
set label_rhs + tcp.label{2} * +:-1:1 [tcp.size{0}] w tcp.label{6}
set remaining_gap +:-1:1 label_rhs w
set pan_space + remaining_gap trackpanmode<5 [25] [0]
set tcp.recarm + cm + [label_rhs] [0 0 22 23 0 0 0 0]
set tcp.pan + cm remaining_gap{0}<91 [0] + [label_rhs] [26 0 22 22 0 0 0 0]
set tcp.width trackpanmode<5 [0] + cm remaining_gap{0}<113 [0] + [label_rhs] [50 0 22 22 0 0 0 0]
set tcp.volume.label tcp.volume{w}==0 [0] + cm + * maxfolderdepth [18] [7 27 45 9 0 0 0 0]
set tcp.pan.label tcp.pan{x}==0 [0] + cm + [tcp.pan] [-10 27 31 9 0 0 0 0]
set tcp.width.label trackpanmode<5 [0] tcp.width{x}==0 [0] + cm + [tcp.width] [0 27 31 9 0 0 0 0]
set tcp.recinput + maxfolderdepth==0 [6 0 -6] [0] h<47 [0] + [20 0 label_rhs{0}] * + [0 0 tcp.trackidx{0}] [1 1 20 1 1 1 1 1] [tcp.trackidx 46 -1 18 0 0 0 0]
set tcp.fxin tcp.recinput{w}<=0 [0] + [tcp.recinput tcp.recinput] [-20 2 14 14 0 0 0 0]
set tcp.recmode tcp.recinput{w}<=0 [0] [tcp.recarm tcp.recinput 22 21 0 0 0 0]
set tcp.recmon h<100 . [tcp.fxin 70 14 14]
set tcp.phase + tcp.recmon [22]
set tcp.env + tcp.phase [22]
set tcp.io + tcp.env [22]
set tcp.fx + tcp.io [22]
set tcp.fxbyp tcp.fx{0}==0 [0] + tcp.fx [16]
set tcp.mute + tcp.tcp.fxbyp [22]
EndLayout ;
Paste that in underneath the 'Layout 'a2 ------ Default (medium track name)' layout code block in the rtconfig and have a look. Its not perfect, but hopefully you'll see that its pretty simple and a good place to start messing about.
The key bit to notice :
Code:
set tcp.recmon h<100 . [tcp.fxin 70 14 14]
; that says "if height is less than 100px, do . " ( . means do whatever the last layout did.)