Use points for font sizes

Do a basic job of converting font sizes from pixels to points, so they
will scale will the global GNOME scale factor. Some other sizes that are
clearly related to the font sizes are changed to ems, but no comprehensive
attempt is made to get rid of px units.

https://bugzilla.gnome.org/show_bug.cgi?id=636868
This commit is contained in:
Owen W. Taylor 2011-03-04 15:54:19 -05:00
parent 971e3f679f
commit e8eec2d357
4 changed files with 38 additions and 40 deletions

View File

@ -98,7 +98,7 @@ StTooltip StLabel {
.popup-menu { .popup-menu {
color: #ffffff; color: #ffffff;
font-size: 14px; font-size: 10.5pt;
min-width: 200px; min-width: 200px;
} }
@ -183,6 +183,8 @@ StTooltip StLabel {
color: #ffffff; color: #ffffff;
background-color: black; background-color: black;
border-image: url("panel-border.svg") 1; border-image: url("panel-border.svg") 1;
font-size: 10.5pt;
height: 1.86em;
} }
#panelLeft, #panelCenter, #panelRight { #panelLeft, #panelCenter, #panelRight {
@ -242,7 +244,6 @@ StTooltip StLabel {
.panel-button { .panel-button {
padding: 0px 12px; padding: 0px 12px;
font-size: 14px;
font-weight: bold; font-weight: bold;
color: #ccc; color: #ccc;
transition-duration: 100; transition-duration: 100;
@ -345,7 +346,7 @@ StTooltip StLabel {
background: rgba(0,0,0,0.8); background: rgba(0,0,0,0.8);
border: 1px solid rgba(128,128,128,0.40); border: 1px solid rgba(128,128,128,0.40);
border-radius: 10px; border-radius: 10px;
font-size: 12px; font-size: 9pt;
padding: 2px 8px; padding: 2px 8px;
-shell-caption-spacing: 4px; -shell-caption-spacing: 4px;
} }
@ -365,7 +366,7 @@ StTooltip StLabel {
#dash { #dash {
color: #5f5f5f; color: #5f5f5f;
font-size: 12px; font-size: 9pt;
padding: 4px 0px; padding: 4px 0px;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(128, 128, 128, 0.4); border: 1px solid rgba(128, 128, 128, 0.4);
@ -391,12 +392,12 @@ StTooltip StLabel {
} }
#viewSelector { #viewSelector {
spacing: 16px; spacing: 1em;
font-size: 16px; font-size: 12pt;
} }
#viewSelectorTabBar { #viewSelectorTabBar {
padding: 16px; padding: 1em;
} }
#searchArea { #searchArea {
@ -444,8 +445,8 @@ StTooltip StLabel {
.view-tab-title { .view-tab-title {
color: #888a85; color: #888a85;
font-weight: bold; font-weight: bold;
padding: 0px 12px; padding: 0px 0.75em;
height: 24px; height: 1.5em;
} }
.view-tab-title:hover { .view-tab-title:hover {
@ -455,8 +456,7 @@ StTooltip StLabel {
.view-tab-title:selected { .view-tab-title:selected {
color: #000000; color: #000000;
background-color: #c2c7cd; background-color: #c2c7cd;
border-radius: 4px; border-radius: 0.25em;
height: 24px;
} }
#searchResults { #searchResults {
@ -519,7 +519,7 @@ StTooltip StLabel {
.dash-search-button-label { .dash-search-button-label {
color: #cccccc; color: #cccccc;
font-size: 16px; font-size: 12pt;
} }
/* Apps */ /* Apps */
@ -544,9 +544,9 @@ StTooltip StLabel {
} }
.app-filter { .app-filter {
font-size: 14px; font-size: 10.5pt;
font-weight: bold; font-weight: bold;
height: 40px; height: 2.85em;
color: #aaa; color: #aaa;
width: 200px; width: 200px;
} }
@ -589,7 +589,7 @@ StTooltip StLabel {
border-radius: 4px; border-radius: 4px;
padding: 3px; padding: 3px;
border: 1px rgba(0,0,0,0); border: 1px rgba(0,0,0,0);
font-size: 10px; font-size: 7.5pt;
color: white; color: white;
transition-duration: 100; transition-duration: 100;
text-align: center; text-align: center;
@ -619,7 +619,7 @@ StTooltip StLabel {
} }
.app-well-menu { .app-well-menu {
font-size: 12px font-size: 9pt;
} }
/* LookingGlass */ /* LookingGlass */
@ -775,7 +775,7 @@ StTooltip StLabel {
.calendar-month-label { .calendar-month-label {
color: #666666; color: #666666;
font-size: 10px; font-size: 7.5pt;
padding: 2px; padding: 2px;
font-weight: bold; font-weight: bold;
} }
@ -818,16 +818,16 @@ StTooltip StLabel {
.datemenu-date-label { .datemenu-date-label {
padding: .4em 1.75em; padding: .4em 1.75em;
font-size: 14px; font-size: 10.5pt;
color: #cccccc; color: #cccccc;
font-weight: bold; font-weight: bold;
} }
.calendar-day-base { .calendar-day-base {
font-size: 10px; font-size: 7.5pt;
text-align: center; text-align: center;
width: 24px; width: 2.4em;
height: 24px; height: 2.4em;
} }
.calendar-day-base:hover { .calendar-day-base:hover {
@ -897,7 +897,7 @@ StTooltip StLabel {
} }
.events-day-header { .events-day-header {
font-size: 12px; font-size: 9pt;
font-weight: bold; font-weight: bold;
color: rgba(153, 153, 153, 1.0); color: rgba(153, 153, 153, 1.0);
padding-left: 0.3em; padding-left: 0.3em;
@ -909,7 +909,7 @@ StTooltip StLabel {
} }
.events-day-dayname { .events-day-dayname {
font-size: 12px; font-size: 9pt;
color: rgba(153, 153, 153, 1.0); color: rgba(153, 153, 153, 1.0);
text-align: left; text-align: left;
} }
@ -919,7 +919,7 @@ StTooltip StLabel {
} }
.events-day-time { .events-day-time {
font-size: 12px; font-size: 9pt;
color: #fff; color: #fff;
text-align: right; text-align: right;
} }
@ -929,7 +929,7 @@ StTooltip StLabel {
} }
.events-day-task { .events-day-task {
font-size: 12px; font-size: 9pt;
color: rgba(153, 153, 153, 1.0); color: rgba(153, 153, 153, 1.0);
} }
@ -964,7 +964,7 @@ StTooltip StLabel {
} }
#notification { #notification {
font-size: 16px; font-size: 12pt;
border-radius: 5px 5px 0px 0px; border-radius: 5px 5px 0px 0px;
background: rgba(0,0,0,0.9); background: rgba(0,0,0,0.9);
padding: 8px 8px 4px 8px; padding: 8px 8px 4px 8px;
@ -993,7 +993,7 @@ StTooltip StLabel {
} }
.summary-boxpointer #summary-right-click-menu { .summary-boxpointer #summary-right-click-menu {
font-size: 14px; font-size: 10.5pt;
padding-top: 12px; padding-top: 12px;
padding-bottom: 12px; padding-bottom: 12px;
} }
@ -1095,7 +1095,7 @@ StTooltip StLabel {
.chat-meta-message { .chat-meta-message {
padding-left: 4px; padding-left: 4px;
border-radius: 4px; border-radius: 4px;
font-size: 14px; font-size: 10.5pt;
color: #bbbbbb; color: #bbbbbb;
} }
@ -1163,7 +1163,7 @@ StTooltip StLabel {
} }
.source-title { .source-title {
font-size: 12px; font-size: 9pt;
font-weight: bold; font-weight: bold;
padding-left: 4px; padding-left: 4px;
} }
@ -1185,7 +1185,7 @@ StTooltip StLabel {
border-radius: 24px; border-radius: 24px;
padding: 20px; padding: 20px;
font-size: 12px; font-size: 9pt;
color: white; color: white;
} }
@ -1317,7 +1317,7 @@ StTooltip StLabel {
.modal-dialog-button { .modal-dialog-button {
border: 1px solid #8b8b8b; border: 1px solid #8b8b8b;
border-radius: 18px; border-radius: 18px;
font-size: 14px; font-size: 10.5pt;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
@ -1350,12 +1350,12 @@ StTooltip StLabel {
/* Run Dialog */ /* Run Dialog */
.run-dialog-label { .run-dialog-label {
font-size: 12px; font-size: 9pt;
color: white; color: white;
} }
.run-dialog-error-label { .run-dialog-error-label {
font-size: 12px; font-size: 9pt;
color: white; color: white;
} }
@ -1365,9 +1365,9 @@ StTooltip StLabel {
} }
.run-dialog-entry { .run-dialog-entry {
font-size: 14px; font-size: 10.5pt;
font-weight: bold; font-weight: bold;
width: 320px; width: 23em;
color: white; color: white;
} }

View File

@ -439,7 +439,7 @@ Overview.prototype = {
let primary = global.get_primary_monitor(); let primary = global.get_primary_monitor();
let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL); let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL);
let contentY = Panel.PANEL_HEIGHT; let contentY = Main.panel.actor.height;
let contentHeight = primary.height - contentY - Main.messageTray.actor.height; let contentHeight = primary.height - contentY - Main.messageTray.actor.height;
this._group.set_position(primary.x, primary.y); this._group.set_position(primary.x, primary.y);

View File

@ -22,8 +22,6 @@ const DateMenu = imports.ui.dateMenu;
const Main = imports.ui.main; const Main = imports.ui.main;
const Tweener = imports.ui.tweener; const Tweener = imports.ui.tweener;
const PANEL_HEIGHT = 26;
const PANEL_ICON_SIZE = 24; const PANEL_ICON_SIZE = 24;
const STARTUP_ANIMATION_TIME = 0.2; const STARTUP_ANIMATION_TIME = 0.2;
@ -1044,7 +1042,7 @@ Panel.prototype = {
let primary = global.get_primary_monitor(); let primary = global.get_primary_monitor();
this.actor.set_position(primary.x, primary.y); this.actor.set_position(primary.x, primary.y);
this.actor.set_size(primary.width, PANEL_HEIGHT); this.actor.set_size(primary.width, -1);
this._leftCorner.relayout(); this._leftCorner.relayout();
this._rightCorner.relayout(); this._rightCorner.relayout();

View File

@ -222,7 +222,7 @@ WindowClone.prototype = {
let [width, height] = this.actor.get_transformed_size(); let [width, height] = this.actor.get_transformed_size();
this.actor.x = _clamp(this.actor.x, 0, global.screen_width - width); this.actor.x = _clamp(this.actor.x, 0, global.screen_width - width);
this.actor.y = _clamp(this.actor.y, Panel.PANEL_HEIGHT, global.screen_height - height); this.actor.y = _clamp(this.actor.y, Main.panel.actor.height, global.screen_height - height);
}, },
_zoomStart : function () { _zoomStart : function () {