Project

General

Profile

Editing MVC table - WLineEdit is misaligned

Added by Simon M over 9 years ago

I want to enable editing a WTableView, which works as expected, but the LineEdit to edit is somehow misaligned (I'm using FF38.4 ESR on CentOS7).

Here's a screenshot:

Screenshot

From what I have seen in WItemDelegate::createEditor the line edit should cover 100% of the cell.

I have not edited any related CSS styles.

I'm using the Bootstrap theme, which seems to work:

127.0.0.1 - - [2015-Dec-08 10:51:29.165562] "GET /resources/themes/bootstrap/2/bootstrap.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.165670] "GET /resources/themes/bootstrap/2/wt.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.166375] "GET /resources/moz-transitions.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.166940] "GET /style/layout.css HTTP/1.1" 200 495
127.0.0.1 - - [2015-Dec-08 10:51:29.167340] "GET /style/dragdrop.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.167516] "GET /style/pygments.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.168207] "GET /style/combostyle.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.168220] "GET /css/style.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.168821] "GET /style/everywidget.css HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.402672] "GET /pics/company.png HTTP/1.1" 304 0
127.0.0.1 - - [2015-Dec-08 10:51:29.436320] "GET /style/company_bg.jpg HTTP/1.1" 304 0
screenshot.png (3.59 KB) screenshot.png Screenshot

Replies (6)

RE: Editing MVC table - WLineEdit is misaligned - Added by Simon M over 9 years ago

Just tested, with Bootstrap 3 theme the line edit fills the cell 100%, but in this theme the fonts are very small and it looks generally very strechted, so i don't want to use it.

RE: Editing MVC table - WLineEdit is misaligned - Added by Bruce Toll over 9 years ago

The table line spacing can be increased with setRowHeight(). There's an example here: http://www.webtoolkit.eu/widgets/graphics-charts/category-chart.

RE: Editing MVC table - WLineEdit is misaligned - Added by Simon M over 9 years ago

Bruce Toll wrote:

The table line spacing can be increased with setRowHeight(). There's an example here: http://www.webtoolkit.eu/widgets/graphics-charts/category-chart.

I already tried that, but the misalignment stays. So I assume this is set relative to the cell dimensions, but I can't find where..

RE: Editing MVC table - WLineEdit is misaligned - Added by Bruce Toll over 9 years ago

My earlier reply was primarily meant to address the small fonts that you observed with Bootstrap 3. But, I agree that there appears to be an issue with Bootstrap 2. In addition to your screenshot, it can be observed in the Widgetgallery by clicking on a WTableView cell using the Bootstrap2 theme, at: http://www.webtoolkit.eu/widgets/graphics-charts/category-chart?theme=bootstrap2. You may want to file a bug report, if it is not already in the issue tracker.

RE: Editing MVC table - WLineEdit is misaligned - Added by Simon M over 9 years ago

Bruce Toll wrote:

My earlier reply was primarily meant to address the small fonts that you observed with Bootstrap 3. But, I agree that there appears to be an issue with Bootstrap 2. In addition to your screenshot, it can be observed in the Widgetgallery by clicking on a WTableView cell using the Bootstrap2 theme, at: http://www.webtoolkit.eu/widgets/graphics-charts/category-chart?theme=bootstrap2. You may want to file a bug report, if it is not already in the issue tracker.

For reference: http://redmine.webtoolkit.eu/issues/4612

RE: Editing MVC table - WLineEdit is misaligned - Added by Simon M over 9 years ago

I switched to Bootstrap 3 theme.

Thanks for your suggestions.

    (1-6/6)