| 13 | #include <QVBoxLayout> |
| 14 | |
| 15 | YACReaderSocialDialog::YACReaderSocialDialog(QWidget *parent) |
| 16 | : QWidget(parent) |
| 17 | { |
| 18 | |
| 19 | // setWindowFlags(Qt::Window | Qt::Dialog | Qt::FramelessWindowHint); |
| 20 | // setModal(true); |
| 21 | |
| 22 | QToolButton *close = new QToolButton(this); |
| 23 | close->setIcon(QIcon(":/images/social_dialog/close.png")); |
| 24 | |
| 25 | QToolButton *facebook = new QToolButton(this); |
| 26 | facebook->setIcon(QIcon(":/images/social_dialog/facebook.png")); |
| 27 | |
| 28 | QToolButton *twitter = new QToolButton(this); |
| 29 | twitter->setIcon(QIcon(":/images/social_dialog/twitter.png")); |
| 30 | |
| 31 | QToolButton *google = new QToolButton(this); |
| 32 | google->setIcon(QIcon(":/images/social_dialog/google+.png")); |
| 33 | |
| 34 | QString styleSheet = "QToolButton {border:none; }"; |
| 35 | close->setStyleSheet(styleSheet); |
| 36 | facebook->setStyleSheet(styleSheet); |
| 37 | twitter->setStyleSheet(styleSheet); |
| 38 | google->setStyleSheet(styleSheet); |
| 39 | |
| 40 | QLabel *icon = new QLabel(this); |
| 41 | icon->setPixmap(QPixmap(":/images/social_dialog/icon.png")); |
| 42 | |
| 43 | plainText = new QTextEdit(this); |
| 44 | plainText->setStyleSheet("QTextEdit {border:none; padding:11px; font-size:12px; font-weight:bold; color:#525757;}"); |
| 45 | QTextCursor cursor(plainText->textCursor()); |
| 46 | QTextBlockFormat blockFormat = cursor.blockFormat(); |
| 47 | blockFormat.setLineHeight(12, QTextBlockFormat::SingleHeight); |
| 48 | cursor.setBlockFormat(blockFormat); |
| 49 | QLabel *sendTo = new QLabel(tr("send to:"), this); |
| 50 | sendTo->setStyleSheet("QLabel{color:#ABABAB; font-size:12px; font-weight:bold;}"); |
| 51 | |
| 52 | setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); |
| 53 | |
| 54 | resize(sizeHint()); |
| 55 | |
| 56 | close->move(437, 5); |
| 57 | |
| 58 | QWidget *send = new QWidget(this); |
| 59 | QHBoxLayout *sendLayout = new QHBoxLayout; |
| 60 | |
| 61 | QPushButton *follow = new QPushButton(tr("Follow YACReader!"), this); |
| 62 | |
| 63 | follow->setStyleSheet("QPushButton{border:none; color:#FFFFFF;background:#404040; padding: 9px 25px 9px 25px; font-weight:bold; font-size:12px;}" |
| 64 | "QPushButton:hover{background:#E3B800;}"); |
| 65 | |
| 66 | sendLayout->setMargin(0); |
| 67 | sendLayout->setSpacing(0); |
| 68 | |
| 69 | sendLayout->addWidget(sendTo, 1, Qt::AlignHCenter); |
| 70 | sendLayout->addSpacing(11); |
| 71 | sendLayout->addWidget(facebook, 0, Qt::AlignHCenter); |
| 72 | sendLayout->addSpacing(6); |
nothing calls this directly
no test coverage detected