diff --git a/src/widgets/skills.ts b/src/widgets/skills.ts index 2f34cf6..2e3f5b8 100644 --- a/src/widgets/skills.ts +++ b/src/widgets/skills.ts @@ -71,28 +71,28 @@ export default function skillsWidget( const toolsList: string[] = toolsString.split(',') const softwareList: string[] = softwareString.split(',') - const rowHeightLanguages = Math.round((languageList.length - 0.1) / 7) > 1 ? Math.round((languageList.length - 0.1) / 7) : 1 + const rowHeightLanguages = Math.ceil(languageList.length / 7) const languagesTitleHeight = FIRST_ROW - const rowHeightFrameworks = Math.round((frameworkList.length - 0.1) / 7) > 1 ? Math.round((frameworkList.length - 0.1) / 7) : 1 + const rowHeightFrameworks = Math.ceil(frameworkList.length / 7) const frameworkTitleHeight = languagesTitleHeight + ((languageList.length > 1 || languageList[0] !== 'undefined' ? 1 : 0) * PAD) + ((languageList.length > 1 || languageList[0] !== 'undefined' ? rowHeightLanguages : 0) * ROW) + (includeNames && (languageList.length > 1 || languageList[0] !== 'undefined') ? (rowHeightFrameworks) * 25 : 0) - const rowHeightLibraries = Math.round((libraryList.length - 0.1) / 7) > 1 ? Math.round((libraryList.length - 0.1) / 7) : 1 + const rowHeightLibraries = Math.ceil(libraryList.length / 7) const libraryTitleHeight = frameworkTitleHeight + ((frameworkList.length > 1 || frameworkList[0] !== 'undefined' ? 1 : 0) * PAD) + ((frameworkList.length > 1 || frameworkList[0] !== 'undefined' ? rowHeightFrameworks : 0) * ROW) + (includeNames && (frameworkList.length > 1 || frameworkList[0] !== 'undefined') ? (rowHeightLibraries) * 25 : 0) - const rowHeightTools = Math.round((toolsList.length - 0.1) / 7) > 1 ? Math.round((toolsList.length - 0.1) / 7) : 1 + const rowHeightTools = Math.ceil(toolsList.length / 7) const toolsTitleHeight = libraryTitleHeight + ((libraryList.length > 1 || libraryList[0] !== 'undefined' ? 1 : 0) * PAD) + ((libraryList.length > 1 || libraryList[0] !== 'undefined' ? rowHeightLibraries : 0) * ROW) + (includeNames && (libraryList.length > 1 || libraryList[0] !== 'undefined') ? (rowHeightTools) * 25 : 0) - const rowHeightSoftware = Math.round((softwareList.length - 0.1) / 7) > 1 ? Math.round((softwareList.length - 0.1) / 7) : 1 + const rowHeightSoftware = Math.ceil(softwareList.length / 7) const softwareTitleHeight = toolsTitleHeight + ((toolsList.length > 1 || toolsList[0] !== 'undefined' ? 1 : 0) * PAD) + ((toolsList.length > 1 || toolsList[0] !== 'undefined' ? rowHeightTools : 0) * ROW)