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++
751 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2019 Dmitry Kazakov <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#include "KoAlphaDarkenParamsWrapper.h"

#include <ksharedconfig.h>
#include <kconfiggroup.h>
#include "kis_debug.h"


bool useCreamyAlphaDarken()
{
    static bool isConfigInitialized = false;
    static bool useCreamyAlphaDarken = true;

    if (!isConfigInitialized) {
        KConfigGroup cfg = KSharedConfig::openConfig()->group("");
        useCreamyAlphaDarken = cfg.readEntry("useCreamyAlphaDarken", true);
        isConfigInitialized = true;
    }

    if (!useCreamyAlphaDarken) {
        qInfo() << "INFO: requested old version of AlphaDarken composite op. Switching...";
    }

    return useCreamyAlphaDarken;
}