Accepting request 678412 from X11:Utilities

OBS-URL: https://build.opensuse.org/request/show/678412
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xournalpp?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2019-02-25 16:55:35 +00:00 committed by Git OBS Bridge
commit ad06c4b70a
5 changed files with 147 additions and 8 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:949292cea88a2c8847b53c2bd0a690a83db1e2c7efa0f849c5d39ae85f83a0c4
size 8460139

3
1.0.8.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:95069296532119dd193a12cb560a510972614420679ee41d4cad9b0ce5a692ae
size 8485637

View File

@ -0,0 +1,117 @@
From cdcf02d1a4703d7c146b5479a751ae18180abac6 Mon Sep 17 00:00:00 2001
From: Andreas Butti <andreas.butti@gmail.com>
Date: Mon, 18 Feb 2019 18:25:25 +0100
Subject: [PATCH] fixes #906
---
src/gui/Layout.cpp | 59 ++++++++++++++++++++++++++++++----------
src/gui/LayoutMapper.cpp | 5 ----
2 files changed, 44 insertions(+), 20 deletions(-)
diff --git a/src/gui/Layout.cpp b/src/gui/Layout.cpp
index d8b15535..c6a6d84a 100644
--- a/src/gui/Layout.cpp
+++ b/src/gui/Layout.cpp
@@ -9,6 +9,27 @@
#include "gui/LayoutMapper.h"
+/**
+ * Padding outside the pages, including shadow
+ */
+const int XOURNAL_PADDING = 10;
+
+/**
+ * Padding outside the pages, if additional padding is set
+ */
+const int XOURNAL_PADDING_FREE_SPACE = 150;
+
+/**
+ * Allowance for shadow between page pairs in paired page mode
+ */
+const int XOURNAL_ROOM_FOR_SHADOW = 3;
+
+/**
+ * Padding between the pages
+ */
+const int XOURNAL_PADDING_BETWEEN = 15;
+
+
Layout::Layout(XournalView* view, ScrollHandling* scrollHandling)
: view(view),
scrollHandling(scrollHandling),
@@ -174,21 +195,6 @@ double Layout::getLayoutWidth()
return layoutWidth;
}
-/**
- * Padding outside the pages, including shadow
- */
-const int XOURNAL_PADDING = 10;
-
-/**
- * Allowance for shadow between page pairs in paired page mode
- */
-const int XOURNAL_ROOM_FOR_SHADOW = 3;
-
-/**
- * Padding between the pages
- */
-const int XOURNAL_PADDING_BETWEEN = 15;
-
void Layout::layoutPages()
{
XOJ_CHECK_TYPE(Layout);
@@ -238,6 +244,19 @@ void Layout::layoutPages()
int x = XOURNAL_PADDING;
int y = XOURNAL_PADDING;
+ bool verticalSpace = settings->getAddVerticalSpace();
+ bool horizontalSpace = settings->getAddHorizontalSpace();
+
+ if (verticalSpace)
+ {
+ x += XOURNAL_PADDING_FREE_SPACE;
+ }
+
+ if (horizontalSpace)
+ {
+ y += XOURNAL_PADDING_FREE_SPACE;
+ }
+
// Iterate over ALL possible rows and columns and let the mapper tell us what page, if any, is found there.
for (int r = 0; r < rows; r++)
{
@@ -308,6 +327,16 @@ void Layout::layoutPages()
totalHeight += sizeRow[r];
}
+ if (verticalSpace)
+ {
+ totalWidth += XOURNAL_PADDING_FREE_SPACE * 2;
+ }
+
+ if (horizontalSpace)
+ {
+ totalHeight += XOURNAL_PADDING_FREE_SPACE * 2;
+ }
+
this->setLayoutSize(totalWidth, totalHeight);
this->view->pagePosition->update(this->view->viewPages, len, totalHeight);
}
diff --git a/src/gui/LayoutMapper.cpp b/src/gui/LayoutMapper.cpp
index 8d97147d..4cf079a0 100644
--- a/src/gui/LayoutMapper.cpp
+++ b/src/gui/LayoutMapper.cpp
@@ -41,11 +41,6 @@ LayoutMapper::LayoutMapper(int numPages, Settings* settings)
int pages = numPages;
// get from user settings:
-
- // TODO: Use these again?
- bool verticalSpace = settings->getAddVerticalSpace();
- // TODO: Use these again?
- bool horizontalSpace = settings->getAddHorizontalSpace();
bool isPairedPages = settings->isShowPairedPages();
int numCols = settings->getViewColumns();
int numRows = settings->getViewRows();

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Feb 19 11:34:38 UTC 2019 - badshah400@gmail.com
- Update to version 1.0.8:
* Audio recording directly integrated, no VLC etc. needed.
* LaTex use now vector graphics.
* Multiple page layout.
* Minor bug fixes.
- Add xournalpp-fix-horizontal-space.patch: fix adding horizontal
space to document view from preferences; patch taken from
upstream commit (gh#xournalpp/xournalpp#906).
- New upstream build dependencies: pkgconfig(portaudiocpp),
pkgconfig(sndfile).
-------------------------------------------------------------------
Mon Jan 28 13:48:02 UTC 2019 - Atri Bhattacharya <badshah400@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package xournalpp
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,18 +12,20 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: xournalpp
Version: 1.0.7
Version: 1.0.8
Release: 0
Summary: Notetaking software designed around a tablet
License: GPL-2.0-or-later
Group: Productivity/Office/Other
URL: https://github.com/xournalpp/xournalpp
Source0: https://github.com/xournalpp/xournalpp/archive/%{version}.tar.gz
# PATCH-FIX-UPSTREAM xournalpp-fix-horizontal-space.patch gh#xournalpp/xournalpp#906 badshah400@gmail.com -- Fix adding horizontal space to document view from preferences; patch taken from upstream commit
Patch0: xournalpp-fix-horizontal-space.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
@ -33,8 +35,10 @@ BuildRequires: texlive-latex-bin
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(poppler-glib)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(poppler-glib)
BuildRequires: pkgconfig(portaudiocpp)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(zlib)
Requires: texlive-latex-bin
@ -46,14 +50,18 @@ It supports pen input, e.g. Wacom tablets.
%prep
%setup -q
%patch0 -p1
%build
%cmake -DENABLE_MATHTEX=ON
%cmake
%make_jobs
%install
%cmake_install
# REMOVE UNNECESSARY SCRIPTS update-icon-cache IS TAKEN CARE OF BY RPM FILE TRIGGERS
rm %{buildroot}%{_datadir}/%{name}/ui/*/hicolor/update-icon-cache.sh
%find_lang xournalpp %{no_lang_C}
%fdupes %{buildroot}%{_datadir}