Project

General

Profile

Actions

Bug #3516

closed

WPushbutton with Icon and Text does not always show Text

Added by Anonymous over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
08/05/2014
Due date:
% Done:

0%

Estimated time:

Description

I use a WStackedWidget to switch between two WPushButtons when they are clicked. Both Buttons have an Icon and Text. The initial Button is displayed correctly but the second Button is displayed without Text.

This only happens if the Button has an Icon. I used the current Wt version from git.

Here is a simple example to reproduce the bug:

#include <Wt/WApplication>
#include <Wt/WStackedWidget>
#include <Wt/WPushButton>

Wt::WApplication* createApplication(const Wt::WEnvironment& env)
{
        Wt::WApplication* app = new Wt::WApplication(env);
        Wt::WStackedWidget* stack = new Wt::WStackedWidget(app->root());
        Wt::WPushButton* b1 = new Wt::WPushButton("B1");
        Wt::WPushButton* b2 = new Wt::WPushButton("B2");
        b1->setIcon("test.png"); // file test.png does not need to exists to observe the problem
        b2->setIcon("test.png");
        b1->clicked().connect(std::bind([stack](){stack->setCurrentIndex(1);}));
        b2->clicked().connect(std::bind([stack](){stack->setCurrentIndex(0);}));
        stack->addWidget(b1);
        stack->addWidget(b2);
        return app;
}

int main(int argc, char** argv)
{
        return Wt::WRun(argc, argv, &createApplication);
}
Actions #1

Updated by Koen Deforche over 9 years ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert
  • Target version set to 3.3.4
Actions #2

Updated by Roel Standaert over 9 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Koen Deforche over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF