Mercurial > projects > dynamin
comparison dynamin/gui/layout.d @ 40:735223842a85
Make horizontal layouts align along their baseline.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Wed, 29 Jul 2009 23:28:53 -0500 |
parents | 04d2867d335c |
children | c25e8b83c5b8 |
comparison
equal
deleted
inserted
replaced
39:04d2867d335c | 40:735223842a85 |
---|---|
167 private int _baseline() { | 167 private int _baseline() { |
168 switch(type) { | 168 switch(type) { |
169 case LayoutType.Control: | 169 case LayoutType.Control: |
170 return control.baseline; | 170 return control.baseline; |
171 case LayoutType.Table: | 171 case LayoutType.Table: |
172 if(numRows != 1) | |
173 return 0; | |
174 scope colsInfo = new ColRowInfo[numColumns]; | |
175 scope rowsInfo = new ColRowInfo[numRows]; | |
176 TableInfo info; | |
177 getTableSizes(colsInfo, rowsInfo, info); | |
178 return cast(int)rowsInfo[0].baseline; | |
172 case LayoutType.Filler: | 179 case LayoutType.Filler: |
173 case LayoutType.Spacer: | 180 case LayoutType.Spacer: |
174 return 0; | 181 return 0; |
175 } | 182 } |
176 } | 183 } |