mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
In weekly calendars, draw moon phases smaller and in days without moon
phases, don't leave a big gap at the top.
This commit is contained in:
@@ -51,7 +51,7 @@ my $settings = {
|
||||
title_url => '',
|
||||
title_size => 14,
|
||||
header_size => 12,
|
||||
daynum_size => 14,
|
||||
daynum_size => -1,
|
||||
entry_size => 8,
|
||||
|
||||
border_size => 4,
|
||||
@@ -526,7 +526,9 @@ Specify the size of the header font in 1/72ndths of an inch. The default is 14.
|
||||
=item --daynum-size=I<n>
|
||||
|
||||
Specify the size of the day number font in 1/72ndths of an inch. The
|
||||
default is 14.
|
||||
default is 14 for monthly calendars or 10 for weekly calendars. (Weekly
|
||||
calendars don't have day numbers in the calendar boxes, but this setting
|
||||
is used to scale the size of moon phase indicators.)
|
||||
|
||||
=item --entry-size=I<n>
|
||||
|
||||
|
||||
@@ -468,6 +468,9 @@ sub render
|
||||
{
|
||||
my ($self, $cr, $settings, $index, $total) = @_;
|
||||
|
||||
if ($settings->{daynum_size} < 0) {
|
||||
$settings->{daynum_size} = 14;
|
||||
}
|
||||
if ($settings->{svg} || $settings->{eps}) {
|
||||
if ($index > 1) {
|
||||
if ($index == 2) {
|
||||
@@ -1111,6 +1114,9 @@ Remind::PDF::Weekly - render a weekly calendar
|
||||
sub render
|
||||
{
|
||||
my ($self, $cr, $settings, $index, $total) = @_;
|
||||
if ($settings->{daynum_size} < 0) {
|
||||
$settings->{daynum_size} = 10;
|
||||
}
|
||||
if ($settings->{svg} || $settings->{eps}) {
|
||||
if ($index > $settings->{weeks_per_page}) {
|
||||
if ($index == $settings->{weeks_per_page}+1) {
|
||||
@@ -1262,7 +1268,13 @@ sub draw_entries
|
||||
$layout->set_font_description($desc);
|
||||
my ($wid, $h) = $layout->get_pixel_size();
|
||||
|
||||
my $so_far = $box->[1] + $h + $settings->{border_size};
|
||||
my $so_far = $box->[1] + $settings->{border_size};
|
||||
foreach my $entry (@{$self->{entries}->[$i]}) {
|
||||
if ($entry->isa('Remind::PDF::Entry::moon')) {
|
||||
$so_far = $box->[1] + $h + $settings->{border_size};
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
my $box_height = $box->[3] - $box->[1];
|
||||
my $done = 0;
|
||||
|
||||
Reference in New Issue
Block a user