Project

General

Profile

Actions

Bug #7274

open

Dialog inconsistency

Added by Sebastian Fett over 4 years ago. Updated over 3 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/09/2019
Due date:
% Done:

0%

Estimated time:

Description

When you create a new Dialog WT internally creates 2 divs, 1 popup and inside that popup a dialog. Now if you set the size of the dialog the size of the popup isnt linked to that one. This results in dialog windows like the one i attached. The blacked out part is a text which i censored. The ok button is in the footer of the dialog but the popup is larger.

   div->doubleClicked().connect([=] {
        auto dialog = c->addChild(std::make_unique<Wt::WDialog>("Erweiterte Informationen"));
        dialog->rejectWhenEscapePressed();
        dialog->setResizable(true);
        dialog->setMinimumSize("80%","70%");
        Wt::WLabel *label = dialog->contents()->addNew<Wt::WLabel>("<p> Help text </p>");
        Wt::WImage *bild = dialog->contents()->addNew<Wt::WImage>(Wt::WLink("icons/aufloesung.gif"));
        Wt::WPushButton *ok = dialog->footer()->addNew<Wt::WPushButton>("OK");
        ok->clicked().connect([=] {
            c->removeChild(dialog);
        });
        dialog->finished().connect([=] {
           c->removeChild(dialog);
        });
    dialog->show();
    });

Files

Screenshot_2019-10-09 FPMWeb.png (91.5 KB) Screenshot_2019-10-09 FPMWeb.png Sebastian Fett, 10/09/2019 12:44 PM
wtissues (16.5 KB) wtissues Sebastian Fett, 10/15/2019 01:39 PM
Actions #1

Updated by Roel Standaert over 4 years ago

Rather: the size is not set to the minimum size. resize() does work properly, setMinimumSize() doesn't really.

Actions #2

Updated by Sebastian Fett over 4 years ago

resize gave an even worse result thats why I used setMinimumSize.

resize had Border issues horizontally as well not only vertically.

See attached file

Actions #3

Updated by Roel Standaert over 4 years ago

Looks like it's also documented that setMinimumSize@/@setMaximumSize doesn't really work with percentages: https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WDialog.html#a82524fa5d6f77b2cd5b53eb9ebfdad1b

Actions #4

Updated by Sebastian Fett over 4 years ago

Resize() doesnt say that it doesnt work with . I've tested em, same issues, tested with vw and vh, those dont appear on the page's css. If I cannot use I cannot change the size of the dialog window relative to the size of the parent, correct? Which means for dynamic screens with different resolutions the dialog would always have the same size.

Actions #5

Updated by Roel Standaert over 4 years ago

  • Status changed from New to Feedback

I can't really seem to reproduce your issue. Can you provide a standalone code sample? Which version of Wt are you using exactly?

Actions #6

Updated by Sebastian Fett over 4 years ago

I am using 4.1.0, the 4.1.1 has no unix updates according to your release pages, so should be the current Version.

The code above is inside a containerwidget.

Since I am using a template to bind the div to a container I cannot give you the exact code since it would be a lot.

I am adding a Wt::WTextEdit to a containerwidget and on doubleclicking the textedit the code above triggers.

c is the pointer of the template. If I use the containerwidget pointer instead of the template pointer the result is the same. When I got a few spare minutes I'll try to get a minimum working example for you.

Actions #7

Updated by Roel Standaert over 4 years ago

I am using 4.1.0, the 4.1.1 has no unix updates according to your release pages, so should be the current Version.

What do you mean? Do you mean that there are Windows builds but no Linux builds? We just never release Linux builds ourselves (many Linux distributions do). Wt 4.1.1 is the latest version of Wt, and should be used instead of Wt 4.1.0.

Actions

Also available in: Atom PDF