Skip to content
Snippets Groups Projects
ChangesPage.qml 1.02 KiB
Newer Older
  • Learn to ignore specific revisions
  • /** This file is part of Nootka (http://nootka.sf.net)               *
    
     * Copyright (C) 2017-2018 by Tomasz Bojczuk (seelook@gmail.com)     *
    
     * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses)   */
    
    SeeLook's avatar
    SeeLook committed
    import "../"
    import Nootka 1.0
    
    import QtQuick 2.12
    import QtQuick.Controls 2.12
    
    SeeLook's avatar
    SeeLook committed
        id: chList
    
    SeeLook's avatar
    SeeLook committed
        width: parent.width
        height: parent.height
        model: dialogObj.getChanges()
    
    SeeLook's avatar
    SeeLook committed
        delegate: Tile {
            width: chList.width
    
            height: relText.height + NOO.factor() * 2
    
    SeeLook's avatar
    SeeLook committed
            bgColor: index % 2 ? activPal.base : activPal.alternateBase
    
    SeeLook's avatar
    SeeLook committed
            Text {
                id: relText
    
                text: modelData
                x: NOO.factor() / 2
                width: chList.width - NOO.factor()
                horizontalAlignment: text.substring(0, 4) === "<h1>" ? Text.AlignHCenter : Text.AlignLeft
                color: activPal.text
                wrapMode: TextEdit.Wrap
                textFormat: Text.StyledText
            }
    
        }
    
        ScrollBar.vertical: ScrollBar {
            active: true
            visible: active
        }
    
    }