Yuhang Zhao
2023-12-06 8521bbf2f335984542f2071825d7383548862b7a
examples/mainwindow/mainwindow.cpp
@@ -32,8 +32,7 @@
void MainWindow::installWindowAgent() {
    auto agent = new QWK::WidgetWindowAgent(this);
    if (!agent->setup(this)) {
        qDebug() << "Frameless handle failed to initialize.";
        return;
        qFatal("Frameless handle failed to initialize.");
    }
    auto titleLabel = new QLabel();
@@ -54,11 +53,17 @@
        return menuBar;
    }();
    static const auto buttonStyleSheet = QLatin1String{ "QPushButton{color:black;};QPushButton:hover{background-color:black;color:white;}" };
    auto iconButton = new QPushButton("I");
    iconButton->setStyleSheet(buttonStyleSheet);
    auto minButton = new QPushButton("—");
    minButton->setStyleSheet(buttonStyleSheet);
    auto maxButton = new QPushButton("🗖");
    maxButton->setStyleSheet(buttonStyleSheet);
    maxButton->setCheckable(true);
    auto closeButton = new QPushButton("✖");
    closeButton->setStyleSheet(buttonStyleSheet);
    auto windowBar = new QWK::WindowBar();
    windowBar->setIconButton(iconButton);