Warning, /education/kanagram/src/ui/LetterButton.qml is written in an unsupported language. File is not indexed.
0001 /*************************************************************************** 0002 * This file is part of the Kanagram project * 0003 * Copyright 2015 Jeremy Whiting <jpwhiting@kde.org> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 0021 import QtQuick 0022 import QtQuick.Controls 0023 0024 Button { 0025 id: buttonText 0026 width: height 0027 font.pixelSize: Math.max(screen.height / 20, screen.width / 30, 15) 0028 contentItem: Text { 0029 text: buttonText.text 0030 font: buttonText.font 0031 color: "black" 0032 horizontalAlignment: Text.AlignHCenter 0033 verticalAlignment: Text.AlignVCenter 0034 } 0035 0036 background: Rectangle { 0037 color: "white" 0038 border.width: 1 0039 radius: 2 0040 } 0041 }