Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2022 15:59:05 GMT
From:      "Jason W. Bacon" <jwb@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c35d6bc602dd - main - x11/coreterminal: Update to latest commit
Message-ID:  <202206071559.257Fx56D043016@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jwb:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c35d6bc602ddf7902d60c9588010b3e1ab542e7c

commit c35d6bc602ddf7902d60c9588010b3e1ab542e7c
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2022-06-07 15:56:34 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2022-06-07 15:56:34 +0000

    x11/coreterminal: Update to latest commit
    
    Adds snap to multiple of font size during window resize
    Changes:        https://gitlab.com/cubocore/coreapps/coreterminal
---
 x11/coreterminal/Makefile                     |  3 +-
 x11/coreterminal/distinfo                     |  6 +-
 x11/coreterminal/files/patch-coreterminal.cpp | 79 +++++----------------------
 x11/coreterminal/files/patch-coreterminal.hpp | 10 ----
 4 files changed, 20 insertions(+), 78 deletions(-)

diff --git a/x11/coreterminal/Makefile b/x11/coreterminal/Makefile
index 6de11ccaf53b..2a797f988529 100644
--- a/x11/coreterminal/Makefile
+++ b/x11/coreterminal/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	coreterminal
 DISTVERSION=	4.3.0
+PORTREVISION=	1
 CATEGORIES=	x11
 
 MAINTAINER=	jwb@FreeBSD.org
@@ -17,7 +18,7 @@ USE_QT=		buildtools_build core gui qmake_build serialport widgets
 USE_GITLAB=	yes
 
 GL_ACCOUNT=	CuboCore
-GL_COMMIT=	c61e5f8e0941dee2ab8920f2470fe93d21d717a2
+GL_COMMIT=	49d0fc24d5e8237d3d7fc26e5c92a316e54b6b54
 
 PLIST_FILES=	bin/coreterminal \
 		share/applications/org.cubocore.CoreTerminal.desktop \
diff --git a/x11/coreterminal/distinfo b/x11/coreterminal/distinfo
index f83af4566883..626ff576f53f 100644
--- a/x11/coreterminal/distinfo
+++ b/x11/coreterminal/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1629410989
-SHA256 (CuboCore-coreterminal-c61e5f8e0941dee2ab8920f2470fe93d21d717a2_GL0.tar.gz) = 01466f9dd7b8855f5f55b69c076a2310522da41a1a39de59893de9581d586d97
-SIZE (CuboCore-coreterminal-c61e5f8e0941dee2ab8920f2470fe93d21d717a2_GL0.tar.gz) = 73363
+TIMESTAMP = 1654469754
+SHA256 (CuboCore-coreterminal-49d0fc24d5e8237d3d7fc26e5c92a316e54b6b54_GL0.tar.gz) = b0b4d4005f2fb921689bcf6edecd7651ffe3d934aaaee527dd998823bf64f146
+SIZE (CuboCore-coreterminal-49d0fc24d5e8237d3d7fc26e5c92a316e54b6b54_GL0.tar.gz) = 74310
diff --git a/x11/coreterminal/files/patch-coreterminal.cpp b/x11/coreterminal/files/patch-coreterminal.cpp
index ae15e597e257..b13707825b91 100644
--- a/x11/coreterminal/files/patch-coreterminal.cpp
+++ b/x11/coreterminal/files/patch-coreterminal.cpp
@@ -1,69 +1,20 @@
---- coreterminal.cpp.orig	2021-08-18 11:17:12 UTC
+--- coreterminal.cpp.orig	2022-06-05 22:56:33 UTC
 +++ coreterminal.cpp
-@@ -27,6 +27,7 @@
-     *
- */
- 
-+#include <iostream>
- #include <QWidget>
- #include <QCloseEvent>
- #include <QHBoxLayout>
-@@ -34,6 +35,8 @@
- #include <QDir>
- #include <QFileInfo>
- #include <QMessageBox>
-+#include <QTabBar>
-+#include <QStyle>
- 
- #include <cprime/appopenfunc.h>
- #include <cprime/variables.h>
-@@ -75,6 +78,7 @@ CoreTerminal::~CoreTerminal()
- void CoreTerminal::loadSettings()
+@@ -55,7 +55,7 @@ CoreTerminal::CoreTerminal(settings *s, QWidget *paren
+ 	: QMainWindow(parent)
+ 	, uiMode(0)
+ 	, mRows(30)
+-	, mCols(120)
++	, mCols(80)
+ 	, smi(s)
+ {
+ 	createGUI();
+@@ -86,7 +86,7 @@ void CoreTerminal::loadSettings()
  {
  	uiMode = smi->getValue("CoreApps", "UIMode");
-+	terminalFont = smi->getValue("CoreTerminal", "Font");
- }
- 
- void CoreTerminal::createGUI()
-@@ -239,7 +243,40 @@ void CoreTerminal::setWindowProperties()
- //        setStyleSheet( "#base { background-color: palette(Window); }" );
- //    }
+ 	mRows = smi->getValue("CoreTerminal", "Rows", 30);
+-	mCols = smi->getValue("CoreTerminal", "Columns", 120);
++	mCols = smi->getValue("CoreTerminal", "Columns", 80);
  
--    resize( 800, 500 );
-+    QFontMetrics fm( terminalFont );
-+    std::cerr	<< "fm.boundingRect(\"M\").width() = " << fm.boundingRect( "M" ).width() 
-+		<< "\nfm.boundingRect(\"M\").height() = " << fm.boundingRect("M").height() 
-+		<< "\nfm.averageCharWidth() = " << fm.averageCharWidth()
-+		<< "\nfm.height() = " << fm.height()
-+		<< "\nfm.lineSpacing() = " << fm.lineSpacing()
-+		<< "\nfm.leading() = " << fm.leading()
-+		<< "\ntabBar.width() = " << TabWidget->tabBar()->width()
-+		<< "\ntabBar.height() = " << TabWidget->tabBar()->height()
-+		<< "\nframeGeometry.height() = " << frameGeometry().height()
-+		<< "\ngeometry.height() = " << geometry().height()
-+		<< "\nPM_ScrollBarExtent = " << qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent) 
-+		<< "\nPM_TabBarTabOverlap = " << qApp->style()->pixelMetric(QStyle::PM_TabBarTabOverlap)
-+		<< "\nPM_TabBarTabVSpace = " << qApp->style()->pixelMetric(QStyle::PM_TabBarTabVSpace)
-+		<< "\nPM_TabBarBaseHeight = " << qApp->style()->pixelMetric(QStyle::PM_TabBarBaseHeight)
-+		<< "\nPM_TabBarBaseOverlap = " << qApp->style()->pixelMetric(QStyle::PM_TabBarBaseOverlap)
-+		<< "\ntabBar()->height() = " << TabWidget->tabBar()->height()
-+		<< "\ntabBar()->tabRect().height() = " << TabWidget->tabBar()->tabRect(0).height()
-+		<< '\n';
-+
-+    int width = fm.averageCharWidth() * 80
-+		+ qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent)
-+		+ 2;
-+    /*
-+     * Perfect size =
-+     * tabBar->height() +7 for Fusion, +4 for QtCurve, +3 for Windows
-+     * tabBar->tabRect(0).height() seems to align:
-+     * 36 for Fusion, 33 for QtCurve, 32 for Windows using 12pt font
-+     * Also verified with several other styles and font sizes
-+     */
-+    int height = fm.height() * 30
-+		+ TabWidget->tabBar()->tabRect(0).height()
-+		+ 1;
-+    resize(width, height);
+ 	QFont terminalFont = smi->getValue("CoreTerminal", "Font");
  
-     if (uiMode != 0) {
-         setWindowFlags( windowFlags() );
diff --git a/x11/coreterminal/files/patch-coreterminal.hpp b/x11/coreterminal/files/patch-coreterminal.hpp
deleted file mode 100644
index 4629c46f023c..000000000000
--- a/x11/coreterminal/files/patch-coreterminal.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- coreterminal.hpp.orig	2021-08-18 11:17:12 UTC
-+++ coreterminal.hpp
-@@ -53,6 +53,7 @@ public :
- private:
-     int             uiMode;
- 	settings        *smi;
-+	QFont           terminalFont;
- 
- 	void loadSettings();
- 	void createGUI();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206071559.257Fx56D043016>