Project

General

Profile

Bug #3516

WPushbutton with Icon and Text does not always show Text

Added by Anonymous about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
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);
}
#1

Updated by Koen Deforche about 8 years ago

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

Updated by Roel Standaert about 8 years ago

  • Status changed from InProgress to Resolved
#3

Updated by Koen Deforche almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF