فهرست منبع

Adjustments to synctex controls.

Paulo Reis 9 سال پیش
والد
کامیت
0bad7d8549

+ 2 - 3
services/web/app/views/project/editor/editor.pug

@@ -73,15 +73,14 @@ div.full-size(
 		ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs'"
 		ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs'"
 		ng-controller="PdfSynctexController"
 		ng-controller="PdfSynctexController"
 	)
 	)
-		a.synctex-control-goto-pdf(
+		a.synctex-control.synctex-control-goto-pdf(
 			tooltip=translate('go_to_code_location_in_pdf')
 			tooltip=translate('go_to_code_location_in_pdf')
 			tooltip-placement="right"
 			tooltip-placement="right"
 			tooltip-append-to-body="true"
 			tooltip-append-to-body="true"
 			ng-click="syncToPdf()"
 			ng-click="syncToPdf()"
 		)
 		)
 			i.synctex-control-icon
 			i.synctex-control-icon
-		br
-		a.synctex-control-goto-code(
+		a.synctex-control.synctex-control-goto-code(
 			tooltip-html="'"+translate('go_to_pdf_location_in_code', {}, true)+"'"
 			tooltip-html="'"+translate('go_to_pdf_location_in_code', {}, true)+"'"
 			tooltip-placement="right"
 			tooltip-placement="right"
 			tooltip-append-to-body="true"
 			tooltip-append-to-body="true"

+ 33 - 12
services/web/public/stylesheets/app/editor/pdf.less

@@ -231,19 +231,14 @@
 .synctex-controls {
 .synctex-controls {
 	position: absolute;
 	position: absolute;
 	z-index: @synctex-controls-z-index;
 	z-index: @synctex-controls-z-index;
+	padding: @synctex-controls-padding;
 	top: 68px;
 	top: 68px;
-	padding: 0px 2px;
-	.btn-xs {
-		line-height: 1.3;
-		padding: @synctex-controls-btn-padding;
-	}
 }
 }
 
 
 .synctex-controls when (@is-overleaf = true) {
 .synctex-controls when (@is-overleaf = true) {
-	margin-right: -9px;
+	margin-right: -11px;
 }
 }
-	.synctex-control-goto-pdf,
-	.synctex-control-goto-code {
+	.synctex-control {
 		.btn;
 		.btn;
 		.btn-default;
 		.btn-default;
 		.btn-xs;
 		.btn-xs;
@@ -257,12 +252,38 @@
 			-moz-osx-font-smoothing: grayscale;
 			-moz-osx-font-smoothing: grayscale;
 		}
 		}
 	}
 	}
+
+	.synctex-control when (@is-overleaf = true) {
+		@ol-synctex-control-size: 24px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 1em;
+		width: @ol-synctex-control-size;
+		height: @ol-synctex-control-size;
+		border-radius: @ol-synctex-control-size / 2;
+		padding: 0 0 2px;
+		background-color: fade(@btn-default-bg, 80%);
+		transition: background 0.15s ease;
+		margin-bottom: @ol-synctex-control-size / 2;
+	}
+
+	.synctex-control when (@is-overleaf = false) {
+		line-height: 1.3;
+		padding: 0 2px;
+	}
 	
 	
-	.synctex-control-goto-pdf > .synctex-control-icon::before when (@is-overleaf = true) {
-		content: "\f061";		
+	.synctex-control-goto-pdf > .synctex-control-icon when (@is-overleaf = true) {
+		text-indent: 1px; // "Optical" adjustment.
+		&::before {
+			content: "\f061";		
+		}
 	}
 	}
-	.synctex-control-goto-code > .synctex-control-icon::before when (@is-overleaf = true) {
-		content: "\f060";		
+	.synctex-control-goto-code > .synctex-control-icon when (@is-overleaf = true) {
+		text-indent: -1px; // "Optical" adjustment.
+		&::before {
+			content: "\f060";		
+		}
 	}
 	}
 	
 	
 	.synctex-control-goto-pdf > .synctex-control-icon::before when (@is-overleaf = false) {
 	.synctex-control-goto-pdf > .synctex-control-icon::before when (@is-overleaf = false) {

+ 1 - 1
services/web/public/stylesheets/core/_common-variables.less

@@ -920,7 +920,7 @@
 @editor-resizer-bg-color          : #F4F4F4;
 @editor-resizer-bg-color          : #F4F4F4;
 @editor-resizer-bg-color-dragging : #ddd;
 @editor-resizer-bg-color-dragging : #ddd;
 @synctex-controls-z-index         : 3;
 @synctex-controls-z-index         : 3;
-@synctex-controls-btn-padding     : 0 2px 0;
+@synctex-controls-padding         : 0 2px;
 // Tags
 // Tags
 @tag-border-radius  : 0.25em;
 @tag-border-radius  : 0.25em;
 @tag-bg-color       : @label-default-bg;
 @tag-bg-color       : @label-default-bg;

+ 1 - 1
services/web/public/stylesheets/core/ol-variables.less

@@ -188,7 +188,7 @@
 @editor-resizer-bg-color          : @ol-blue-gray-6;
 @editor-resizer-bg-color          : @ol-blue-gray-6;
 @editor-resizer-bg-color-dragging : transparent;
 @editor-resizer-bg-color-dragging : transparent;
 @synctex-controls-z-index         : 6;
 @synctex-controls-z-index         : 6;
-@synctex-controls-btn-padding     : 4px;
+@synctex-controls-padding         : 0;
 //== Colors
 //== Colors
 //
 //
 //## Gray and brand colors for use across Bootstrap.
 //## Gray and brand colors for use across Bootstrap.