Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
635 B
Raw Blame
// SPDX-FileCopyrightText: 2023 L. E. Segovia <[email protected]>
// SPDX-License-Ref: LGPL-2.0-or-later

#include "kis_stacked_widget.h"

KisStackedWidget::KisStackedWidget(QWidget *parent)
    : QStackedWidget(parent)
{
}

QSize KisStackedWidget::sizeHint() const
{
    const QWidget *wdg = currentWidget();
    if (wdg != nullptr) {
        return wdg->minimumSizeHint();
    }
    return QStackedWidget::minimumSize();
}

QSize KisStackedWidget::minimumSizeHint() const
{
    const QWidget *wdg = currentWidget();
    if (wdg != nullptr) {
        return wdg->minimumSizeHint();
    }
    return QStackedWidget::minimumSizeHint();
}