Skip to content

Use relative font sizes for timer and slide progress #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rc/pdfpc.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
background-color: white;
}

.bottomText {
font-size: 5em;
}

GtkProgressBar {
color: gray;
}
Expand Down
13 changes: 4 additions & 9 deletions src/classes/window/presenter.vala
Original file line number Diff line number Diff line change
Expand Up @@ -226,23 +226,18 @@ namespace pdfpc.Window {
this.notes_view.override_font(font_desc);
}

// Initial font needed for the labels
var font = Pango.FontDescription.from_string("Verdana");
var absoluteSize = Math.floor(bottom_height * 0.6 * Pango.SCALE);
font.set_absolute_size(absoluteSize);

// The countdown timer is centered in the 90% bottom part of the screen
// It takes 3/4 of the available width
this.timer = this.presentation_controller.getTimer();
this.timer.name = "timer";
this.timer.get_style_context().add_class("bottomText");
this.timer.set_justify(Gtk.Justification.CENTER);
this.timer.override_font(font);


// The slide counter is centered in the 90% bottom part of the screen
// It takes 1/4 of the available width on the right
this.slide_progress = new Gtk.Entry();
this.slide_progress.name = "slideProgress";
this.slide_progress.get_style_context().add_class("bottomText");
this.slide_progress.set_alignment(1f);
this.slide_progress.override_font(font);
this.slide_progress.sensitive = false;
this.slide_progress.has_frame = false;
this.slide_progress.key_press_event.connect(this.on_key_press_slide_progress);
Expand Down