Exemplo n.º 1
0
void make_bpixmaps(void)   // create scaled window button pixmaps
{
	int wh = defaults::windowbuttonsize-4;
	QImage limg(qapp::get_cfile("button_left.xpm"));
	QImage rimg(qapp::get_cfile("button_right.xpm"));
	
	qapp::leftwinpix = new QPixmap();
	qapp::rightwinpix = new QPixmap();
	
	if(! limg.isNull())
		qapp::leftwinpix->convertFromImage(limg.smoothScale(wh, wh));
	
	if(! rimg.isNull())
		qapp::rightwinpix->convertFromImage(rimg.smoothScale(wh, wh));
}
Exemplo n.º 2
0
void make_bpixmaps(void)   // create scaled window button pixmaps
{
    int wh = defaults::windowbuttonsize-4;
    QImage limg(qapp::get_cfile("button_left.xpm"));
    QImage rimg(qapp::get_cfile("button_right.xpm"));

    qapp::leftwinpix = new QPixmap();
    qapp::rightwinpix = new QPixmap();

    if(! limg.isNull())
        *qapp::leftwinpix = QPixmap::fromImage(limg.scaled(wh, wh, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));

    if(! rimg.isNull())
        *qapp::rightwinpix = QPixmap::fromImage(rimg.scaled(wh, wh, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));

}