Skip to content
Snippets Groups Projects
Select Git revision
  • ce0c7124af92c47804895404773419306a94ff4d
  • master default protected
  • stable/20250902.0
  • nightly/20250902.0
  • beta/202508201613
  • stable/20250815.1
  • stable/20250815.0
  • nightly/20250815.0
  • nightly/20250806.0
  • nightly/20250805.0
  • beta/202508051403
  • beta/202508051107
  • nightly/20250722.0
  • beta/202507211539
  • stable/20250718.0
  • nightly/20250718.0
  • nightly/20250714.0
  • beta/202507141552
  • beta/202506161038
  • stable/20250613.0
  • nightly/20250613.0
  • beta/202506101658
22 results

MaterialToolTip.qml

Blame
  • Andreas Traczyk's avatar
    Andreas Traczyk authored
    Change-Id: I1623baee58bed8cd70900abc4085b49e54b50c4b
    ce0c7124
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    MaterialToolTip.qml 1.52 KiB
    /*
     * Copyright (C) 2021 by Savoir-faire Linux
     * Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation; either version 3 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */
    
    import QtQuick 2.0
    import QtQuick.Controls 2.15
    
    import net.jami.Constants 1.1
    
    ToolTip {
        id: root
    
        onVisibleChanged: {
            if (visible)
                animation.start()
        }
    
        contentItem: Text {
            id: label
            text: root.text
            font: root.font
            color: "white"
        }
    
        background: Rectangle {
            color: "#c4272727"
            radius: 5
        }
    
        ParallelAnimation {
            id: animation
            NumberAnimation {
                 target: background; properties: "opacity"
                 from: 0; to: 1.0
                 duration: JamiTheme.shortFadeDuration
            }
            NumberAnimation {
                 target: background; properties: "scale"
                 from: 0.5; to: 1.0
                 duration: JamiTheme.shortFadeDuration * 0.5
            }
        }
    }