forked from AttorneyOnline/AO2-Client
- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaolabel.cpp
More file actions
Latest commit
21 lines (17 loc) · 533 Bytes
/
Copy pathaolabel.cpp
File metadata and controls
21 lines (17 loc) · 533 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include"aolabel.hpp"
#include"file_functions.h"
AOLabel::AOLabel(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent)
{
ao_app = p_ao_app;
}
voidAOLabel::set_image(QString p_image)
{
QString image_path = ao_app->get_theme_path() + p_image;
QString default_image_path = ao_app->get_default_theme_path() + p_image;
if (file_exists(image_path))
{
this->setStyleSheet("border-image:url(\"" + image_path + "\")");
}
else
this->setStyleSheet("border-image:url(\"" + default_image_path + "\")");
}